View | Details | Raw Unified | Return to bug 161674
Collapse All | Expand All

(-)src/org/eclipse/jdt/core/tests/model/AbstractJavaModelTests.java (+13 lines)
Lines 525-530 Link Here
525
			expected,
525
			expected,
526
			actual);
526
			actual);
527
	}
527
	}
528
529
	protected void assertDeltas(String message, String expected[]) {
530
		String actual = this.deltaListener.toString();
531
		for (int i = 0; i < expected.length; i++) {
532
			// If any one of the expected values matches, we are done
533
			if (expected[i].equals(actual)) return;
534
		}
535
536
		System.out.println(displayString(actual, 2));
537
		System.err.println(this.deltaListener.stackTraces.toString());
538
		assertTrue(message, false);
539
	}
540
	
528
	protected void assertDeltas(String message, String expected, IJavaElementDelta delta) {
541
	protected void assertDeltas(String message, String expected, IJavaElementDelta delta) {
529
		String actual = delta == null ? "<null>" : delta.toString();
542
		String actual = delta == null ? "<null>" : delta.toString();
530
		if (!expected.equals(actual)) {
543
		if (!expected.equals(actual)) {
(-)src/org/eclipse/jdt/core/tests/model/ReconcilerTests.java (-6 / +9 lines)
Lines 1072-1083 Link Here
1072
		"public class X {\n" +
1072
		"public class X {\n" +
1073
		"}");
1073
		"}");
1074
	this.workingCopy.reconcile(ICompilationUnit.NO_AST, false, null, null);
1074
	this.workingCopy.reconcile(ICompilationUnit.NO_AST, false, null, null);
1075
	assertDeltas(
1075
	
1076
		"Unexpected delta", 
1076
	String expectedDeltas[] = {"X[*]: {CHILDREN | FINE GRAINED}\n" +
1077
		"X[*]: {CHILDREN | FINE GRAINED}\n" +
1077
			"	bar()[-]: {}\n" +
1078
		"	bar()[-]: {}\n" +
1078
			"	foo()[-]: {}", "X[*]: {CHILDREN | FINE GRAINED}\n" +
1079
		"	foo()[-]: {}"
1079
			"	foo()[-]: {}\n" +
1080
	);
1080
			"	bar()[-]: {}"};
1081
	
1082
	assertDeltas("Unexpected delta", expectedDeltas);
1083
	
1081
}
1084
}
1082
/*
1085
/*
1083
 * Ensures that excluded part of prereq project are not visible
1086
 * Ensures that excluded part of prereq project are not visible

Return to bug 161674