| @@ -2,4 +2,6 @@ files := src ../lib | |||
| includes := snow ../include/lang2 | |||
| defines := SNOW_ENABLED | |||
| sanitizers := address undefined | |||
| cflags := -g | |||
| cflags := -g -fprofile-arcs -ftest-coverage | |||
| ldflags := --coverage | |||
| ldlibs := gcov | |||
| @@ -4,3 +4,5 @@ print arr.2 | |||
| arr.1 = "nope" | |||
| print arr | |||
| print [] | |||
| @@ -1,3 +1,4 @@ | |||
| [10 20 30] | |||
| 30 | |||
| [10 nope 30] | |||
| [] | |||
| @@ -24,3 +24,5 @@ func := { | |||
| {retval} | |||
| } | |||
| print func()() | |||
| print {0} | |||
| @@ -2,3 +2,4 @@ hello | |||
| Hello World | |||
| 10 | |||
| what's up | |||
| (function) | |||
| @@ -8,3 +8,5 @@ print obj.foo | |||
| obj.bar = {baz: "how's your day going?"} | |||
| print obj.bar.baz | |||
| print {} | |||
| @@ -1,3 +1,4 @@ | |||
| hello world | |||
| 100 | |||
| how's your day going? | |||
| (namespace) | |||
| @@ -0,0 +1,12 @@ | |||
| #!/bin/sh | |||
| set -ex | |||
| box --run -q | |||
| mkdir -p coverage | |||
| gcov $(find bx-out -type f -name '*.o') | |||
| mv *.gcov coverage | |||
| cp $(find bx-out -type f -name '*.gcda' -or -name '*.gcno') coverage | |||
| cd coverage | |||
| lcov --capture --directory . --output-file coverage.info | |||
| genhtml coverage.info --output-directory report | |||
| @@ -111,6 +111,7 @@ static void check_impl(const char *name) { | |||
| vm.std_output = &output.w; | |||
| l2_vm_run(&vm); | |||
| l2_vm_gc(&vm); | |||
| l2_vm_free(&vm); | |||
| free(bytecode.mem); | |||