Browse Source

more tests

Vladislav Folts 11 years ago
parent
commit
32effa18fe
1 changed files with 14 additions and 0 deletions
  1. 14 0
      test/input/run/int.ob

+ 14 - 0
test/input/run/int.ob

@@ -0,0 +1,14 @@
+MODULE Test;
+CONST 
+	c1 = 07FFFFFFFH + 1; (* -2147483648 *)
+	c2 = 0FFFFFFFFH * 2; (* -2 *)
+VAR x: INTEGER;
+BEGIN
+    x := 07FFFFFFFH + 1;
+	ASSERT(x = -2147483648);
+	ASSERT(c1 = x);
+
+	x := 0FFFFFFFFH * 2;
+  	ASSERT(x = -2);
+  	ASSERT(c2 = x);
+END Test.