org.kiama.util

CompilerTests

class CompilerTests extends CompilerBase[Any] with Tests with TestCompiler[Any]

Basic tests of compiler module. Normal usage is tested by many of the examples.

Linear Supertypes
TestCompiler[Any], Tests, BeforeAndAfter, FunSuite, Suite, Serializable, AbstractSuite, Assertions, CompilerBase[Any], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. CompilerTests
  2. TestCompiler
  3. Tests
  4. BeforeAndAfter
  5. FunSuite
  6. Suite
  7. Serializable
  8. AbstractSuite
  9. Assertions
  10. CompilerBase
  11. AnyRef
  12. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new CompilerTests()

Type Members

  1. final class Equalizer extends AnyRef

    Definition Classes
    Assertions
  2. trait NoArgTest extends () ⇒ Unit

    Attributes
    protected
    Definition Classes
    Suite

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. object FocusTest extends Tag

    A ScalaTest tag that enables us to focus attention on particular tests rather than running all of them each time.

  7. def after(fun: ⇒ Any): Unit

    Attributes
    protected
    Definition Classes
    BeforeAndAfter
  8. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  9. def assert(o: Option[String]): Unit

    Definition Classes
    Assertions
  10. def assert(o: Option[String], clue: Any): Unit

    Definition Classes
    Assertions
  11. def assert(condition: Boolean, clue: Any): Unit

    Definition Classes
    Assertions
  12. def assert(condition: Boolean): Unit

    Definition Classes
    Assertions
  13. def assertMessage(index: Int, line: Int, column: Int, msg: String): Unit

    Assert that a message was produced at a given position.

    Assert that a message was produced at a given position.

    Definition Classes
    Tests
  14. def before(fun: ⇒ Any): Unit

    Attributes
    protected
    Definition Classes
    BeforeAndAfter
  15. def checkargs(args: Array[String], emitter: Emitter): Array[String]

    Definition Classes
    CompilerBase
  16. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  17. def compile(args: Array[String], console: Console): String

    Definition Classes
    CompilerBase
  18. implicit def convertToEqualizer(left: Any): Equalizer

    Definition Classes
    Assertions
  19. def dosanitisation: Boolean

    Flag to decide whether to sanitise the output before comparison of test results with expected results (see sanitise method).

    Flag to decide whether to sanitise the output before comparison of test results with expected results (see sanitise method). Default is true; override with false if you want actual results compared.

    Definition Classes
    TestCompiler
  20. def driver(args: Array[String], console: Console, emitter: Emitter): Unit

    Definition Classes
    CompilerBase
  21. def encoding: String

    Definition Classes
    CompilerBase
  22. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  24. final def execute(testName: String, configMap: Map[String, Any], color: Boolean, durations: Boolean, shortstacks: Boolean, fullstacks: Boolean, stats: Boolean): Unit

    Definition Classes
    Suite
  25. def expectResult(expected: Any)(actual: Any): Unit

    Definition Classes
    Assertions
  26. def expectResult(expected: Any, clue: Any)(actual: Any): Unit

    Definition Classes
    Assertions
  27. def expectedTestCount(filter: Filter): Int

    Definition Classes
    Suite → AbstractSuite
  28. def expectnotsame(expected: Any)(actual: Any): Unit

    Analogous to ScalaTest's expect but it uses same to compare the two values instead of equality.

    Analogous to ScalaTest's expect but it uses same to compare the two values instead of equality.

    Definition Classes
    Tests
  29. def expectsame(expected: Any)(actual: Any): Unit

    Analogous to ScalaTest's expect but it uses same to compare the two values instead of equality.

    Analogous to ScalaTest's expect but it uses same to compare the two values instead of equality.

    Definition Classes
    Tests
  30. def fail(cause: Throwable): Nothing

    Definition Classes
    Assertions
  31. def fail(message: String, cause: Throwable): Nothing

    Definition Classes
    Assertions
  32. def fail(message: String): Nothing

    Definition Classes
    Assertions
  33. def fail(): Nothing

    Definition Classes
    Assertions
  34. def failExpectedTest[T](expected: T, found: T, description: String = ""): Unit

    Fail a test with a message about finding something and expecting something else.

    Fail a test with a message about finding something and expecting something else.

    Definition Classes
    Tests
  35. def filetests(name: String, path: String, srcext: String, resext: String, optinext: Option[String] = None, indefault: String = "", argslist: List[Array[String]] = List (Array ())): Unit

    Make tests that process the files in path.

    Make tests that process the files in path. name is an identifying name for this set of tests. All files whose names end in srcext are processed. Processing is done by the function compile which must return either Some (s) where s is the output or None if processing failed. If srcext is .x and resext is .y, then the expected result for foo.x is found in file foo.y. If optinext is Some (z), then foo.z is used for standard input, if it exists, otherwise the string indefault is used. A test fails if either the processing fails or it succeeds with the wrong result. argslist is used to specify the sets of command-line arguments that you want to use. Each test is run with each set of arguments. The default is an empty argument list.

    Definition Classes
    TestCompiler
  36. def finalize(): Unit

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

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

    Definition Classes
    AnyRef → Any
  39. def ignore(testName: String, testTags: Tag*)(testFun: ⇒ Unit): Unit

    Attributes
    protected
    Definition Classes
    FunSuite
  40. implicit def info: Informer

    Attributes
    protected
    Definition Classes
    FunSuite
  41. def intercept[T <: AnyRef](f: ⇒ Any)(implicit manifest: Manifest[T]): T

    Definition Classes
    Assertions
  42. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  43. def main(args: Array[String]): Unit

    Definition Classes
    CompilerBase
  44. def makeast(reader: Reader, filename: String, emitter: Emitter): Either[Any, String]

    Definition Classes
    CompilerTests → CompilerBase
  45. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  46. def nestedSuites: List[Suite]

    Definition Classes
    Suite → AbstractSuite
  47. final def notify(): Unit

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

    Definition Classes
    AnyRef
  49. def pending: PendingNothing

    Definition Classes
    Suite
  50. def pendingUntilFixed(f: ⇒ Unit): Unit

    Definition Classes
    Suite
  51. def process(ast: Any, console: Console, emitter: Emitter): Boolean

    Definition Classes
    CompilerTests → CompilerBase
  52. def run(testName: Option[String], reporter: Reporter, stopper: Stopper, filter: Filter, configMap: Map[String, Any], distributor: Option[Distributor], tracker: Tracker): Unit

    Definition Classes
    BeforeAndAfter → AbstractSuite
  53. def runNestedSuites(reporter: Reporter, stopper: Stopper, filter: Filter, configMap: Map[String, Any], distributor: Option[Distributor], tracker: Tracker): Unit

    Attributes
    protected
    Definition Classes
    Suite → AbstractSuite
  54. def runTest(testName: String, reporter: Reporter, stopper: Stopper, configMap: Map[String, Any], tracker: Tracker): Unit

    Attributes
    protected
    Definition Classes
    BeforeAndAfter → AbstractSuite
  55. def runTests(testName: Option[String], reporter: Reporter, stopper: Stopper, filter: Filter, configMap: Map[String, Any], distributor: Option[Distributor], tracker: Tracker): Unit

    Attributes
    protected
    Definition Classes
    FunSuite → Suite → AbstractSuite
  56. def same(v1: Any, v2: Any): Boolean

    Compare two values.

    Compare two values. Use reference equality for references and value equality for non-references. If the values are both Some values, perform the check on the wrapped values.

    Definition Classes
    Tests
  57. def sanitise(s: String): String

    Sanitise the output.

    Sanitise the output. At the moment this means make any Windows line endings appear in Unix style instead. This allows for either program or test output to use either line ending style, but tests will still pass. This will clearly break any tests where the actual line endings matter.

    Definition Classes
    TestCompiler
  58. final val styleName: String

    Definition Classes
    FunSuite → Suite → AbstractSuite
  59. def suiteName: String

    Definition Classes
    Suite
  60. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  61. def tags: Map[String, Set[String]]

    Definition Classes
    FunSuite → Suite → AbstractSuite
  62. def test(testName: String, testTags: Tag*)(testFun: ⇒ Unit): Unit

    Attributes
    protected
    Definition Classes
    FunSuite
  63. def testNames: Set[String]

    Definition Classes
    FunSuite → Suite → AbstractSuite
  64. def testsFor(unit: Unit): Unit

    Attributes
    protected
    Definition Classes
    FunSuite
  65. def toString(): String

    Definition Classes
    AnyRef → Any
  66. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()
  69. def withClue[T](clue: Any)(fun: ⇒ T): T

    Definition Classes
    Assertions
  70. def withFixture(test: NoArgTest): Unit

    Attributes
    protected
    Definition Classes
    Suite → AbstractSuite

Deprecated Value Members

  1. def expect(expected: Any)(actual: Any): Unit

    Definition Classes
    Assertions
    Annotations
    @deprecated
    Deprecated

    This expect method has been deprecated. Please replace all invocations of expect with an identical invocation of expectResult instead.

  2. def expect(expected: Any, clue: Any)(actual: Any): Unit

    Definition Classes
    Assertions
    Annotations
    @deprecated
    Deprecated

    This expect method has been deprecated. Please replace all invocations of expect with an identical invocation of expectResult instead.

Inherited from TestCompiler[Any]

Inherited from Tests

Inherited from BeforeAndAfter

Inherited from FunSuite

Inherited from Suite

Inherited from Serializable

Inherited from AbstractSuite

Inherited from Assertions

Inherited from CompilerBase[Any]

Inherited from AnyRef

Inherited from Any

Ungrouped