Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 23087 Details for
Bug 99982
[DOM] Wrong positions for boolean[] type
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Corresponding regression test
patch_99982_tests.txt (text/plain), 2.82 KB, created by
Olivier Thomann
on 2005-06-14 14:38:20 EDT
(
hide
)
Description:
Corresponding regression test
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2005-06-14 14:38:20 EDT
Size:
2.82 KB
patch
obsolete
>Index: ASTConverterTestAST3_2.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverterTestAST3_2.java,v >retrieving revision 1.56 >diff -u -r1.56 ASTConverterTestAST3_2.java >--- ASTConverterTestAST3_2.java 3 Jun 2005 00:59:55 -0000 1.56 >+++ ASTConverterTestAST3_2.java 14 Jun 2005 18:38:26 -0000 >@@ -70,6 +70,7 @@ > import org.eclipse.jdt.core.dom.NullLiteral; > import org.eclipse.jdt.core.dom.PackageDeclaration; > import org.eclipse.jdt.core.dom.ParenthesizedExpression; >+import org.eclipse.jdt.core.dom.PrimitiveType; > import org.eclipse.jdt.core.dom.QualifiedName; > import org.eclipse.jdt.core.dom.ReturnStatement; > import org.eclipse.jdt.core.dom.SimpleName; >@@ -105,7 +106,7 @@ > > static { > // TESTS_NAMES = new String[] {"test0602"}; >-// TESTS_NUMBERS = new int[] { 611 }; >+// TESTS_NUMBERS = new int[] { 613 }; > } > public static Test suite() { > return buildTestSuite(ASTConverterTestAST3_2.class); >@@ -6493,4 +6494,44 @@ > workingCopy.discardWorkingCopy(); > } > } >+ >+ /* >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=99982 >+ */ >+ public void test0612() throws JavaModelException { >+ ICompilationUnit workingCopy = null; >+ try { >+ String contents = >+ "public class X {\n" + >+ " void foo(boolean[]value) {\n" + >+ " }\n" + >+ "}"; >+ workingCopy = getWorkingCopy("/Converter/src/X.java", true/*resolve*/); >+ ASTNode node = buildAST( >+ contents, >+ workingCopy); >+ assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); >+ CompilationUnit unit = (CompilationUnit) node; >+ assertProblemsSize(unit, 0); >+ node = getASTNode(unit, 0, 0); >+ assertEquals("Not a method declaration", ASTNode.METHOD_DECLARATION, node.getNodeType()); >+ MethodDeclaration methodDeclaration = (MethodDeclaration) node; >+ List parameters = methodDeclaration.parameters(); >+ assertEquals("Wrong size", 1, parameters.size()); >+ SingleVariableDeclaration variableDeclaration = (SingleVariableDeclaration) parameters.get(0); >+ checkSourceRange(variableDeclaration, "boolean[]value", contents); >+ Type type = variableDeclaration.getType(); >+ checkSourceRange(type, "boolean[]", contents); >+ assertTrue("Not an array type", type.isArrayType()); >+ ArrayType arrayType = (ArrayType) type; >+ Type componentType = arrayType.getComponentType(); >+ assertTrue("Not a primitive type", componentType.isPrimitiveType()); >+ PrimitiveType primitiveType = (PrimitiveType) componentType; >+ assertEquals("Not boolean", PrimitiveType.BOOLEAN, primitiveType.getPrimitiveTypeCode()); >+ checkSourceRange(primitiveType, "boolean", contents); >+ } finally { >+ if (workingCopy != null) >+ workingCopy.discardWorkingCopy(); >+ } >+ } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 99982
:
23086
| 23087