fix: always push a value onto stack on expr evaluation
This commit is contained in:
@@ -27,13 +27,13 @@ class ParallelExamplesSpec extends AnyFlatSpec with BeforeAndAfterAll with Paral
|
||||
forEvery(files) { (filename, expectedResult) =>
|
||||
val baseFilename = filename.stripSuffix(".wacc")
|
||||
given stdout: PrintStream = PrintStream(File(baseFilename + ".out"))
|
||||
val result = compile(filename)
|
||||
|
||||
s"$filename" should "be compiled with correct result" in {
|
||||
val result = compile(filename)
|
||||
assert(expectedResult.contains(result))
|
||||
}
|
||||
|
||||
if (result == 0) it should "run with correct result" in {
|
||||
if (expectedResult == List(0)) it should "run with correct result" in {
|
||||
if (fileIsDisallowedBackend(filename)) pending
|
||||
|
||||
// Retrieve contents to get input and expected output + exit code
|
||||
@@ -85,24 +85,24 @@ class ParallelExamplesSpec extends AnyFlatSpec with BeforeAndAfterAll with Paral
|
||||
Seq(
|
||||
// format: off
|
||||
// disable formatting to avoid binPack
|
||||
// "^.*wacc-examples/valid/advanced.*$",
|
||||
// "^.*wacc-examples/valid/array.*$",
|
||||
// "^.*wacc-examples/valid/basic/exit.*$",
|
||||
// "^.*wacc-examples/valid/basic/skip.*$",
|
||||
// "^.*wacc-examples/valid/expressions.*$",
|
||||
// "^.*wacc-examples/valid/function/nested_functions.*$",
|
||||
// "^.*wacc-examples/valid/function/simple_functions.*$",
|
||||
// "^.*wacc-examples/valid/if.*$",
|
||||
// "^.*wacc-examples/valid/IO/print.*$",
|
||||
// "^.*wacc-examples/valid/IO/read.*$",
|
||||
// "^.*wacc-examples/valid/IO/IOLoop.wacc.*$",
|
||||
// "^.*wacc-examples/valid/IO/IOSequence.wacc.*$",
|
||||
// "^.*wacc-examples/valid/pairs.*$",
|
||||
// "^.*wacc-examples/valid/runtimeErr.*$",
|
||||
// "^.*wacc-examples/valid/scope.*$",
|
||||
// "^.*wacc-examples/valid/sequence.*$",
|
||||
// "^.*wacc-examples/valid/variables.*$",
|
||||
// "^.*wacc-examples/valid/while.*$",
|
||||
"^.*wacc-examples/valid/advanced.*$",
|
||||
"^.*wacc-examples/valid/array.*$",
|
||||
"^.*wacc-examples/valid/basic/exit.*$",
|
||||
"^.*wacc-examples/valid/basic/skip.*$",
|
||||
"^.*wacc-examples/valid/expressions.*$",
|
||||
"^.*wacc-examples/valid/function/nested_functions.*$",
|
||||
"^.*wacc-examples/valid/function/simple_functions.*$",
|
||||
"^.*wacc-examples/valid/if.*$",
|
||||
"^.*wacc-examples/valid/IO/print.*$",
|
||||
"^.*wacc-examples/valid/IO/read.*$",
|
||||
"^.*wacc-examples/valid/IO/IOLoop.wacc.*$",
|
||||
"^.*wacc-examples/valid/IO/IOSequence.wacc.*$",
|
||||
"^.*wacc-examples/valid/pairs.*$",
|
||||
"^.*wacc-examples/valid/runtimeErr.*$",
|
||||
"^.*wacc-examples/valid/scope.*$",
|
||||
"^.*wacc-examples/valid/sequence.*$",
|
||||
"^.*wacc-examples/valid/variables.*$",
|
||||
"^.*wacc-examples/valid/while.*$",
|
||||
// format: on
|
||||
).find(filename.matches).isDefined
|
||||
}
|
||||
|
Reference in New Issue
Block a user