diff options
author | Jesse Luehrs <doy@tozt.net> | 2013-03-04 14:52:55 -0600 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2013-03-04 14:58:38 -0600 |
commit | d8c4195da98291557062d270ee880c940c39d493 (patch) | |
tree | d32b100d1fc39e7931aad95cea2cb8461dd7daee | |
parent | d9960e53ab53d82bb50cbb963097ab201fbc7fe9 (diff) | |
download | scala-test-more-d8c4195da98291557062d270ee880c940c39d493.tar.gz scala-test-more-d8c4195da98291557062d270ee880c940c39d493.zip |
just call this method todo
-rw-r--r-- | src/main/scala/org/perl8/test/TestMore.scala | 8 | ||||
-rw-r--r-- | src/main/scala/org/perl8/test/tap/TestBuilder.scala | 4 | ||||
-rw-r--r-- | src/test/scala/org/perl8/test/tap/TestBuilderTest.scala | 4 |
3 files changed, 8 insertions, 8 deletions
diff --git a/src/main/scala/org/perl8/test/TestMore.scala b/src/main/scala/org/perl8/test/TestMore.scala index 608a522..b412215 100644 --- a/src/main/scala/org/perl8/test/TestMore.scala +++ b/src/main/scala/org/perl8/test/TestMore.scala @@ -140,7 +140,7 @@ class TestMore (plan: Plan = NoPlan) extends Test with DelayedInit { desc: String ): Boolean = { todo match { - case Some(t) => builder.okTodo(cond, "- " + desc, t) + case Some(t) => builder.todo(t, cond, "- " + desc) case None => builder.ok(cond, "- " + desc) } if (!cond) { @@ -155,7 +155,7 @@ class TestMore (plan: Plan = NoPlan) extends Test with DelayedInit { reason: => String ): Boolean = { todo match { - case Some(t) => builder.okTodo(cond, "- " + desc, t) + case Some(t) => builder.todo(t, cond, "- " + desc) case None => builder.ok(cond, "- " + desc) } if (!cond) { @@ -166,7 +166,7 @@ class TestMore (plan: Plan = NoPlan) extends Test with DelayedInit { private def test (cond: Boolean): Boolean = { todo match { - case Some(t) => builder.okTodo(cond, t) + case Some(t) => builder.todo(t, cond) case None => builder.ok(cond) } if (!cond) { @@ -177,7 +177,7 @@ class TestMore (plan: Plan = NoPlan) extends Test with DelayedInit { private def test (cond: Boolean, reason: => String): Boolean = { todo match { - case Some(t) => builder.okTodo(cond, t) + case Some(t) => builder.todo(t, cond) case None => builder.ok(cond) } if (!cond) { diff --git a/src/main/scala/org/perl8/test/tap/TestBuilder.scala b/src/main/scala/org/perl8/test/tap/TestBuilder.scala index f0b4125..da6732f 100644 --- a/src/main/scala/org/perl8/test/tap/TestBuilder.scala +++ b/src/main/scala/org/perl8/test/tap/TestBuilder.scala @@ -28,12 +28,12 @@ class TestBuilder private ( outLine(Producer.result(test, state.currentTest, description)) } - def okTodo (test: Boolean, todo: String) { + def todo (todo: String, test: Boolean) { state.ok(true) outLine(Producer.todoResult(test, state.currentTest, todo)) } - def okTodo (test: Boolean, description: String, todo: String) { + def todo (todo: String, test: Boolean, description: String) { state.ok(true) outLine(Producer.todoResult(test, state.currentTest, description, todo)) } diff --git a/src/test/scala/org/perl8/test/tap/TestBuilderTest.scala b/src/test/scala/org/perl8/test/tap/TestBuilderTest.scala index 36ffb9b..eb0536a 100644 --- a/src/test/scala/org/perl8/test/tap/TestBuilderTest.scala +++ b/src/test/scala/org/perl8/test/tap/TestBuilderTest.scala @@ -227,8 +227,8 @@ class TestBuilderTest extends TestMore { Console.withOut(output) { Console.withErr(output) { val builder = new TestBuilder - builder.okTodo(false, "do a thing", todo = "not working yet") - builder.okTodo(true, todo = "is it?") + builder.todo("not working yet", false, "do a thing") + builder.todo("is it?", true) builder.doneTesting } } |