aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/scala/org/perl8/test/tap/TestBuilderTest.scala
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2013-02-23 16:09:06 -0600
committerJesse Luehrs <doy@tozt.net>2013-02-23 16:15:11 -0600
commit073d5a06c07c85c0d1794c4a15d564e8463b31fc (patch)
treedfb53af9f24d8cec55f41ea7024de1060be07c36 /src/test/scala/org/perl8/test/tap/TestBuilderTest.scala
parent18854928e8697f733d2758d274151999bcc4a238 (diff)
downloadscala-test-more-073d5a06c07c85c0d1794c4a15d564e8463b31fc.tar.gz
scala-test-more-073d5a06c07c85c0d1794c4a15d564e8463b31fc.zip
tests shouldn't produce anything other than tap
the harness can parse the tap to figure out whatever it needs from that
Diffstat (limited to 'src/test/scala/org/perl8/test/tap/TestBuilderTest.scala')
-rw-r--r--src/test/scala/org/perl8/test/tap/TestBuilderTest.scala66
1 files changed, 42 insertions, 24 deletions
diff --git a/src/test/scala/org/perl8/test/tap/TestBuilderTest.scala b/src/test/scala/org/perl8/test/tap/TestBuilderTest.scala
index 8eab0d2..423b823 100644
--- a/src/test/scala/org/perl8/test/tap/TestBuilderTest.scala
+++ b/src/test/scala/org/perl8/test/tap/TestBuilderTest.scala
@@ -102,34 +102,52 @@ class TestBuilderTest extends TestMore {
val output = new ByteArrayOutputStream
val oldOut = Console.out
val oldErr = Console.err
- Console.withOut(output) {
- Console.withErr(output) {
- val builder = new TestBuilder
- Console.withOut(oldOut) {
- Console.withErr(oldErr) {
- ok(!builder.isPassing)
- }
+
+ is(
+ Console.withOut(output) {
+ Console.withErr(output) {
+ val builder = new TestBuilder
+ builder.doneTesting
}
- builder.ok(true)
- Console.withOut(oldOut) {
- Console.withErr(oldErr) {
- ok(builder.isPassing)
- }
+ },
+ false
+ )
+
+ is(
+ Console.withOut(output) {
+ Console.withErr(output) {
+ val builder = new TestBuilder
+ builder.ok(true)
+ builder.doneTesting
}
- builder.ok(false)
- Console.withOut(oldOut) {
- Console.withErr(oldErr) {
- ok(!builder.isPassing)
- }
+ },
+ true
+ )
+
+ is(
+ Console.withOut(output) {
+ Console.withErr(output) {
+ val builder = new TestBuilder
+ builder.ok(true)
+ builder.ok(false)
+ builder.doneTesting
}
- builder.ok(true)
- Console.withOut(oldOut) {
- Console.withErr(oldErr) {
- ok(!builder.isPassing)
- }
+ },
+ false
+ )
+
+ is(
+ Console.withOut(output) {
+ Console.withErr(output) {
+ val builder = new TestBuilder
+ builder.ok(true)
+ builder.ok(false)
+ builder.ok(true)
+ builder.doneTesting
}
- }
- }
+ },
+ false
+ )
}
subtest ("bail out") {