View | Details | Raw Unified | Return to bug 99978 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/jdt/core/tests/dom/ASTConverterTest2.java (-1 / +23 lines)
Lines 42-48 Link Here
42
	}
42
	}
43
43
44
	static {
44
	static {
45
//		TESTS_NAMES = new String[] {"test0573"};
45
		TESTS_NAMES = new String[] {"test0575"};
46
//		TESTS_NUMBERS =  new int[] { 606 };
46
//		TESTS_NUMBERS =  new int[] { 606 };
47
	}
47
	}
48
	public static Test suite() {
48
	public static Test suite() {
Lines 5316-5321 Link Here
5316
		}
5316
		}
5317
	}
5317
	}
5318
	
5318
	
5319
	/*
5320
	 * Ensures that 2 different method bindings with the same return type are not "isEqualTo(...)".
5321
	 * (regression test for bug 99978 MalformedTreeException on Inline Method)
5322
	 */
5323
	public void test0575() throws JavaModelException {
5324
		ICompilationUnit workingCopy = null;
5325
		try {
5326
    		workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/);
5327
	    	String contents =
5328
				"public class X {\n" + 
5329
				"	/*start1*/String foo(String o) {}/*end1*/\n" + 
5330
				"	/*start2*/String foo(Object o) {}/*end2*/\n" + 
5331
				"}";
5332
		   	IBinding[] firstBatch = resolveBindings(contents, workingCopy);
5333
		   	IBinding[] secondBatch = resolveBindings(contents, workingCopy);
5334
		   	assertTrue("2 different method type bindings should not be equals", !firstBatch[0].isEqualTo(secondBatch[1]));
5335
		} finally {
5336
			if (workingCopy != null)
5337
				workingCopy.discardWorkingCopy();
5338
		}
5339
	}
5340
	
5319
	public void test0606() throws JavaModelException {
5341
	public void test0606() throws JavaModelException {
5320
		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0606", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
5342
		ICompilationUnit sourceUnit = getCompilationUnit("Converter", "src", "test0606", "X.java"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
5321
		ASTNode result = runConversion(sourceUnit, true);
5343
		ASTNode result = runConversion(sourceUnit, true);

Return to bug 99978