diff options
author | Kyle Gunger <corechg@gmail.com> | 2020-07-08 17:02:34 -0400 |
---|---|---|
committer | Kyle Gunger <corechg@gmail.com> | 2020-07-08 17:02:34 -0400 |
commit | 8db6eccbd4678305bf7fcb66effa1a57d929db34 (patch) | |
tree | f5d4059fb81291329d33767436403e2090b62525 /tests | |
parent | 08fabe9627d89b9811b0fafe1c2bb11773d02bbc (diff) |
Update tree structure
Diffstat (limited to 'tests')
-rw-r--r-- | tests/block-test.tnsl | 20 | ||||
-rw-r--r-- | tests/literal-test.tnsl | 21 |
2 files changed, 38 insertions, 3 deletions
diff --git a/tests/block-test.tnsl b/tests/block-test.tnsl index 14663f3..a05ca60 100644 --- a/tests/block-test.tnsl +++ b/tests/block-test.tnsl @@ -2,14 +2,32 @@ /;if (i==0) ;i = 2 -;//;else + +;/ +/;else ;i = 0 + ;/ # ;; can be used as a quick block re-definition /;if (i==0) ;i = 2 + ;;else ;i = 0 + +;/ + +/;if + ;char ch = '\n' + +;;else + ;int it = 90 + +;/ + +/;main + ; + ;/
\ No newline at end of file diff --git a/tests/literal-test.tnsl b/tests/literal-test.tnsl index a7fd81e..b447e57 100644 --- a/tests/literal-test.tnsl +++ b/tests/literal-test.tnsl @@ -1,10 +1,27 @@ +# These should all work ;string s = "\"" ;string st="\\" ;int i = 0 ;int j=1 -;float f = .2 +;float f = 0.2 ;float d=3.1415 -;char c = '\'';char ch='\uxxxx' +;char c = '\'';char ch='\u0000' + +# Invalid (some may be weeded out through the verify phase): + +;string s "" + +;int 0 i + +# Invalid ops should also be detected if dealing with literals + +;char c ~= 's' + +# Debate over weather these are legal + +;int k = .1 + +;int l = 0x01
\ No newline at end of file |