Lines 995-1009
Link Here
|
995 |
assertStringsEqual(message, expected, strings); |
995 |
assertStringsEqual(message, expected, strings); |
996 |
} |
996 |
} |
997 |
protected void assertStringsEqual(String message, String expected, String[] strings) { |
997 |
protected void assertStringsEqual(String message, String expected, String[] strings) { |
998 |
String actual = toString(strings, true/*add extra new lines*/); |
998 |
String actual = org.eclipse.jdt.core.tests.util.Util.toString(strings, true/*add extra new lines*/); |
999 |
if (!expected.equals(actual)) { |
999 |
if (!expected.equals(actual)) { |
1000 |
System.out.println(displayString(actual, this.tabs) + this.endChar); |
1000 |
System.out.println(displayString(actual, this.tabs) + this.endChar); |
1001 |
} |
1001 |
} |
1002 |
assertEquals(message, expected, actual); |
1002 |
assertEquals(message, expected, actual); |
1003 |
} |
1003 |
} |
1004 |
protected void assertStringsEqual(String message, String[] expectedStrings, String[] actualStrings) { |
1004 |
protected void assertStringsEqual(String message, String[] expectedStrings, String[] actualStrings) { |
1005 |
String expected = toString(expectedStrings, false/*don't add extra new lines*/); |
1005 |
String expected = org.eclipse.jdt.core.tests.util.Util.toString(expectedStrings, false/*don't add extra new lines*/); |
1006 |
String actual = toString(actualStrings, false/*don't add extra new lines*/); |
1006 |
String actual = org.eclipse.jdt.core.tests.util.Util.toString(actualStrings, false/*don't add extra new lines*/); |
1007 |
if (!expected.equals(actual)) { |
1007 |
if (!expected.equals(actual)) { |
1008 |
System.out.println(displayString(actual, this.tabs) + this.endChar); |
1008 |
System.out.println(displayString(actual, this.tabs) + this.endChar); |
1009 |
} |
1009 |
} |
Lines 2774-2790
Link Here
|
2774 |
} |
2774 |
} |
2775 |
|
2775 |
|
2776 |
protected String toString(String[] strings) { |
2776 |
protected String toString(String[] strings) { |
2777 |
return toString(strings, false/*don't add extra new line*/); |
2777 |
return org.eclipse.jdt.core.tests.util.Util.toString(strings, false/*don't add extra new line*/); |
2778 |
} |
|
|
2779 |
protected String toString(String[] strings, boolean addExtraNewLine) { |
2780 |
if (strings == null) return "null"; |
2781 |
StringBuffer buffer = new StringBuffer(); |
2782 |
for (int i = 0, length = strings.length; i < length; i++){ |
2783 |
buffer.append(strings[i]); |
2784 |
if (addExtraNewLine || i < length - 1) |
2785 |
buffer.append("\n"); |
2786 |
} |
2787 |
return buffer.toString(); |
2788 |
} |
2778 |
} |
2789 |
protected void tearDown() throws Exception { |
2779 |
protected void tearDown() throws Exception { |
2790 |
super.tearDown(); |
2780 |
super.tearDown(); |