Carp/run_carp_tests.sh

35 lines
1.0 KiB
Bash
Raw Normal View History

2017-09-08 13:24:57 +03:00
#!/bin/bash
2017-11-22 14:42:32 +03:00
set -e; # will make the script stop if there are any errors
2017-09-08 13:24:57 +03:00
stack build;
stack install;
2017-09-08 13:24:57 +03:00
# Build and run some examples
carp ./examples/basics.carp -x;
carp ./examples/functor.carp -x;
carp ./examples/external_struct.carp -x;
carp ./examples/updating.carp -x;
2018-01-02 10:56:23 +03:00
carp ./examples/globals.carp -x --log-memory;
# Actual tests (using the test suit)
2017-12-23 11:24:16 +03:00
carp ./test/memory.carp -x --log-memory;
2017-11-22 16:12:09 +03:00
carp ./test/double_math.carp -b; ./out/a.out;
carp ./test/float_math.carp -b; ./out/a.out;
carp ./test/int_math.carp -b; ./out/a.out;
carp ./test/long_math.carp -b; ./out/a.out;
2017-11-22 16:12:09 +03:00
carp ./test/safe_artihmetic.carp -b; ./out/a.out;
carp ./test/statistics.carp -b; ./out/a.out;
carp ./test/vector2.carp -b; ./out/a.out;
carp ./test/vector3.carp -b; ./out/a.out;
carp ./test/vectorn.carp -b; ./out/a.out;
2017-12-12 23:42:50 +03:00
carp ./test/control_flow.carp -b; ./out/a.out;
2017-12-15 20:58:31 +03:00
carp ./test/macros.carp -b; ./out/a.out;
# Just make sure these compile
carp ./examples/mutual_recursion.carp -b;
carp ./examples/guessing.carp -b;
carp ./examples/game.carp -b;
2017-12-14 00:09:12 +03:00
echo "ALL TESTS DONE."