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

Collapse All | Expand All

(-)src/org/eclipse/jdt/core/tests/dom/ASTModelBridgeTests.java (-1 / +33 lines)
Lines 42-48 Link Here
42
	// All specified tests which do not belong to the class are skipped...
42
	// All specified tests which do not belong to the class are skipped...
43
	static {
43
	static {
44
//		TESTS_PREFIX =  "testBug86380";
44
//		TESTS_PREFIX =  "testBug86380";
45
//		TESTS_NAMES = new String[] { "testCreateBindings19" };
45
//		TESTS_NAMES = new String[] { "testCreateBindings20" };
46
//		TESTS_NUMBERS = new int[] { 83230 };
46
//		TESTS_NUMBERS = new int[] { 83230 };
47
//		TESTS_RANGE = new int[] { 83304, -1 };
47
//		TESTS_RANGE = new int[] { 83304, -1 };
48
		}
48
		}
Lines 1458-1461 Link Here
1458
			"LA;.foo(Ljava/lang/String;)Ljava/lang/String;",
1458
			"LA;.foo(Ljava/lang/String;)Ljava/lang/String;",
1459
			bindings);
1459
			bindings);
1460
	}
1460
	}
1461
	/*
1462
	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=205860
1463
	 */
1464
	public void testCreateBindings20() throws JavaModelException {
1465
		IClassFile classFile = getClassFile("P", getExternalJCLPathString("1.5"), "javax.swing", "BoxLayout.class");
1466
		IType type = classFile.getType();
1467
		IField field = type.getField("LINE_AXIS");
1468
		assertNotNull("No field", field);
1469
		assertTrue("Must exist", field.exists());
1470
		ASTParser p = ASTParser.newParser(AST.JLS3);
1471
		p.setProject(field.getJavaProject());
1472
		IBinding[] createBindings= p.createBindings(new IJavaElement[]{field}, null);
1473
		assertNotNull("No binding", createBindings);
1474
		assertEquals("Wrong size", 1, createBindings.length);
1475
		assertNotNull("Should not be null", createBindings[0]);
1476
	}
1477
	/*
1478
	 * https://bugs.eclipse.org/bugs/show_bug.cgi?id=205860
1479
	 */
1480
	public void testCreateBindings21() throws JavaModelException {
1481
		IClassFile classFile = getClassFile("P", getExternalJCLPathString("1.5"), "java.util", "Calendar.class");
1482
		IType type = classFile.getType();
1483
		IField field = type.getField("THURSDAY");
1484
		assertNotNull("No field", field);
1485
		assertTrue("Must exist", field.exists());
1486
		ASTParser p = ASTParser.newParser(AST.JLS3);
1487
		p.setProject(field.getJavaProject());
1488
		IBinding[] createBindings= p.createBindings(new IJavaElement[]{field}, null);
1489
		assertNotNull("No binding", createBindings);
1490
		assertEquals("Wrong size", 1, createBindings.length);
1491
		assertNotNull("Should not be null", createBindings[0]);
1492
	}
1461
}
1493
}

Return to bug 205860