Skip to content

Commit

Permalink
adds version task to gulp file and fixes docs
Browse files Browse the repository at this point in the history
  • Loading branch information
George Cook committed Aug 4, 2019
1 parent f2d9a1a commit 815a61f
Show file tree
Hide file tree
Showing 14 changed files with 107 additions and 77 deletions.
73 changes: 48 additions & 25 deletions docs/Rooibos.brs.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,16 +57,16 @@ <h1 class="page-title">Rooibos.brs</h1>
' * and therefore require a screen and scene are created.
' * @param nodeContext as object - this is the global scope of your tests - so where anonymous methods will run from. This should be m
' */
function Rooibos__Init(preTestSetup = invalid, testUtilsDecoratorMethodName = invalid, testSceneName = invalid, nodeContext = invalid) as void
function Rooibos__Init(preTestSetup = invalid, testUtilsDecoratorMethodName = invalid, testSceneName = invalid, nodeContext = invalid) as void
args = {}
if createObject("roAPPInfo").IsDev() &lt;> true then
? " not running in dev mode! - rooibos tests only support sideloaded builds - aborting"
return
end if

args.testUtilsDecoratorMethodName = testUtilsDecoratorMethodName
args.nodeContext = nodeContext

screen = CreateObject("roSGScreen")
m.port = CreateObject("roMessagePort")
screen.setMessagePort(m.port)
Expand All @@ -77,43 +77,66 @@ <h1 class="page-title">Rooibos.brs</h1>
scene = screen.CreateScene(testSceneName)
scene.id = "ROOT"
screen.show()

m.global = screen.getGlobalNode()
m.global.addFields({"testsScene": scene})
m.global.addFields({ "testsScene": scene })

if (preTestSetup &lt;> invalid)
preTestSetup(screen)
end if


testId = args.TestId
if (testId = invalid)
testId = "UNDEFINED_TEST_ID"
end if

? "#########################################################################"
? "#TEST START : ###" ; testId ; "###"

args.testScene = scene
args.global = m.global
rooibosVersion = "3.1"
requiredRooibosPreprocessorVersion = "3.1.0"

if not RBS_CMN_isFunction(RBSFM_getPreprocessorVersion)
versionError = "You are using a rooibos-preprocessor (i.e. rooibosC) version older than 3.1 - please update to " + requiredRooibosPreprocessorVersion
else
if RBSFM_getPreprocessorVersion() = requiredRooibosPreprocessorVersion
versionError = ""
else
versionError = "Your rooibos-preprocessor (i.e. rooibosC) version '" + RBSFM_getPreprocessorVersion() + "' is not compatible with rooibos version " + rooibosVersion + ". Please upgrade your rooibos-preprocessor to version " + requiredRooibosPreprocessorVersion
end if
end if

runner = RBS_TR_TestRunner(args)
runner.Run()

while(true)
msg = wait(0, m.port)
msgType = type(msg)
if msgType = "roSGScreenEvent"
if msg.isScreenClosed()
return
if versionError = ""
? "######################################################"
? ""
? "# rooibos framework version: " ; rooibosVersion
? "# tests parsed with rooibosC version: " ; rooibosVersion
? "######################################################"
? ""

runner = RBS_TR_TestRunner(args)
runner.Run()

while(true)
msg = wait(0, m.port)
msgType = type(msg)
if msgType = "roSGScreenEvent"
if msg.isScreenClosed()
return
end if
end if
end if
end while
end while
else
? ""
? "#########################################################"
? "ERROR - VERSION MISMATCH"
? versionError
? "#########################################################"
end if
end function




</code></pre>
</article>
</section>
Expand All @@ -126,7 +149,7 @@ <h1 class="page-title">Rooibos.brs</h1>
<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Jun 04 2019 20:26:45 GMT-0500 (-05) using the Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sun Aug 04 2019 08:33:57 GMT-0500 (-05) using the Minami theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion docs/Rooibos_BaseTestSuite.brs.html
Original file line number Diff line number Diff line change
Expand Up @@ -2005,7 +2005,7 @@ <h1 class="page-title">Rooibos_BaseTestSuite.brs</h1>
<br class="clear">

<footer>
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Tue Jun 04 2019 20:26:45 GMT-0500 (-05) using the Minami theme.
Generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a> on Sun Aug 04 2019 08:33:57 GMT-0500 (-05) using the Minami theme.
</footer>

<script>prettyPrint();</script>
Expand Down
Loading

0 comments on commit 815a61f

Please sign in to comment.