mirror of
https://gitlab.com/camelot/kickc.git
synced 2024-11-23 23:32:55 +00:00
parent
00c9b47481
commit
8ba337088d
@ -32,7 +32,7 @@ import java.util.concurrent.Callable;
|
||||
descriptionHeading = "%nDescription:%n%n",
|
||||
parameterListHeading = "%nParameters:%n",
|
||||
optionListHeading = "%nOptions:%n",
|
||||
version = "KickC 0.7.8 BETA (master)"
|
||||
version = "KickC 0.7.9 BETA (master)"
|
||||
)
|
||||
public class KickC implements Callable<Void> {
|
||||
|
||||
|
@ -1390,12 +1390,30 @@ public class TestPrograms {
|
||||
compileAndCompare("examples/plasma/plasma");
|
||||
}
|
||||
|
||||
// TODO: Fix bool auto-conversion type conversion https://gitlab.com/camelot/kickc/issues/199
|
||||
/*
|
||||
@Test
|
||||
public void testBoolNotOperator3() throws IOException, URISyntaxException {
|
||||
compileAndCompare("bool-not-operator-3");
|
||||
}
|
||||
*/
|
||||
|
||||
// TODO: Fix number type conversion https://gitlab.com/camelot/kickc/issues/199
|
||||
/*
|
||||
@Test
|
||||
public void testTernary4() throws IOException, URISyntaxException {
|
||||
compileAndCompare("ternary-4");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBoolNotOperator1() throws IOException, URISyntaxException {
|
||||
compileAndCompare("bool-not-operator-1");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testBoolNotOperator2() throws IOException, URISyntaxException {
|
||||
compileAndCompare("bool-not-operator-2");
|
||||
}
|
||||
*/
|
||||
|
||||
@Test
|
||||
|
13
src/test/kc/bool-not-operator-1.kc
Normal file
13
src/test/kc/bool-not-operator-1.kc
Normal file
@ -0,0 +1,13 @@
|
||||
// Test the boolean NOT operator
|
||||
// Bool not operator used in ternary operator
|
||||
// Fails due to "Number integer type not resolved to fixed size integer type"
|
||||
// https://gitlab.com/camelot/kickc/issues/199
|
||||
|
||||
void main() {
|
||||
const char* screen = 0x0400;
|
||||
for(char i: 0..7) {
|
||||
bool b = (i&1)==1;
|
||||
char c = !b ? 1 : 0 ;
|
||||
screen[i] = c;
|
||||
}
|
||||
}
|
13
src/test/kc/bool-not-operator-2.kc
Normal file
13
src/test/kc/bool-not-operator-2.kc
Normal file
@ -0,0 +1,13 @@
|
||||
// Test the boolean NOT operator
|
||||
// Bool not operator used on char in ternary operator
|
||||
// Fails due to "Number integer type not resolved to fixed size integer type"
|
||||
// https://gitlab.com/camelot/kickc/issues/199
|
||||
|
||||
void main() {
|
||||
const char* screen = 0x0400;
|
||||
for(char i: 0..7) {
|
||||
char b = i&1;
|
||||
char c = !b ? 1 : 0 ;
|
||||
screen[i] = c;
|
||||
}
|
||||
}
|
12
src/test/kc/bool-not-operator-3.kc
Normal file
12
src/test/kc/bool-not-operator-3.kc
Normal file
@ -0,0 +1,12 @@
|
||||
// Test the boolean NOT operator
|
||||
// Bool not operator used directly on char
|
||||
// Causes a Type mismatch - should instead add conversion cast.
|
||||
// https://gitlab.com/camelot/kickc/issues/295
|
||||
|
||||
void main() {
|
||||
const char* screen = 0x0400;
|
||||
for(char i: 0..7) {
|
||||
char b = (i&1);
|
||||
screen[i] = !b;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user