Skip to content

Instantly share code, notes, and snippets.

@nrk
Created July 24, 2008 15:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nrk/2187 to your computer and use it in GitHub Desktop.
Save nrk/2187 to your computer and use it in GitHub Desktop.
just a quick test of Io's unit testing facility
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
*/
// 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