diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_method_2.tnsl | 17 | ||||
-rw-r--r-- | tests/test_pointer_2.tnsl | 6 |
2 files changed, 23 insertions, 0 deletions
diff --git a/tests/test_method_2.tnsl b/tests/test_method_2.tnsl new file mode 100644 index 0000000..899cdcb --- /dev/null +++ b/tests/test_method_2.tnsl @@ -0,0 +1,17 @@ +struct Vector { + ~void data, + int count, size, _elsz +} + +/; method Vector + + /; init (int elsz) + self._elsz = elsz + ;/ +;/ + +/; main [int] + Vector a + a.init(1) + return a._elsz +;/ diff --git a/tests/test_pointer_2.tnsl b/tests/test_pointer_2.tnsl new file mode 100644 index 0000000..5fe1a36 --- /dev/null +++ b/tests/test_pointer_2.tnsl @@ -0,0 +1,6 @@ +/; main [int] + int i = 0 + ~int j = ~i + j` = 69 + return i +;/ |