lang: Add a bunch of new language tests
These test both graph shape consistency and single value outputs. Eventually we want to make the graph shape tests more precise, and also verify specific outputs how it used to be. For now, this is okay. Co-authored-by: Samuel Gélineau <gelisam@gmail.com>
This commit is contained in:
19
lang/interpret_test/TestAstFunc1/graph12.txtar
Normal file
19
lang/interpret_test/TestAstFunc1/graph12.txtar
Normal file
@@ -0,0 +1,19 @@
|
||||
-- main.mcl --
|
||||
# variable shadowing both
|
||||
# this should be okay, because var is shadowed
|
||||
$x = "hello"
|
||||
if true {
|
||||
$x = "world" # shadowed
|
||||
test "t2" {
|
||||
stringptr => $x,
|
||||
}
|
||||
}
|
||||
test "t1" {
|
||||
stringptr => $x,
|
||||
}
|
||||
-- OUTPUT --
|
||||
Vertex: const
|
||||
Vertex: const
|
||||
Vertex: const
|
||||
Vertex: const
|
||||
Vertex: const
|
||||
Reference in New Issue
Block a user