Permalink
Browse files

more tests

  • Loading branch information...
thejoshwolfe committed Dec 7, 2010
1 parent 056075c commit d9ff6565fae75c2d988facf47cf1ad65bd2259c6
View
1 TODO
@@ -5,7 +5,6 @@ Project 4 Release
Bonus:
* actually check constructor parameters
- * combined types
* test for negating non-numeric types
* test for boolean expression in if statement
* test for invalid/valid array indicies with expressions like 8*8-32
@@ -0,0 +1,21 @@
+program testArrayMultiBoundsValid;
+
+class testArrayMultiBoundsValid begin
+ var big : array[0..2] of array[0..2] of Thing;
+ function testArrayMultiBoundsValid; begin
+ big[0,1] := new Thing(44);
+ big[1,1] := new Thing(33);
+ big[0] := big[1];
+ print big[0,1].data;
+ end
+
+end
+
+class Thing begin
+ var data : integer;
+ function Thing(var data2 : integer); begin
+ data := data2;
+ end
+end
+.
+
@@ -0,0 +1 @@
+33

0 comments on commit d9ff656

Please sign in to comment.