diff --git a/src/test/java/dk/camelot64/kickc/test/TestProgramsFast.java b/src/test/java/dk/camelot64/kickc/test/TestProgramsFast.java index ad3dbdf7a..76df2b851 100644 --- a/src/test/java/dk/camelot64/kickc/test/TestProgramsFast.java +++ b/src/test/java/dk/camelot64/kickc/test/TestProgramsFast.java @@ -9,6 +9,11 @@ import java.io.IOException; */ public class TestProgramsFast extends TestPrograms { + @Test + public void testMakeLong42() throws IOException { + assertError("makelong4-2.c", "Wrong number of parameters in call. Expected 4."); + } + @Test public void testMakeLong41() throws IOException { compileAndCompare("makelong4-1.c"); diff --git a/src/test/kc/makelong4-2.c b/src/test/kc/makelong4-2.c new file mode 100644 index 000000000..73b5719c6 --- /dev/null +++ b/src/test/kc/makelong4-2.c @@ -0,0 +1,6 @@ +// Test MAKELONG4() with to few parameters + +void main() { + unsigned long* const SCREEN = (unsigned int*)0x0400; + *SCREEN = MAKELONG4(1, 2, 3); +} \ No newline at end of file