From 3ad844ada1cee95facf21f7e68ac5c37c1bbadf4 Mon Sep 17 00:00:00 2001 From: jespergravgaard Date: Thu, 13 May 2021 11:42:07 +0200 Subject: [PATCH] Fixed problem with auto-casting parameters. Closes #299 --- src/test/java/dk/camelot64/kickc/test/TestProgramsFast.java | 6 +----- src/test/kc/parameter-autocast-wrong.c | 3 +-- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/test/java/dk/camelot64/kickc/test/TestProgramsFast.java b/src/test/java/dk/camelot64/kickc/test/TestProgramsFast.java index 99aa9bd02..efcf2231f 100644 --- a/src/test/java/dk/camelot64/kickc/test/TestProgramsFast.java +++ b/src/test/java/dk/camelot64/kickc/test/TestProgramsFast.java @@ -1289,19 +1289,15 @@ public class TestProgramsFast extends TestPrograms { compileAndCompare("string-pointer-problem.c"); } - @Test public void testZpCode() throws IOException { compileAndCompare("examples/c64/zpcode/zpcode.c"); } - // Fix parameter type problem - https://gitlab.com/camelot/kickc/issues/299 - /* @Test public void testParameterAutocastWrong() throws IOException { - compileAndCompare("parameter-autocast-wrong.c"); + assertError("parameter-autocast-wrong.c", "Parameters type mismatch in call"); } - */ @Test public void testConstBool0() throws IOException { diff --git a/src/test/kc/parameter-autocast-wrong.c b/src/test/kc/parameter-autocast-wrong.c index 1ea289634..bbc4e2caa 100644 --- a/src/test/kc/parameter-autocast-wrong.c +++ b/src/test/kc/parameter-autocast-wrong.c @@ -1,5 +1,4 @@ -// Illustrates problem with wrong autocasting of parameters -// Program wrongly reports Unknown fragment error - while it should have reported type problem (char != char*) +// Illustrates problem with wrong type of parameters char message[] = "CHAO0029 OPERATING SYSTEM STARTING...";