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

Collapse All | Expand All

(-)src/org/eclipse/jdt/core/tests/dom/CompatibilityRulesTests.java (-6 / +35 lines)
Lines 28-41 Link Here
28
	}
28
	}
29
29
30
	public static Test suite() {
30
	public static Test suite() {
31
		if (false) {
31
		return buildTestSuite(CompatibilityRulesTests.class);
32
			Suite suite = new Suite(CompatibilityRulesTests.class.getName());
33
			suite.addTest(new CompatibilityRulesTests("test027"));
34
			return suite;
35
		}
36
		return new Suite(CompatibilityRulesTests.class);
37
	}
32
	}
38
	
33
	
34
	// Use this static initializer to specify subset for tests
35
	// All specified tests which do not belong to the class are skipped...
36
	static {
37
//		TESTS_PREFIX =  "testBug86380";
38
//		TESTS_NAMES = new String[] { "test030" };
39
//		TESTS_NUMBERS = new int[] { 83230 };
40
//		TESTS_RANGE = new int[] { 83304, -1 };
41
		}
42
	
39
	public void setUpSuite() throws Exception {
43
	public void setUpSuite() throws Exception {
40
		super.setUpSuite();
44
		super.setUpSuite();
41
		createJavaProject("P", new String[] {""}, new String[] {"JCL15_LIB"}, "", "1.5");
45
		createJavaProject("P", new String[] {""}, new String[] {"JCL15_LIB"}, "", "1.5");
Lines 640-643 Link Here
640
		assertTrue("Y#bar() should not override X#foo()", !bindings[0].overrides(bindings[1]));
644
		assertTrue("Y#bar() should not override X#foo()", !bindings[0].overrides(bindings[1]));
641
	}
645
	}
642
646
647
	/*
648
	 * Ensures that a method in a subtype overrides a method the super parameterized type.
649
	 */
650
	public void test030() throws JavaModelException {
651
		IMethodBinding[] bindings = createMethodBindings(
652
			new String[] {
653
				"/P/p1/X.java",
654
				"package p1;\n" +
655
				"public class X<T> {\n" +
656
				"  void foo(T t) {\n" +
657
				"  }\n" +
658
				"}",
659
				"/P/p1/Y.java",
660
				"package p1;\n" +
661
				"public class Y extends X<String> {\n" +
662
				"  void foo(String s) {\n" +
663
				"  }\n" +
664
				"}",
665
			},
666
			new String[] {
667
				"Lp1/Y;.foo(Ljava/lang/String;)V",
668
				"Lp1/X;.foo(TT;)V"
669
			});	
670
		assertTrue("Y#foo(String) should override X#foo(T)", bindings[0].overrides(bindings[1]));
671
	}
643
}
672
}

Return to bug 99608