☰
Debian Codegraph
@
1.5.5.8-1
/
/
src
/
test
/
01-Basic
/
122.ck
☽
☼
src/test/01-Basic/122.ck
code
plain
raw
GPL-2.0+
2004 Ge Wang and Perry R. Cook. All rights reserved.
debian/copyright
1
// negative array index access tests
2
[1,2,3,4] @=> int a[];
3
4
// failure cases
5
if( a[-1] != 4 ) <<< "FAILURE, expecting 4" >>>;
6
if( a[-4] != 1 ) <<< "FAILURE, expecting 1" >>>;
7
8
// should generate a array out of bounds
9
a[-5];