Lines 33-41
Link Here
|
33 |
} |
33 |
} |
34 |
|
34 |
|
35 |
public static Test suite() { |
35 |
public static Test suite() { |
36 |
if (false) { |
36 |
if (true) { |
37 |
TestSuite suite = new TestSuite(ParticipantBuildTests.class.getName()); |
37 |
TestSuite suite = new TestSuite(ParticipantBuildTests.class.getName()); |
38 |
suite.addTest(new ParticipantBuildTests("testTags")); |
38 |
suite.addTest(new ParticipantBuildTests("testDefaultValue")); |
39 |
return suite; |
39 |
return suite; |
40 |
} |
40 |
} |
41 |
return new TestSuite(ParticipantBuildTests.class); |
41 |
return new TestSuite(ParticipantBuildTests.class); |
Lines 116-122
Link Here
|
116 |
expectingNoProblems(); |
116 |
expectingNoProblems(); |
117 |
} |
117 |
} |
118 |
|
118 |
|
119 |
public void _testDefaultValue() throws JavaModelException { |
119 |
public void testDefaultValue() throws JavaModelException { |
120 |
IPath projectPath = env.addProject("Project", "1.5"); //$NON-NLS-1$ //$NON-NLS-2$ |
120 |
IPath projectPath = env.addProject("Project", "1.5"); //$NON-NLS-1$ //$NON-NLS-2$ |
121 |
env.addExternalJars(projectPath, Util.getJavaClassLibs()); |
121 |
env.addExternalJars(projectPath, Util.getJavaClassLibs()); |
122 |
env.removePackageFragmentRoot(projectPath, ""); //$NON-NLS-1$ |
122 |
env.removePackageFragmentRoot(projectPath, ""); //$NON-NLS-1$ |
Lines 168-174
Link Here
|
168 |
IMethodBinding[] annotationMethods = declaredTypes[d].getDeclaredMethods(); |
168 |
IMethodBinding[] annotationMethods = declaredTypes[d].getDeclaredMethods(); |
169 |
for (int m = 0, mLength = annotationMethods.length; m < mLength; m++) { |
169 |
for (int m = 0, mLength = annotationMethods.length; m < mLength; m++) { |
170 |
if (!"value".equals(annotationMethods[m].getName())) continue; |
170 |
if (!"value".equals(annotationMethods[m].getName())) continue; |
171 |
String defaultString = (String) annotationMethods[m].getDefaultValue(); |
171 |
Object defaultValue = annotationMethods[m].getDefaultValue(); |
|
|
172 |
assertTrue("Wrong class", defaultValue instanceof IVariableBinding); |
173 |
IVariableBinding variableBinding = (IVariableBinding) defaultValue; |
174 |
String defaultString = variableBinding.getName(); |
172 |
String expected = "Eore"; |
175 |
String expected = "Eore"; |
173 |
if (!expected.equals(defaultString)) { |
176 |
if (!expected.equals(defaultString)) { |
174 |
IProblem problem = new ParticipantProblem("expecting default = " + expected + " not " + defaultString, file.getName()); |
177 |
IProblem problem = new ParticipantProblem("expecting default = " + expected + " not " + defaultString, file.getName()); |