Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
43
Task/Test-a-function/NetRexx/test-a-function.netrexx
Normal file
43
Task/Test-a-function/NetRexx/test-a-function.netrexx
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
/* NetRexx */
|
||||
|
||||
options replace format comments java crossref savelog symbols binary
|
||||
|
||||
import junit.framework.TestCase
|
||||
import RCPalindrome
|
||||
|
||||
class RCTestAFunction public final extends TestCase
|
||||
|
||||
method setUp public
|
||||
return
|
||||
|
||||
method tearDown public
|
||||
return
|
||||
|
||||
method testIsPal public signals AssertionError
|
||||
|
||||
assertTrue(RCPalindrome.isPal(Rexx 'abcba'))
|
||||
assertTrue(RCPalindrome.isPal(Rexx 'aa'))
|
||||
assertTrue(RCPalindrome.isPal(Rexx 'a'))
|
||||
assertTrue(RCPalindrome.isPal(Rexx ''))
|
||||
assertFalse(RCPalindrome.isPal(Rexx 'ab'))
|
||||
assertFalse(RCPalindrome.isPal(Rexx 'abcdba'))
|
||||
|
||||
return
|
||||
|
||||
method except signals RuntimeException
|
||||
signal RuntimeException()
|
||||
|
||||
method main(args = String[]) public constant
|
||||
|
||||
testResult = org.junit.runner.JUnitCore.runClasses([RCTestAFunction.class])
|
||||
|
||||
secs = Rexx testResult.getRunTime / 1000.0
|
||||
|
||||
if testResult.wasSuccessful then say 'Tests successful'
|
||||
else say 'Tests failed'
|
||||
say ' failure count:' testResult.getFailureCount
|
||||
say ' ignore count:' testResult.getIgnoreCount
|
||||
say ' run count:' testResult.getRunCount
|
||||
say ' run time:' secs.format(null, 3)
|
||||
|
||||
return
|
||||
Loading…
Add table
Add a link
Reference in a new issue