billsun 8 months ago
parent 1c282af443
commit e0bdf2e33d

@ -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
}

Loading…
Cancel
Save