blob: 4628f709e762edccdcc02a3825ff39112396e812 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#!/bin/bash
# Test Builtin functions
. tests/common.sh
set -e
echo -n "- Print: "
assert_stdout_text \
"fn main() {
print(10); print(20);
}" \
"10
20"
assert_stdout_text \
"fn test(a: int) {
print(100*a);
}
fn main() {
test(10);
}" \
"1000"
# We don't print negative values yet, need to fix this
assert_stdout_text \
"fn main() {
print(-1);
}" \
"18446744073709551615"
echo " OK"
|