diff options
| author | Gustav Sörnäs <gustav@sornas.net> | 2021-01-11 16:05:01 +0100 |
|---|---|---|
| committer | Gustav Sörnäs <gustav@sornas.net> | 2021-01-11 16:05:10 +0100 |
| commit | f957f0ba7bce1c1fb18df37cc11bb3906b96735f (patch) | |
| tree | a74900aff74e3bc24d700ec800b39bc13d63084e /tests | |
| parent | 711968ffb31ee06630ed43740fd2538becc2765b (diff) | |
| download | sylt-f957f0ba7bce1c1fb18df37cc11bb3906b96735f.tar.gz | |
test ifs
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/if.tdy | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/if.tdy b/tests/if.tdy new file mode 100644 index 0000000..196e221 --- /dev/null +++ b/tests/if.tdy @@ -0,0 +1,29 @@ +a int := 0 +res int := 0 + +if 1 == 2 { + <!> +} + +a = 1 +if a == 0 { + <!> +} + +a = 1 +res = 0 +if a == 1 { + res = 1 +} +res <=> 1 + +a = 1 +res = 0 +if a == 0 { + <!> +} else if a == 1 { + res = 1 +} else { + <!> +} +res <=> 1 |
