diff options
author | Kyle Gunger <kgunger12@gmail.com> | 2024-03-12 00:23:28 -0400 |
---|---|---|
committer | Kyle Gunger <kgunger12@gmail.com> | 2024-03-12 00:23:28 -0400 |
commit | 644a06a5b13b5a129528618050a9dff4f5281be8 (patch) | |
tree | 31bf53b6b2555940965abad59346ea8ec6817a1e /tests | |
parent | 6ff62d5fe2aebc78b3bc2930c7318d6ce288b61b (diff) |
update tests
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_funcall_3.tnsl | 9 | ||||
-rw-r--r-- | tests/test_funcall_4.tnsl | 16 | ||||
-rw-r--r-- | tests/test_pointer.tnsl | 11 |
3 files changed, 30 insertions, 6 deletions
diff --git a/tests/test_funcall_3.tnsl b/tests/test_funcall_3.tnsl index b974ea7..0a77bf0 100644 --- a/tests/test_funcall_3.tnsl +++ b/tests/test_funcall_3.tnsl @@ -9,8 +9,11 @@ struct Str { return out ;/ +/; strin (Str in) [int] + return in.i +;/ + /; main [int] - Str out - out = strout() - return out.j + out.i + Str out = strout() + return strin(out) + out.j ;/ diff --git a/tests/test_funcall_4.tnsl b/tests/test_funcall_4.tnsl new file mode 100644 index 0000000..4309766 --- /dev/null +++ b/tests/test_funcall_4.tnsl @@ -0,0 +1,16 @@ +struct Dummy { + int i, j +} + +/; inout (Dummy in) [Dummy] + in.i = 68 + return in +;/ + +/; main [int] + Dummy a + a.i = 1 + a.j = 1 + a = inout(a) + return a.i + a.j +;/ diff --git a/tests/test_pointer.tnsl b/tests/test_pointer.tnsl index 5fe1a36..1b264b4 100644 --- a/tests/test_pointer.tnsl +++ b/tests/test_pointer.tnsl @@ -1,6 +1,11 @@ +struct Dummy { + int i, j +} + /; main [int] - int i = 0 - ~int j = ~i + Dummy i + i.i = 0 + ~int j = ~i.i j` = 69 - return i + return i.i ;/ |