Skip to content

Commit 9067743

Browse files
committed
update tests
1 parent b23cba1 commit 9067743

1 file changed

Lines changed: 28 additions & 11 deletions

File tree

test/generator.ml

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,23 @@ let execute input =
77
| Error msg -> print_endline msg
88
| Ok code -> App.run code
99

10-
let _print = "
11-
var a b;
12-
a := 1;
13-
b := 2;
14-
printn a b (a + b);
10+
let _print =
11+
"
12+
var a b c d e f g;
13+
a := \" 1 \";
14+
b := \" 2 \";
15+
c := \" 3 \";
16+
17+
d := \" 4 \";
18+
e := \" 5 \";
19+
f := \" 6 \";
20+
21+
print a b c d e f;
1522
"
1623

1724
let%expect_test "print" =
1825
execute _print;
19-
[%expect {|
20-
1
21-
2
22-
3
23-
|}]
26+
[%expect {| 1 2 3 4 5 6 |}]
2427

2528
let _factorial =
2629
"
@@ -130,7 +133,7 @@ helloworld;
130133

131134
let%expect_test "definition_hello_world" =
132135
execute _definition_hello_world;
133-
[%expect {| hello world!!! |}]
136+
[%expect {| helloworld!!! |}]
134137

135138
let _definition_fact =
136139
"
@@ -176,3 +179,17 @@ let%expect_test "definition_fact" =
176179
720
177180
5040
178181
|}]
182+
183+
let _concat =
184+
"
185+
var a b c d;
186+
a := \" 123 \";
187+
b := \" 456 \";
188+
c := \" 789 \";
189+
190+
print (a ^ b ^ c);
191+
"
192+
193+
let%expect_test "concat" =
194+
execute _concat;
195+
[%expect {| 123 456 789 |}]

0 commit comments

Comments
 (0)