summaryrefslogtreecommitdiff
path: root/tiger-compiler/tests/desugar/desugar_basic_strcmp.tig
diff options
context:
space:
mode:
Diffstat (limited to 'tiger-compiler/tests/desugar/desugar_basic_strcmp.tig')
-rw-r--r--tiger-compiler/tests/desugar/desugar_basic_strcmp.tig34
1 files changed, 34 insertions, 0 deletions
diff --git a/tiger-compiler/tests/desugar/desugar_basic_strcmp.tig b/tiger-compiler/tests/desugar/desugar_basic_strcmp.tig
new file mode 100644
index 0000000..1bcbd3b
--- /dev/null
+++ b/tiger-compiler/tests/desugar/desugar_basic_strcmp.tig
@@ -0,0 +1,34 @@
+let
+ var left := "Bonjour"
+ var right := "Hello there"
+in
+ (if (left = right) then
+ print("Same")
+ else
+ print("Different");
+
+ if (left <> right) then
+ print("Different")
+ else
+ print("Same");
+
+ if (left > right) then
+ print("L > R")
+ else
+ print("L <= R");
+
+ if (left >= right) then
+ print("L => R")
+ else
+ print("L < R");
+
+ if (left < right) then
+ print("L < R")
+ else
+ print("L => R");
+
+ if (left <= right) then
+ print("L <= R")
+ else
+ print("L > R"))
+end