summaryrefslogtreecommitdiff
path: root/tiger-compiler/tests/type/lower_than_array.tig
diff options
context:
space:
mode:
Diffstat (limited to 'tiger-compiler/tests/type/lower_than_array.tig')
-rw-r--r--tiger-compiler/tests/type/lower_than_array.tig20
1 files changed, 20 insertions, 0 deletions
diff --git a/tiger-compiler/tests/type/lower_than_array.tig b/tiger-compiler/tests/type/lower_than_array.tig
new file mode 100644
index 0000000..9e78236
--- /dev/null
+++ b/tiger-compiler/tests/type/lower_than_array.tig
@@ -0,0 +1,20 @@
+let
+ type arr = array of int
+ var arr1 := arr[5] of 0
+ var arr2 := arr[5] of 1
+in
+ if (arr1 < arr2) then
+ print("lower");
+
+ if (arr1 <= arr2) then
+ print("lower or equal");
+
+ if (arr1 = arr2) then
+ print("equal");
+
+ if (arr1 >= arr2) then
+ print("higher or equal");
+
+ if (arr1 > arr2) then
+ print("higher")
+end