Created
July 24, 2008 15:42
-
-
Save nrk/2187 to your computer and use it in GitHub Desktop.
just a quick test of Io's unit testing facility
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MyFirstTest := UnitTest clone do( | |
setUp := method( | |
// setting up | |
) | |
tearDown := method( | |
// tearing down | |
) | |
test_01 := method( | |
assertTrue("日本語" at(2) asCharacter == "語") | |
) | |
test_02 := method( | |
assertTrue(4 * 2 == 7) | |
) | |
) | |
/* OUTPUT | |
myself@nrkdeb:~/misc$ io runtest.io | |
test_02 - failed | |
Exception: [4 *(2) ==(7) != true] [false != true] | |
--------- | |
Exception raise UnitTest.io 66 | |
MyFirstTest assertTrue MyFirstTest.io 15 | |
MyFirstTest assertEquals UnitTest.io 76 | |
MyFirstTest test_02 doString 1 | |
false | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// runtest.io | |
TestSuite clone setPath(System launchPath) run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment