aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/scala/org/perl8/test/tap
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2013-03-05 17:17:00 -0600
committerJesse Luehrs <doy@tozt.net>2013-03-05 17:17:00 -0600
commit29faacb9ffcce109208d60d16a0d3627bf502d91 (patch)
tree7a307df6bf3f464a063180633a5dac9bf9f8ce0e /src/main/scala/org/perl8/test/tap
parent0eff62670f158497125f2512fb47eca3a5044aaf (diff)
downloadscala-test-more-29faacb9ffcce109208d60d16a0d3627bf502d91.tar.gz
scala-test-more-29faacb9ffcce109208d60d16a0d3627bf502d91.zip
rename
Diffstat (limited to 'src/main/scala/org/perl8/test/tap')
-rw-r--r--src/main/scala/org/perl8/test/tap/Consumer.scala15
-rw-r--r--src/main/scala/org/perl8/test/tap/Parser.scala16
-rw-r--r--src/main/scala/org/perl8/test/tap/Producer.scala8
-rw-r--r--src/main/scala/org/perl8/test/tap/TAPEvent.scala21
-rw-r--r--src/main/scala/org/perl8/test/tap/TAPResult.scala26
-rw-r--r--src/main/scala/org/perl8/test/tap/TestBuilder.scala6
-rw-r--r--src/main/scala/org/perl8/test/tap/package.scala2
7 files changed, 49 insertions, 45 deletions
diff --git a/src/main/scala/org/perl8/test/tap/Consumer.scala b/src/main/scala/org/perl8/test/tap/Consumer.scala
index e822212..09a2f0a 100644
--- a/src/main/scala/org/perl8/test/tap/Consumer.scala
+++ b/src/main/scala/org/perl8/test/tap/Consumer.scala
@@ -1,13 +1,13 @@
-package org.perl8.test.tap
+package com.iinteractive.test.tap
-import org.perl8.test.{Plan,NumericPlan,SkipAll}
+import com.iinteractive.test.{Plan,NumericPlan,SkipAll}
/** Contains a method to parse an individual line of TAP. */
object Consumer {
/** Parses a line of TAP.
*
- * @return A [[org.perl8.test.tap.Consumer.Line Line]] object corresponding
- * to the parsed line.
+ * @return A [[com.iinteractive.test.tap.Consumer.Line Line]] object
+ * corresponding to the parsed line.
*/
def parseLine (line: String): Line = {
commentRx.findFirstMatchIn(line).map { m =>
@@ -81,7 +81,8 @@ object Consumer {
/** A parsed TAP line containing a test plan.
*
- * @param plan The [[org.perl8.test.Plan Plan]] that this line represents.
+ * @param plan The [[com.iinteractive.test.Plan Plan]] that this line
+ * represents.
*/
case class PlanLine private[Consumer] (
plan: Plan,
@@ -99,8 +100,8 @@ object Consumer {
/** A parsed TAP line containing a test result.
*
- * @param result The [[org.perl8.test.tap.TestResult TestResult]] that this
- * line represents.
+ * @param result The [[com.iinteractive.test.tap.TestResult TestResult]]
+ * that this line represents.
*/
case class ResultLine private[Consumer] (
result: TestResult,
diff --git a/src/main/scala/org/perl8/test/tap/Parser.scala b/src/main/scala/org/perl8/test/tap/Parser.scala
index 66a2c04..7bc44d3 100644
--- a/src/main/scala/org/perl8/test/tap/Parser.scala
+++ b/src/main/scala/org/perl8/test/tap/Parser.scala
@@ -1,4 +1,4 @@
-package org.perl8.test.tap
+package com.iinteractive.test.tap
import java.io.{ByteArrayInputStream,InputStream,OutputStream}
import scala.annotation.tailrec
@@ -6,8 +6,8 @@ import scala.io.Source
import scala.util.parsing.combinator._
import scala.util.parsing.input.{Position,Reader}
-import org.perl8.test.Plan
-import org.perl8.test.tap.Consumer._
+import com.iinteractive.test.Plan
+import com.iinteractive.test.tap.Consumer._
/** This class parses a TAP stream. It can either parse it all at once (from a
* string), or it can be used as a streaming parser, where TAP events are
@@ -20,8 +20,8 @@ class Parser private (
/** Creates a parser instance.
* @param cb The event handler callback. It will be called after each
* meaningful line of TAP, with a
- * [[org.perl8.test.tap.TAPEvent TAPEvent]] instance representing
- * the event that was just parsed.
+ * [[com.iinteractive.test.tap.TAPEvent TAPEvent]] instance
+ * representing the event that was just parsed.
*/
def this (cb: TAPEvent => Unit = e => ()) =
this(cb, "")
@@ -112,9 +112,9 @@ class Parser private (
private def subtest: Parser[TAPResult] =
LineParser("subtest") { in =>
// can't just return the result directly, because it's of a different
- // type (the path dependent type associated with the new Parser instance
- // we create here, rather than the path dependent type associated with
- // this)
+ // type (the path dependent type associated with the new Parser
+ // instance we create here, rather than the path dependent type
+ // associated with this)
val subParser = new TAPParser(
e => (),
in.first.indent
diff --git a/src/main/scala/org/perl8/test/tap/Producer.scala b/src/main/scala/org/perl8/test/tap/Producer.scala
index 7f5edaf..3ed8d7e 100644
--- a/src/main/scala/org/perl8/test/tap/Producer.scala
+++ b/src/main/scala/org/perl8/test/tap/Producer.scala
@@ -1,8 +1,8 @@
-package org.perl8.test.tap
+package com.iinteractive.test.tap
/** Contains functions for producing individual lines of TAP. */
object Producer {
- import org.perl8.test.Plan
+ import com.iinteractive.test.Plan
/** Returns a test result.
*
@@ -48,8 +48,8 @@ object Producer {
/** Returns a test plan.
*
- * @example `1..5` ([[org.perl8.test.NumericPlan NumericPlan]])
- * @example `1..0 # SKIP don't run this test` ([[org.perl8.test.SkipAll SkipAll]])
+ * @example `1..5` ([[com.iinteractive.test.NumericPlan NumericPlan]])
+ * @example `1..0 # SKIP don't run this test` ([[com.iinteractive.test.SkipAll SkipAll]])
*/
def plan (plan: Plan): String =
plan.skipAll.map(m => "1..0 # SKIP " + m).getOrElse("1.." + plan.plan)
diff --git a/src/main/scala/org/perl8/test/tap/TAPEvent.scala b/src/main/scala/org/perl8/test/tap/TAPEvent.scala
index 0f9318b..1c2e88d 100644
--- a/src/main/scala/org/perl8/test/tap/TAPEvent.scala
+++ b/src/main/scala/org/perl8/test/tap/TAPEvent.scala
@@ -1,6 +1,6 @@
-package org.perl8.test.tap
+package com.iinteractive.test.tap
-import org.perl8.test.Plan
+import com.iinteractive.test.Plan
/** An event emitted while parsing a TAP stream. */
sealed trait TAPEvent
@@ -9,23 +9,24 @@ sealed trait TAPEvent
case object StartEvent extends TAPEvent
/** The end of a TAP stream.
- * @param result The [[org.perl8.test.tap.TAPResult TAPResult]] containing
- * information about all of the tests which just finished
- * running. This will be the same thing that is returned by the
- * call to [[org.perl8.test.tap.Parser Parser]]'s `parse`
+ * @param result The [[com.iinteractive.test.tap.TAPResult TAPResult]]
+ * containing information about all of the tests which just
+ * finished running. This will be the same thing that is
+ * returned by the call to
+ * [[com.iinteractive.test.tap.Parser Parser]]'s `parse`
* method.
*/
case class EndEvent private[tap] (result: TAPResult) extends TAPEvent
/** An individual test result.
- * @param result The [[org.perl8.test.tap.TestResult TestResult]] containing
- * information about the corresponding test.
+ * @param result The [[com.iinteractive.test.tap.TestResult TestResult]]
+ * containing information about the corresponding test.
*/
case class ResultEvent private[tap] (result: TestResult) extends TAPEvent
/** A test plan.
- * @param plan The [[org.perl8.test.Plan Plan]] corresponding to the line that
- * was parsed.
+ * @param plan The [[com.iinteractive.test.Plan Plan]] corresponding to the
+ * line that was parsed.
*/
case class PlanEvent private[tap] (plan: Plan) extends TAPEvent
diff --git a/src/main/scala/org/perl8/test/tap/TAPResult.scala b/src/main/scala/org/perl8/test/tap/TAPResult.scala
index 2a23122..c3c4926 100644
--- a/src/main/scala/org/perl8/test/tap/TAPResult.scala
+++ b/src/main/scala/org/perl8/test/tap/TAPResult.scala
@@ -1,15 +1,16 @@
-package org.perl8.test.tap
+package com.iinteractive.test.tap
-import org.perl8.test.{Plan,NumericPlan,SkipAll}
+import com.iinteractive.test.{Plan,NumericPlan,SkipAll}
/** The summarized results of a TAP stream. Contains the
- * [[org.perl8.test.Plan Plan]] that was given, as well as a list of
- * [[org.perl8.test.tap.TestResult TestResults]] corresponding to each of the
- * tests in the stream.
+ * [[com.iinteractive.test.Plan Plan]] that was given, as well as a list of
+ * [[com.iinteractive.test.tap.TestResult TestResults]] corresponding to each
+ * of the tests in the stream.
*
- * @param plan The [[org.perl8.test.Plan Plan]] from the TAP stream
- * @param results The list of [[org.perl8.test.tap.TestResult TestResults]]
- * from the TAP stream
+ * @param plan The [[com.iinteractive.test.Plan Plan]] from the TAP stream
+ * @param results The list of
+ * [[com.iinteractive.test.tap.TestResult TestResults]] from
+ * the TAP stream
*/
class TAPResult (val plan: Plan, val results: Seq[TestResult]) {
/** Returns true if the number of tests executed was compatible with the
@@ -60,10 +61,11 @@ class TAPResult (val plan: Plan, val results: Seq[TestResult]) {
* @param passed True if the test passed
* @param number The test number in the TAP stream
* @param description The test description
- * @param directive The [[org.perl8.test.tap.Directive Directive]] (either
- * skip or todo) that was provided for this test, if any
- * @param subtest The [[org.perl8.test.tap.TAPResult]] for the subtest
- * that this test corresponds to, if any
+ * @param directive The [[com.iinteractive.test.tap.Directive Directive]]
+ * (either skip or todo) that was provided for this test,
+ * if any
+ * @param subtest The [[com.iinteractive.test.tap.TAPResult]] for the
+ * subtest that this test corresponds to, if any
*/
class TestResult (
val passed: Boolean,
diff --git a/src/main/scala/org/perl8/test/tap/TestBuilder.scala b/src/main/scala/org/perl8/test/tap/TestBuilder.scala
index 3ee4706..62fdf02 100644
--- a/src/main/scala/org/perl8/test/tap/TestBuilder.scala
+++ b/src/main/scala/org/perl8/test/tap/TestBuilder.scala
@@ -1,6 +1,6 @@
-package org.perl8.test.tap
+package com.iinteractive.test.tap
-import org.perl8.test._
+import com.iinteractive.test._
/** This class provides a convenient yet low level API for generating TAP
* streams. Each instance of this class handles a single TAP stream, and
@@ -22,7 +22,7 @@ class TestBuilder private (
/** Creates a new builder instance, and emits the corresponding plan line,
* unless the plan is not given.
*
- * @param plan [[org.perl8.test.Plan plan]] for this test.
+ * @param plan [[com.iinteractive.test.Plan plan]] for this test.
* @param terminalInUse Whether this test is being run from a harness which
* will not just be writing directly to the output.
* This will make things written to `Console.err` have
diff --git a/src/main/scala/org/perl8/test/tap/package.scala b/src/main/scala/org/perl8/test/tap/package.scala
index 7721d7f..312f996 100644
--- a/src/main/scala/org/perl8/test/tap/package.scala
+++ b/src/main/scala/org/perl8/test/tap/package.scala
@@ -1,4 +1,4 @@
-package org.perl8.test
+package com.iinteractive.test
/** Classes for TAP generation and parsing. */
package object tap {