diff options
author | Jesse Luehrs <doy@tozt.net> | 2013-02-19 17:36:30 -0600 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2013-02-20 02:22:37 -0600 |
commit | 11d1bb0e4f108f463a5efb5a030b52559859eeed (patch) | |
tree | 05ccfcf08c4e0a660f468b0bff683abf79bdf54e /src/test | |
parent | 2885060d44bfc38061f25bad13007abb250dbae8 (diff) | |
download | scala-test-more-11d1bb0e4f108f463a5efb5a030b52559859eeed.tar.gz scala-test-more-11d1bb0e4f108f463a5efb5a030b52559859eeed.zip |
include helpful messages for test failures
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/scala/basic.scala | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/test/scala/basic.scala b/src/test/scala/basic.scala index 88c8f6d..4adf6a4 100644 --- a/src/test/scala/basic.scala +++ b/src/test/scala/basic.scala @@ -19,7 +19,8 @@ class Basic extends FunSuite { "ok 1 test succeeded\n" + "not ok 2 test failed\n" + "ok 3\n" + - "not ok 4\n" + "not ok 4\n" + + "# Looks like you failed 2 tests of 4.\n" assert(output.toString === expected) } @@ -38,7 +39,8 @@ class Basic extends FunSuite { "not ok 2 test failed\n" + "ok 3\n" + "not ok 4\n" + - "1..4\n" + "1..4\n" + + "# Looks like you failed 2 tests of 4.\n" assert(output.toString === expected) } @@ -48,7 +50,11 @@ class Basic extends FunSuite { val builder = new Builder(output) builder.doneTesting - assert(output.toString === "1..0\n") + val expected = + "1..0\n" + + "# No tests run!\n" + + assert(output.toString === expected) } test ("diag") { @@ -66,7 +72,8 @@ class Basic extends FunSuite { "not ok 2 the test passes\n" + "# got false, expected true\n" + "ok 3\n" + - "1..3\n" + "1..3\n" + + "# Looks like you failed 1 test of 3.\n" assert(output.toString === expected) } |