From d8c4195da98291557062d270ee880c940c39d493 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Mon, 4 Mar 2013 14:52:55 -0600 Subject: just call this method todo --- src/main/scala/org/perl8/test/TestMore.scala | 8 ++++---- src/main/scala/org/perl8/test/tap/TestBuilder.scala | 4 ++-- 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 } } -- cgit v1.2.3-54-g00ecf