1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2025-01-12 11:31:11 +00:00

Added failing test for for(;;).

This commit is contained in:
jespergravgaard 2020-07-05 18:38:55 +02:00
parent a74d02203e
commit 837ce228ac
3 changed files with 15 additions and 1 deletions

View File

@ -42,6 +42,11 @@ public class TestPrograms {
public TestPrograms() { public TestPrograms() {
} }
//@Test
//public void testForEver() throws IOException, URISyntaxException {
// compileAndCompare("for-ever.c");
//}
@Test @Test
public void testPointerToPointerProblem() throws IOException, URISyntaxException { public void testPointerToPointerProblem() throws IOException, URISyntaxException {
compileAndCompare("pointer-to-pointer-problem.c"); compileAndCompare("pointer-to-pointer-problem.c");

View File

@ -8,7 +8,7 @@
#include <nes.h> #include <nes.h>
#include <string.h> #include <string.h>
#include "lazynes.c" #include "lazynes.c"
#include "lazyhello.c" #include "balloon.c"
// RESET Called when the NES is reset, including when it is turned on. // RESET Called when the NES is reset, including when it is turned on.
void main() { void main() {

9
src/test/kc/for-ever.c Normal file
View File

@ -0,0 +1,9 @@
// Test a for() loop that runs forever
char * const SCREEN = 0x0400;
void main() {
for (;;) {
(*SCREEN)++;
}
}