diff --git a/src/test/java/dk/camelot64/kickc/test/TestPrograms.java b/src/test/java/dk/camelot64/kickc/test/TestPrograms.java index a87605b4f..fcf2d85ad 100644 --- a/src/test/java/dk/camelot64/kickc/test/TestPrograms.java +++ b/src/test/java/dk/camelot64/kickc/test/TestPrograms.java @@ -45,6 +45,11 @@ public class TestPrograms { AsmFragmentTemplateUsages.logUsages(log, false, false, false, false, false, false); } + @Test + public void testBoolMin() throws IOException, URISyntaxException { + compileAndCompare("bool-min"); + } + @Test public void testInlineString3() throws IOException, URISyntaxException { try { diff --git a/src/test/java/dk/camelot64/kickc/test/kc/bool-min.kc b/src/test/java/dk/camelot64/kickc/test/kc/bool-min.kc new file mode 100644 index 000000000..9db9d5558 --- /dev/null +++ b/src/test/java/dk/camelot64/kickc/test/kc/bool-min.kc @@ -0,0 +1,11 @@ +// A Minimal test of boolean variables. +// Boolean variables are bytes under the hood +// 0: false, !=0 : true + +void main() { + const byte* SCREEN = $400; + boolean b = true; + if(b) { + *SCREEN = 't'; + } +} \ No newline at end of file