From 5bc38ae3c02acb8608d8920cb4cc28e169e8dd60 Mon Sep 17 00:00:00 2001 From: jespergravgaard Date: Thu, 22 Aug 2019 10:36:05 +0200 Subject: [PATCH] Added test for issue --- src/test/java/dk/camelot64/kickc/test/TestPrograms.java | 9 +++++++++ src/test/kc/float-error-message.kc | 7 +++++++ 2 files changed, 16 insertions(+) create mode 100644 src/test/kc/float-error-message.kc diff --git a/src/test/java/dk/camelot64/kickc/test/TestPrograms.java b/src/test/java/dk/camelot64/kickc/test/TestPrograms.java index 528e3d6c7..f562b7391 100644 --- a/src/test/java/dk/camelot64/kickc/test/TestPrograms.java +++ b/src/test/java/dk/camelot64/kickc/test/TestPrograms.java @@ -36,6 +36,15 @@ public class TestPrograms { public TestPrograms() { } + + // TODO: Fix float error message https://gitlab.com/camelot/kickc/issues/286 + /* + @Test + public void testFloatErrorMessage() throws IOException, URISyntaxException { + compileAndCompare("float-error-message"); + } + */ + @Test public void testFunctionAsArray() throws IOException, URISyntaxException { compileAndCompare("function-as-array"); diff --git a/src/test/kc/float-error-message.kc b/src/test/kc/float-error-message.kc new file mode 100644 index 000000000..6af1d6625 --- /dev/null +++ b/src/test/kc/float-error-message.kc @@ -0,0 +1,7 @@ +// Tests what error message an accidental float gives + +char* VIC_MEMORY = 0xd018; + +void main() { + *VIC_MEMORY = 0.14; +} \ No newline at end of file