org.kiama.example.minijava

SemanticTests

class SemanticTests extends FunSuite

Tests that check that the parser works correctly. I.e., it accepts correct input and produces the appropriate trees, and it rejects illegal input.

Source
SemanticTests.scala
Linear Supertypes
FunSuite, Suite, Serializable, AbstractSuite, Assertions, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. SemanticTests
  2. FunSuite
  3. Suite
  4. Serializable
  5. AbstractSuite
  6. Assertions
  7. AnyRef
  8. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SemanticTests()

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. final def asInstanceOf[T0]: T0

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

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

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

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

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

    Assert that a message was produced at a given position.

  12. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  13. implicit def convertToEqualizer(left: Any): Equalizer

    Definition Classes
    Assertions
  14. def embedExpressionAndCheck(exp: Expression, retType: Type = IntType (), vars: List[Var] = Nil, stmts: List[Statement] = Nil): Unit

    Construct a program by inserting the given expression into a return statement of a method and then run the semantic checks on it.

    Construct a program by inserting the given expression into a return statement of a method and then run the semantic checks on it. The idea is that you construct the expression outside, insert it into the program, run the checks and then you can check that attributes of the expression are as you expect. The optional retType, vars and stmts arguments can be used to inject a return type, variable declarations or statements into the method as well. The return type defaults to integer and the variable and statement lists to empty.

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

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

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

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

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

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

    Definition Classes
    Suite → AbstractSuite
  21. def fail(cause: Throwable): Nothing

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

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

    Definition Classes
    Assertions
  24. def fail(): Nothing

    Definition Classes
    Assertions
  25. def finalize(): Unit

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

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

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

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

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

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

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

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

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

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

    Definition Classes
    AnyRef
  36. def parseProgram(str: String): Program

    Parse some test input as a program and, if the parse succeeds with no input left, return the program tree.

    Parse some test input as a program and, if the parse succeeds with no input left, return the program tree. If the parse fails, fail the test.

  37. def parseTest(str: String): Unit

    Parse some test input as a program and run the semantic analyser over the resulting tree (if the parse succeeds).

  38. def pending: PendingNothing

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

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

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

    Attributes
    protected
    Definition Classes
    Suite → AbstractSuite
  42. def runSemanticChecks(prog: Program): Unit

    Run the semantic checks on the given program.

  43. def runTest(testName: String, reporter: Reporter, stopper: Stopper, configMap: Map[String, Any], tracker: Tracker): Unit

    Attributes
    protected
    Definition Classes
    FunSuite → Suite → AbstractSuite
  44. 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
  45. final val styleName: String

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

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

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

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

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

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

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

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

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

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

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

    Definition Classes
    Assertions
  57. 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 FunSuite

Inherited from Suite

Inherited from Serializable

Inherited from AbstractSuite

Inherited from Assertions

Inherited from AnyRef

Inherited from Any

Ungrouped