### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core.tests.model Index: src/org/eclipse/jdt/core/tests/dom/ASTModelBridgeTests.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTModelBridgeTests.java,v retrieving revision 1.49 diff -u -r1.49 ASTModelBridgeTests.java --- src/org/eclipse/jdt/core/tests/dom/ASTModelBridgeTests.java 16 Mar 2007 18:35:31 -0000 1.49 +++ src/org/eclipse/jdt/core/tests/dom/ASTModelBridgeTests.java 17 Oct 2007 13:56:14 -0000 @@ -1458,4 +1458,38 @@ "LA;.foo(Ljava/lang/String;)Ljava/lang/String;", bindings); } + + /* + * Ensures that the correct IBinding is created for an IField starting with a 'L' + * (regression test for 205860 ASTParser.createBindings() returns [null]) + */ + public void testCreateBindings20() throws CoreException { + IField field = getClassFile("/P/lib/A.class").getType().getField("LINE"); + IBinding[] bindings = createBinaryBindings( + "public class A {\n" + + " static int LINE = 0;\n" + + "}", + field + ); + assertBindingsEqual( + "LA;.LINE)I", + bindings); + } + + /* + * Ensures that the correct IBinding is created for an IField starting with a 'T' + * (regression test for 205860 ASTParser.createBindings() returns [null]) + */ + public void testCreateBindings21() throws CoreException { + IField field = getClassFile("/P/lib/A.class").getType().getField("THREE"); + IBinding[] bindings = createBinaryBindings( + "public class A {\n" + + " static int THREE = 0;\n" + + "}", + field + ); + assertBindingsEqual( + "LA;.THREE)I", + bindings); + } }