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 27055 Details for
Bug 109333
[DOM/AST] OR_OR and AND_AND expression are not converted to an infix expression using extended operands
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Regression test
patch_109333_tests.txt (text/plain), 4.08 KB, created by
Olivier Thomann
on 2005-09-12 17:07:15 EDT
(
hide
)
Description:
Regression test
Filename:
MIME Type:
Creator:
Olivier Thomann
Created:
2005-09-12 17:07:15 EDT
Size:
4.08 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.61 >diff -u -r1.61 ASTConverterTestAST3_2.java >--- ASTConverterTestAST3_2.java 25 Aug 2005 11:13:49 -0000 1.61 >+++ ASTConverterTestAST3_2.java 12 Sep 2005 21:06:27 -0000 >@@ -106,7 +106,7 @@ > > static { > // TESTS_NAMES = new String[] {"test0602"}; >-// TESTS_NUMBERS = new int[] { 615 }; >+// TESTS_NUMBERS = new int[] { 616, 617 }; > } > public static Test suite() { > return buildTestSuite(ASTConverterTestAST3_2.class); >@@ -6666,5 +6666,77 @@ > if (workingCopy != null) > workingCopy.discardWorkingCopy(); > } >- } >+ } >+ /* >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=109333 >+ */ >+ public void test0616() throws JavaModelException { >+ ICompilationUnit workingCopy = null; >+ try { >+ String contents = >+ "class X {\n" + >+ " boolean val = true && false && true && false && true;\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); >+ assertNotNull("No node", node); >+ assertEquals("Not a field declaration ", ASTNode.FIELD_DECLARATION, node.getNodeType()); >+ final FieldDeclaration fieldDeclaration = (FieldDeclaration) node; >+ final List fragments = fieldDeclaration.fragments(); >+ assertEquals("Wrong size", 1, fragments.size()); >+ VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0); >+ final Expression initializer = fragment.getInitializer(); >+ assertNotNull("No initializer", initializer); >+ assertEquals("Not an infix expression", ASTNode.INFIX_EXPRESSION, initializer.getNodeType()); >+ InfixExpression infixExpression = (InfixExpression) initializer; >+ final List extendedOperands = infixExpression.extendedOperands(); >+ assertEquals("Wrong size", 3, extendedOperands.size()); >+ assertEquals("Wrong operator", InfixExpression.Operator.CONDITIONAL_AND, infixExpression.getOperator()); >+ } finally { >+ if (workingCopy != null) >+ workingCopy.discardWorkingCopy(); >+ } >+ } >+ /* >+ * https://bugs.eclipse.org/bugs/show_bug.cgi?id=109333 >+ */ >+ public void test0617() throws JavaModelException { >+ ICompilationUnit workingCopy = null; >+ try { >+ String contents = >+ "class X {\n" + >+ " boolean val = true || false || true || false || true;\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); >+ assertNotNull("No node", node); >+ assertEquals("Not a field declaration ", ASTNode.FIELD_DECLARATION, node.getNodeType()); >+ final FieldDeclaration fieldDeclaration = (FieldDeclaration) node; >+ final List fragments = fieldDeclaration.fragments(); >+ assertEquals("Wrong size", 1, fragments.size()); >+ VariableDeclarationFragment fragment = (VariableDeclarationFragment) fragments.get(0); >+ final Expression initializer = fragment.getInitializer(); >+ assertNotNull("No initializer", initializer); >+ assertEquals("Not an infix expression", ASTNode.INFIX_EXPRESSION, initializer.getNodeType()); >+ InfixExpression infixExpression = (InfixExpression) initializer; >+ final List extendedOperands = infixExpression.extendedOperands(); >+ assertEquals("Wrong size", 3, extendedOperands.size()); >+ assertEquals("Wrong operator", InfixExpression.Operator.CONDITIONAL_OR, infixExpression.getOperator()); >+ } 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 109333
:
27054
| 27055