mirror of
https://gitlab.com/camelot/kickc.git
synced 2025-01-23 09:33:30 +00:00
Added an array initializer with negative values.
This commit is contained in:
parent
3d56f3705a
commit
6e0b665423
@ -32,6 +32,11 @@ public class TestPrograms {
|
||||
public TestPrograms() {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMixedArray1() throws IOException, URISyntaxException {
|
||||
compileAndCompare("mixed-array-1", log());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testMixedArray0() throws IOException, URISyntaxException {
|
||||
compileAndCompare("mixed-array-0");
|
||||
|
9
src/test/kc/mixed-array-1.kc
Normal file
9
src/test/kc/mixed-array-1.kc
Normal file
@ -0,0 +1,9 @@
|
||||
// Test an array with mixed byte/number types
|
||||
|
||||
void main() {
|
||||
signed byte[] msg = { -1, 0, 1 };
|
||||
signed byte* SCREEN = 0x400;
|
||||
SCREEN[0] = msg[0];
|
||||
SCREEN[1] = msg[1];
|
||||
SCREEN[2] = msg[2];
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user