Add array tests
This commit is contained in:
parent
bf4a08e484
commit
8397d32756
|
@ -0,0 +1,5 @@
|
|||
//invalid,Attempted an out of bounds read for array test (5 >= 4) at 5:12:END:
|
||||
|
||||
arr test { bool 4 }
|
||||
|
||||
5 test.read deq
|
|
@ -0,0 +1,5 @@
|
|||
//invalid,Attempted an out of bounds write for array test (5 >= 4) at 5:19:END:
|
||||
|
||||
arr test { bool 4 }
|
||||
|
||||
5 false test.write
|
|
@ -0,0 +1,5 @@
|
|||
//invalid,Attempted an out of bounds read for array test (-1 < 0) at 5:13:END:
|
||||
|
||||
arr test { bool 4 }
|
||||
|
||||
-1 test.read deq
|
|
@ -0,0 +1,5 @@
|
|||
//invalid,Attempted an out of bounds write for array test (-1 < 0) at 5:19:END:
|
||||
|
||||
arr test { bool 4 }
|
||||
|
||||
-1 true test.write
|
|
@ -0,0 +1,25 @@
|
|||
//valid,0000
|
||||
//0100
|
||||
//2100
|
||||
//2103
|
||||
//:END:
|
||||
arr test { int 4 }
|
||||
|
||||
function => dump
|
||||
{
|
||||
true 0
|
||||
while
|
||||
{
|
||||
dup test.read req print
|
||||
1 + test.length dup < req
|
||||
}
|
||||
deq "" println
|
||||
}
|
||||
|
||||
dump
|
||||
1 1 test.write
|
||||
dump
|
||||
0 2 test.write
|
||||
dump
|
||||
3 3 test.write
|
||||
dump
|
Loading…
Reference in New Issue