com.iinteractive.test.tap

TestBuilder

class TestBuilder extends AnyRef

This class provides a convenient yet low level API for generating TAP streams. Each instance of this class handles a single TAP stream, and keeps track of things like the current test number for you. All TAP-producing methods write the TAP lines to Console.out or Console.err, so you can override those (via Console.withOut or Console.withErr).

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. TestBuilder
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new TestBuilder(plan: Plan = NoPlan, terminalInUse: Boolean = false)

    Creates a new builder instance, and emits the corresponding plan line, unless the plan is not given.

    Creates a new builder instance, and emits the corresponding plan line, unless the plan is not given.

    plan

    plan for this test.

    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 a newline prepended, so that they always start on an empty line.

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def bailOut(message: String): Unit

    Abort the current test, with a message.

  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  9. def cloneForSubtest(newPlan: Plan): TestBuilder

    Create a new TestBuilder instance, to be used to run a subtest.

    Create a new TestBuilder instance, to be used to run a subtest. This new instance will have all of its lines prefixed by an additional level of indentation. This instance will still need to have doneTesting called on it, and the result of the subtest will still need to be reported as a separate test result through ok.

  10. def diag(message: Any): Unit

    Writes a comment line to Console.err.

    Writes a comment line to Console.err. This will allow it to be visible in most summarizing harnesses (which consume and parse everything that goes to Console.out).

  11. def doneTesting: Boolean

    Finalize the current builder instance.

    Finalize the current builder instance. This writes the auto-calculated plan to Console.out if the plan type was NoPlan and reports a summary of the test results as a comment to Console.err.

    returns

    whether or not the test class as a whole passed.

  12. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  13. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  14. def exitCode: Int

    The exit code to use, in harnesses that run a single test.

    The exit code to use, in harnesses that run a single test. Passing tests return 0, invalid tests (such as running a different number of tests than planned) return 255, and all others return the number of failed tests.

  15. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  16. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  17. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  18. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  19. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  20. def note(message: Any): Unit

    Write a comment line to Console.out.

    Write a comment line to Console.out. This will typically only be visible in the raw TAP stream.

  21. final def notify(): Unit

    Definition Classes
    AnyRef
  22. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  23. def ok(test: Boolean, description: String): Unit

    Reports a single test result with description to Console.out.

  24. def ok(test: Boolean): Unit

    Reports a single test result to Console.out.

  25. def skip(reason: String): Unit

    Reports a single skipped test result to Console.out.

  26. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  27. def toString(): String

    Definition Classes
    AnyRef → Any
  28. def todo(todo: String, test: Boolean, description: String): Unit

    Reports a single TODO test result with description to Console.out.

  29. def todo(todo: String, test: Boolean): Unit

    Reports a single TODO test result to Console.out.

  30. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  31. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()
  32. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from AnyRef

Inherited from Any

Ungrouped