summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Gunger <kgunger12@gmail.com>2024-03-28 15:39:51 -0400
committerKyle Gunger <kgunger12@gmail.com>2024-03-28 15:39:51 -0400
commit331784f2a05f5b18aed46f257f0f6c8173bc2661 (patch)
tree47e7b752136d9a7cb2e57729d0f0d79c2f2d772f
parent94b766444ae5559a973c1800ea36604e6009d67c (diff)
index test
-rw-r--r--tests/test_index.tnsl5
-rw-r--r--tests/test_pointer_5.tnsl21
2 files changed, 26 insertions, 0 deletions
diff --git a/tests/test_index.tnsl b/tests/test_index.tnsl
new file mode 100644
index 0000000..ede9bc2
--- /dev/null
+++ b/tests/test_index.tnsl
@@ -0,0 +1,5 @@
+~uint8 vals = "EBCDE"
+
+/; main [int]
+ return vals{0}
+;/
diff --git a/tests/test_pointer_5.tnsl b/tests/test_pointer_5.tnsl
new file mode 100644
index 0000000..2534dde
--- /dev/null
+++ b/tests/test_pointer_5.tnsl
@@ -0,0 +1,21 @@
+struct Hold {
+ ~~uint8 a,
+ ~uint8 b
+}
+
+/; method Hold
+
+ /; set (~uint8 to_set)
+ self.b = to_set
+ self.a = ~self.b
+ ;/
+;/
+
+/; main [int]
+ uint8 val = 69
+
+ Hold h
+ h.set(~val)
+
+ return h.a``
+;/