diff --git a/src/test/java/dk/camelot64/kickc/test/TestPrograms.java b/src/test/java/dk/camelot64/kickc/test/TestPrograms.java index ca909666e..83498d3aa 100644 --- a/src/test/java/dk/camelot64/kickc/test/TestPrograms.java +++ b/src/test/java/dk/camelot64/kickc/test/TestPrograms.java @@ -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"); diff --git a/src/test/kc/mixed-array-1.kc b/src/test/kc/mixed-array-1.kc new file mode 100644 index 000000000..b3c7880b6 --- /dev/null +++ b/src/test/kc/mixed-array-1.kc @@ -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]; +} \ No newline at end of file