From 7b009880ad7a4182d3fa8d84468526d0d30d8844 Mon Sep 17 00:00:00 2001 From: Kyle Gunger Date: Fri, 15 Mar 2024 17:27:21 -0400 Subject: Slightly better function call --- tests/run.sh | 9 +++++++++ tests/test_controll.tnsl | 12 ------------ tests/test_method_2.tnsl | 2 +- 3 files changed, 10 insertions(+), 13 deletions(-) create mode 100755 tests/run.sh delete mode 100644 tests/test_controll.tnsl (limited to 'tests') diff --git a/tests/run.sh b/tests/run.sh new file mode 100755 index 0000000..136dac1 --- /dev/null +++ b/tests/run.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +mkdir -p ./out/artifact +filename=$1 +filename="${filename%.*}" +../ctc $1 out/artifact/$filename.asm +nasm -f elf64 -o ./out/artifact/$filename.o ./out/artifact/$filename.asm +gcc -o ./out/$filename ./out/artifact/$filename.o + diff --git a/tests/test_controll.tnsl b/tests/test_controll.tnsl deleted file mode 100644 index 47ff241..0000000 --- a/tests/test_controll.tnsl +++ /dev/null @@ -1,12 +0,0 @@ -/; main [int] - - /; if (false) - return 1 - ;; else if (1 == 0) - return 2 - ;; else - return 69 - ;/ - - return 0 -;/ diff --git a/tests/test_method_2.tnsl b/tests/test_method_2.tnsl index 899cdcb..56b3419 100644 --- a/tests/test_method_2.tnsl +++ b/tests/test_method_2.tnsl @@ -12,6 +12,6 @@ struct Vector { /; main [int] Vector a - a.init(1) + a.init(69) return a._elsz ;/ -- cgit v1.2.3