1
0
mirror of https://gitlab.com/camelot/kickc.git synced 2024-11-23 08:32:39 +00:00

fixed problem with triming on string comparisions

This commit is contained in:
Andrzej Sliwa 2020-12-09 16:33:57 +01:00
parent 6466419fd1
commit 3bf8a6f55e
5 changed files with 16 additions and 17 deletions

View File

@ -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"+

View File

@ -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

View File

@ -13,4 +13,3 @@ char __address(var1 + var2) DATA[1000];
void main() { void main() {
SCREEN[0] = DATA[0]; SCREEN[0] = DATA[0];
} }