Lines 37-43
Link Here
|
37 |
super(name); |
37 |
super(name); |
38 |
} |
38 |
} |
39 |
static { |
39 |
static { |
40 |
// TESTS_NAMES = new String[] { "testAddExternalLibFolder6" }; |
40 |
// TESTS_NAMES = new String[] { "testBug360164" }; |
41 |
} |
41 |
} |
42 |
public static Test suite() { |
42 |
public static Test suite() { |
43 |
TestSuite suite = (TestSuite) buildModelTestSuite(JavaProjectTests.class); |
43 |
TestSuite suite = (TestSuite) buildModelTestSuite(JavaProjectTests.class); |
Lines 2389-2392
Link Here
|
2389 |
deleteProject("JavaProjectTestsInvalidProject"); |
2389 |
deleteProject("JavaProjectTestsInvalidProject"); |
2390 |
} |
2390 |
} |
2391 |
} |
2391 |
} |
|
|
2392 |
// Bug 360164 - Compile error in XSDImpl |
2393 |
// test that we can tolerate if a 1.4 project refers to an enum inside a library. |
2394 |
public void testBug360164() throws IOException, CoreException { |
2395 |
String libPath = getWorkspacePath()+"JavaProjectTests/bin/bug360164.jar"; |
2396 |
try { |
2397 |
this.createJavaProject("P", new String[] {"src"}, new String[] {"JCL_LIB", libPath}, "bin", JavaCore.VERSION_1_4); |
2398 |
IFile file = createFile("/P/src/X.java", |
2399 |
"import p360164.Provider;\n" + |
2400 |
"import p360164.MyEnum;\n" + |
2401 |
"public class X {\n" + |
2402 |
" int foo(Provider p) {\n" + |
2403 |
" MyEnum e = p.getE();\n" + |
2404 |
" switch (e) {\n" + |
2405 |
" case ONE: return 1;\n" + |
2406 |
" case TWO: return 2;\n" + |
2407 |
" }\n" + |
2408 |
" return 0;\n" + |
2409 |
" }\n" + |
2410 |
"}" |
2411 |
); |
2412 |
ICompilationUnit unit = (ICompilationUnit)JavaCore.create(file); |
2413 |
ProblemRequestor problemRequestor = new ProblemRequestor(); |
2414 |
WorkingCopyOwner owner = newWorkingCopyOwner(problemRequestor); |
2415 |
unit.getWorkingCopy(owner, null); |
2416 |
assertProblems("Unexpected problems", |
2417 |
"----------\n" + |
2418 |
"----------\n", |
2419 |
problemRequestor); |
2420 |
} finally { |
2421 |
this.deleteProject("P"); |
2422 |
} |
2423 |
} |
2392 |
} |
2424 |
} |