mirror of
https://gitlab.com/camelot/kickc.git
synced 2024-11-26 12:49:21 +00:00
fixed problem with triming on string comparisions
This commit is contained in:
parent
6466419fd1
commit
3bf8a6f55e
@ -47,7 +47,7 @@ abstract class ReferenceHelper {
|
|||||||
String outLine = outLines.get(i);
|
String outLine = outLines.get(i);
|
||||||
if(refLines.size()>i) {
|
if(refLines.size()>i) {
|
||||||
String refLine = refLines.get(i);
|
String refLine = refLines.get(i);
|
||||||
if(!outLine.equals(refLine)) {
|
if(!outLine.trim().equals(refLine.trim())) {
|
||||||
writeOutputFile(fileName, extension, outputString);
|
writeOutputFile(fileName, extension, outputString);
|
||||||
System.out.println(
|
System.out.println(
|
||||||
"Output does not match reference on line "+i+"\n"+
|
"Output does not match reference on line "+i+"\n"+
|
||||||
|
@ -1066,7 +1066,7 @@ public class TestPrograms {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testAddressWithExpressionValue() throws IOException, URISyntaxException {
|
public void testAddressWithExpressionValue() throws IOException, URISyntaxException {
|
||||||
compileAndCompare("address-with-expression-value.c");
|
compileAndCompare("address-with-expression-value.c", log());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
@ -13,4 +13,3 @@ char __address(var1 + var2) DATA[1000];
|
|||||||
void main() {
|
void main() {
|
||||||
SCREEN[0] = DATA[0];
|
SCREEN[0] = DATA[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,6 +4,6 @@ main: scope:[main] from
|
|||||||
[0] *SCREEN = *DATA
|
[0] *SCREEN = *DATA
|
||||||
to:main::@return
|
to:main::@return
|
||||||
main::@return: scope:[main] from main
|
main::@return: scope:[main] from main
|
||||||
[1] return
|
[1] return
|
||||||
to:@return
|
to:@return
|
||||||
|
|
||||||
|
@ -6,17 +6,17 @@ main: scope:[main] from __start
|
|||||||
SCREEN[0] = DATA[0]
|
SCREEN[0] = DATA[0]
|
||||||
to:main::@return
|
to:main::@return
|
||||||
main::@return: scope:[main] from main
|
main::@return: scope:[main] from main
|
||||||
return
|
return
|
||||||
to:@return
|
to:@return
|
||||||
|
|
||||||
void __start()
|
void __start()
|
||||||
__start: scope:[__start] from
|
__start: scope:[__start] from
|
||||||
call main
|
call main
|
||||||
to:__start::@1
|
to:__start::@1
|
||||||
__start::@1: scope:[__start] from __start
|
__start::@1: scope:[__start] from __start
|
||||||
to:__start::@return
|
to:__start::@return
|
||||||
__start::@return: scope:[__start] from __start::@1
|
__start::@return: scope:[__start] from __start::@1
|
||||||
return
|
return
|
||||||
to:@return
|
to:@return
|
||||||
|
|
||||||
SYMBOL TABLE SSA
|
SYMBOL TABLE SSA
|
||||||
@ -55,7 +55,7 @@ main: scope:[main] from
|
|||||||
[0] *SCREEN = *DATA
|
[0] *SCREEN = *DATA
|
||||||
to:main::@return
|
to:main::@return
|
||||||
main::@return: scope:[main] from main
|
main::@return: scope:[main] from main
|
||||||
[1] return
|
[1] return
|
||||||
to:@return
|
to:@return
|
||||||
|
|
||||||
|
|
||||||
@ -65,14 +65,14 @@ void main()
|
|||||||
Initial phi equivalence classes
|
Initial phi equivalence classes
|
||||||
Complete equivalence classes
|
Complete equivalence classes
|
||||||
REGISTER UPLIFT POTENTIAL REGISTERS
|
REGISTER UPLIFT POTENTIAL REGISTERS
|
||||||
Statement [0] *SCREEN = *DATA [ ] ( [ ] { } ) always clobbers reg byte a
|
Statement [0] *SCREEN = *DATA [ ] ( [ ] { } ) always clobbers reg byte a
|
||||||
|
|
||||||
REGISTER UPLIFT SCOPES
|
REGISTER UPLIFT SCOPES
|
||||||
Uplift Scope [main]
|
Uplift Scope [main]
|
||||||
Uplift Scope []
|
Uplift Scope []
|
||||||
|
|
||||||
Uplifting [main] best 17 combination
|
Uplifting [main] best 17 combination
|
||||||
Uplifting [] best 17 combination
|
Uplifting [] best 17 combination
|
||||||
|
|
||||||
ASSEMBLER BEFORE OPTIMIZATION
|
ASSEMBLER BEFORE OPTIMIZATION
|
||||||
// File Comments
|
// File Comments
|
||||||
@ -86,13 +86,13 @@ ASSEMBLER BEFORE OPTIMIZATION
|
|||||||
.label SCREEN = $400
|
.label SCREEN = $400
|
||||||
// main
|
// main
|
||||||
main: {
|
main: {
|
||||||
// [0] *SCREEN = *DATA -- _deref_pbuc1=_deref_pbuc2
|
// [0] *SCREEN = *DATA -- _deref_pbuc1=_deref_pbuc2
|
||||||
lda DATA
|
lda DATA
|
||||||
sta SCREEN
|
sta SCREEN
|
||||||
jmp __breturn
|
jmp __breturn
|
||||||
// main::@return
|
// main::@return
|
||||||
__breturn:
|
__breturn:
|
||||||
// [1] return
|
// [1] return
|
||||||
rts
|
rts
|
||||||
}
|
}
|
||||||
// File Data
|
// File Data
|
||||||
@ -128,12 +128,12 @@ Score: 14
|
|||||||
// main
|
// main
|
||||||
main: {
|
main: {
|
||||||
// SCREEN[0] = DATA[0]
|
// SCREEN[0] = DATA[0]
|
||||||
// [0] *SCREEN = *DATA -- _deref_pbuc1=_deref_pbuc2
|
// [0] *SCREEN = *DATA -- _deref_pbuc1=_deref_pbuc2
|
||||||
lda DATA
|
lda DATA
|
||||||
sta SCREEN
|
sta SCREEN
|
||||||
// main::@return
|
// main::@return
|
||||||
// }
|
// }
|
||||||
// [1] return
|
// [1] return
|
||||||
rts
|
rts
|
||||||
}
|
}
|
||||||
// File Data
|
// File Data
|
||||||
|
Loading…
Reference in New Issue
Block a user