aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/scala/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/scala/com')
-rw-r--r--src/test/scala/com/iinteractive/test/TestMoreTest.scala3
-rw-r--r--src/test/scala/com/iinteractive/test/tap/TestBuilderTest.scala21
2 files changed, 17 insertions, 7 deletions
diff --git a/src/test/scala/com/iinteractive/test/TestMoreTest.scala b/src/test/scala/com/iinteractive/test/TestMoreTest.scala
index ead9823..22bddc3 100644
--- a/src/test/scala/com/iinteractive/test/TestMoreTest.scala
+++ b/src/test/scala/com/iinteractive/test/TestMoreTest.scala
@@ -55,6 +55,8 @@ class TestMoreTest extends TestMore {
fail("it doesn't work")
fail
}
+
+ diag(List(1, "foo"))
}
val out = new ByteArrayOutputStream
@@ -140,6 +142,7 @@ class TestMoreTest extends TestMore {
"# at TestMoreTest.scala line " + line(44) + ".\n" +
"not ok 23 # TODO not working yet\n" +
"# Failed (TODO) test at TestMoreTest.scala line " + line(45) + ".\n" +
+ "# List(1, foo)\n" +
"1..23\n" +
"# Looks like you failed 9 tests of 23.\n"
diff --git a/src/test/scala/com/iinteractive/test/tap/TestBuilderTest.scala b/src/test/scala/com/iinteractive/test/tap/TestBuilderTest.scala
index bc873c8..b1f23c9 100644
--- a/src/test/scala/com/iinteractive/test/tap/TestBuilderTest.scala
+++ b/src/test/scala/com/iinteractive/test/tap/TestBuilderTest.scala
@@ -70,6 +70,9 @@ class TestBuilderTest extends TestMore {
}
subtest ("diag") {
+ class Foo {
+ override def toString = "stringified"
+ }
val output = new ByteArrayOutputStream
Console.withOut(output) {
Console.withErr(output) {
@@ -78,19 +81,23 @@ class TestBuilderTest extends TestMore {
builder.ok(false, "the test passes")
builder.diag("got false, expected true")
builder.ok(true)
+ builder.diag(List(1, "foo", Nil, ('a', 2.3)))
+ builder.diag(new Foo)
builder.diag("ending\nnow")
builder.doneTesting
}
}
val expected =
- "ok 1 the test passes\n" +
- "not ok 2 the test passes\n" +
- "# got false, expected true\n" +
- "ok 3\n" +
- "# ending\n" +
- "# now\n" +
- "1..3\n" +
+ "ok 1 the test passes\n" +
+ "not ok 2 the test passes\n" +
+ "# got false, expected true\n" +
+ "ok 3\n" +
+ "# List(1, foo, List(), (a,2.3))\n" +
+ "# stringified\n" +
+ "# ending\n" +
+ "# now\n" +
+ "1..3\n" +
"# Looks like you failed 1 test of 3.\n"
is(output.toString, expected)