Lines 78-81
Link Here
|
78 |
expectingNoFile( proj, ".apt_generated/summary.txt" ); |
78 |
expectingNoFile( proj, ".apt_generated/summary.txt" ); |
79 |
} |
79 |
} |
80 |
|
80 |
|
|
|
81 |
/** |
82 |
* Test generation of a source file that is referenced by the parent, using the GenClass6 annotation |
83 |
* @see javax.annotation.processing.Filer#createSourceFile(CharSequence, javax.lang.model.element.Element...) |
84 |
*/ |
85 |
public void testCreateSourceFileWithGenReference() throws Throwable |
86 |
{ |
87 |
// Temporary workaround for https://bugs.eclipse.org/bugs/show_bug.cgi?id=201931 |
88 |
// Bail out on Linux |
89 |
String osName = System.getProperty("os.name"); |
90 |
if (null == osName || !osName.contains("Windows")) { |
91 |
return; |
92 |
} |
93 |
|
94 |
IJavaProject jproj = createJavaProject(_projectName); |
95 |
IProject proj = jproj.getProject(); |
96 |
IdeTestUtils.copyResources(proj, "targets/filer02a", "src/targets/filer"); |
97 |
AptConfig.setEnabled(jproj, true); |
98 |
fullBuild(); |
99 |
expectingNoProblems(); |
100 |
|
101 |
// Check whether generated sources were generated and compiled |
102 |
expectingFile(proj, ".apt_generated/gen6/Generated02.java"); |
103 |
final String[] expectedClasses = { "targets.filer.Parent02", "gen6.Generated02" }; |
104 |
expectingUniqueCompiledClasses(expectedClasses); |
105 |
|
106 |
// Modify target file to change name of generated file and incrementally rebuild; |
107 |
// generated file should be deleted. |
108 |
IdeTestUtils.copyResources(proj, "targets/filer02b", "src/targets/filer"); |
109 |
incrementalBuild(); |
110 |
// expectingNoProblems(); |
111 |
// |
112 |
// final String[] expectedClasses2 = { "targets.filer.Parent02", "targets.filer.XxxGenerated02" }; |
113 |
// expectingUniqueCompiledClasses(expectedClasses2); |
114 |
// |
115 |
// expectingNoFile(proj, ".apt_generated/gen6/Generated02.java"); |
116 |
} |
117 |
|
81 |
} |
118 |
} |