Lines 27-32
Link Here
|
27 |
return buildTestSuite(EfficiencyTests.class); |
27 |
return buildTestSuite(EfficiencyTests.class); |
28 |
} |
28 |
} |
29 |
|
29 |
|
|
|
30 |
public void testProjectAsClassFolder() throws JavaModelException { |
31 |
IPath projectPath1 = env.addProject("Project1"); //$NON-NLS-1$ |
32 |
env.addExternalJars(projectPath1, Util.getJavaClassLibs()); |
33 |
|
34 |
IPath projectPath2 = env.addProject("Project2"); //$NON-NLS-1$ |
35 |
env.addExternalJars(projectPath2, Util.getJavaClassLibs()); |
36 |
env.addClassFolder(projectPath2, projectPath1, false); |
37 |
|
38 |
env.addClass(projectPath2, "p1", "X", //$NON-NLS-1$ //$NON-NLS-2$ |
39 |
"package p1;\n"+ //$NON-NLS-1$ |
40 |
"public abstract class X {}\n" //$NON-NLS-1$ |
41 |
); |
42 |
|
43 |
env.addClass(projectPath2, "p2", "Y", //$NON-NLS-1$ //$NON-NLS-2$ |
44 |
"package p2;\n"+ //$NON-NLS-1$ |
45 |
"public class Y {}\n" //$NON-NLS-1$ |
46 |
); |
47 |
|
48 |
fullBuild(); |
49 |
|
50 |
env.addClass(projectPath2, "p1", "X", //$NON-NLS-1$ //$NON-NLS-2$ |
51 |
"package p1;\n"+ //$NON-NLS-1$ |
52 |
"public class X {}\n" //$NON-NLS-1$ |
53 |
); |
54 |
|
55 |
incrementalBuild(projectPath2); |
56 |
|
57 |
// if a full build happens instead of an incremental, then both types will be recompiled |
58 |
expectingCompiledClasses(new String[]{"p1.X"}); //$NON-NLS-1$ |
59 |
} |
60 |
|
30 |
public void testEfficiency() throws JavaModelException { |
61 |
public void testEfficiency() throws JavaModelException { |
31 |
IPath projectPath = env.addProject("Project"); //$NON-NLS-1$ |
62 |
IPath projectPath = env.addProject("Project"); //$NON-NLS-1$ |
32 |
env.addExternalJars(projectPath, Util.getJavaClassLibs()); |
63 |
env.addExternalJars(projectPath, Util.getJavaClassLibs()); |