aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/scala/org/perl8/test/Test.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/scala/org/perl8/test/Test.scala')
-rw-r--r--src/main/scala/org/perl8/test/Test.scala12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/main/scala/org/perl8/test/Test.scala b/src/main/scala/org/perl8/test/Test.scala
index 436719c..ffe75b9 100644
--- a/src/main/scala/org/perl8/test/Test.scala
+++ b/src/main/scala/org/perl8/test/Test.scala
@@ -7,6 +7,12 @@ package org.perl8.test
trait Test {
/** Runs the test. The TAP stream will be written to Console.out and
* Console.err, so you can swap these out as required in order to parse it.
+ *
+ * @return The exit code that the test produced. Success is indicated by 0,
+ * failure to run the correct number of tests by 255, and any other
+ * failure by the number of tests that failed. This should be used
+ * by reporters which run a single test, which can call
+ * `sys.exit(exitCode)`
*/
def run: Int =
runTests(false)
@@ -16,9 +22,9 @@ trait Test {
*
* Summarizing test reporters tend to repeatedly update the same line on
* the terminal, so this method makes calls to
- * [[tap.TestBuilder#diag diag]] (which sends messages to stderr, where
- * they are typically displayed as-is) prefix the message with a newline,
- * to ensure that the output starts on its own line.
+ * [[org.perl8.test.tap.TestBuilder#diag diag]] (which sends messages to
+ * stderr, where they are typically displayed as-is) prefix the message
+ * with a newline, to ensure that the output starts on its own line.
*/
def runInHarness: Int =
runTests(true)