|
|
|
@ -42,10 +42,12 @@ class SemanticAnalyzerTest extends TimedSuite {
|
|
|
|
|
assert(e == nError, "Incorrect number of Errors")
|
|
|
|
|
assert(astTypeEquals(tast, tsa), "AST does not have correct type")
|
|
|
|
|
}
|
|
|
|
|
//see examples/hello.scala and pow.scala for more comprehensive tests
|
|
|
|
|
|
|
|
|
|
test("NoErrorNoWarning") {
|
|
|
|
|
testSemanticAnalyzer(Lit(1), Lit(1).withType(IntType), 0, 0)
|
|
|
|
|
testSemanticAnalyzer(Prim("+", List(Lit(1), Lit(2))), Prim("+", List(Lit(1).withType(IntType), Lit(2).withType(IntType))).withType(IntType), 0, 0)
|
|
|
|
|
}
|
|
|
|
|
//see examples/hello.scala and pow.scala for more comprehensive tests
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|