| Summary: | The LR Parser test utility function getCompletionNode gets a wrong offset. | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Tools] CDT | Reporter: | John Liu <john_ws_liu> | ||||
| Component: | cdt-parser | Assignee: | Chris Recoskie <recoskie> | ||||
| Status: | RESOLVED FIXED | QA Contact: | Mike Kucera <mikekucera> | ||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | cdt-parser-inbox, recoskie | ||||
| Version: | 7.0 | ||||||
| Target Milestone: | 7.0.1 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Created attachment 178072 [details]
a fix patch applied to org.eclipse.cdt.core.lrparser.tests
The fix will fix the recent CDT build test failures of 6 test cases for testBug313982b and testBug313982c.
Applied to cdt_7_0 and HEAD. *** cdt cvs genie on behalf of crecoskie *** Bug 324324 - The LR Parser test utility function getCompletionNode gets a wrong offset. [*] ParseHelper.java 1.8.2.1 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/lrparser/org.eclipse.cdt.core.lrparser.tests/src/org/eclipse/cdt/core/lrparser/tests/ParseHelper.java?root=Tools_Project&r1=1.8&r2=1.8.2.1 [*] ParseHelper.java 1.9 http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.cdt/lrparser/org.eclipse.cdt.core.lrparser.tests/src/org/eclipse/cdt/core/lrparser/tests/ParseHelper.java?root=Tools_Project&r1=1.8&r2=1.9 |
Build Identifier: The test utility function getCompletionNode(String code, ILanguage lang) in the class org.eclipse.cdt.core.lrparser.tests.ParseHelper gets a wrong offset due to a NEWLINE('\n') character appended to the code. It works for some test cases when it hits a complete key word, such as a->, since appended '\n' won't affect the completion node result. For example, the test case testNewExpressions_Bug313982a in the class org.eclipse.cdt.core.lrparser.tests.LRCompletionBasicTest works. But it will fail some test cases when it needs to find a proposal to an incomplete keyword. For example, the test cases testNewExpressions_Bug313982b and testNewExpressions_Bug313982c in the class org.eclipse.cdt.core.lrparser.tests.LRCompletionBasicTest will fail to find a right completion node due to this bug problem. Reproducible: Always