1
0
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:
jespergravgaard 2019-05-13 09:24:23 +02:00
parent 3d56f3705a
commit 6e0b665423
2 changed files with 14 additions and 0 deletions

View File

@ -32,6 +32,11 @@ public class TestPrograms {
public TestPrograms() { public TestPrograms() {
} }
@Test
public void testMixedArray1() throws IOException, URISyntaxException {
compileAndCompare("mixed-array-1", log());
}
@Test @Test
public void testMixedArray0() throws IOException, URISyntaxException { public void testMixedArray0() throws IOException, URISyntaxException {
compileAndCompare("mixed-array-0"); compileAndCompare("mixed-array-0");

View 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];
}