Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Schorn2008-03-03 15:05:11 +0000
committerMarkus Schorn2008-03-03 15:05:11 +0000
commit4e91bb54ab7237c04102517236b80178a83f8899 (patch)
tree4cfa91d75a3df69e04c65bce02dec6ba0cd15c96 /core/org.eclipse.cdt.ui.tests
parentcf7493d440b7113c315c4025a4064ad3feaf0e49 (diff)
downloadorg.eclipse.cdt-4e91bb54ab7237c04102517236b80178a83f8899.tar.gz
org.eclipse.cdt-4e91bb54ab7237c04102517236b80178a83f8899.tar.xz
org.eclipse.cdt-4e91bb54ab7237c04102517236b80178a83f8899.zip
Navigating an argument of a macro-expansion, bug 208300.
Diffstat (limited to 'core/org.eclipse.cdt.ui.tests')
-rw-r--r--core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/CPPSelectionTestsAnyIndexer.java13
1 files changed, 10 insertions, 3 deletions
diff --git a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/CPPSelectionTestsAnyIndexer.java b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/CPPSelectionTestsAnyIndexer.java
index 7d6ea99fa42..f0542bf22f9 100644
--- a/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/CPPSelectionTestsAnyIndexer.java
+++ b/core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selection/CPPSelectionTestsAnyIndexer.java
@@ -943,14 +943,16 @@ public abstract class CPPSelectionTestsAnyIndexer extends BaseSelectionTestsInde
assertNode("MY_PAR", offset0, decl);
}
- // #define MY_MACRO 0xDEADBEEF
- // #define MY_PAR( aRef );
+ // #define MY_MACRO 0xDEADBEEF
+ // #define MY_PAR( aRef ) aRef;
+ // int gvar;
// #include "macrodef.h"
// int basictest(void){
// int tester = MY_PAR(MY_MACRO);
+ // tester= MY_PAR(gvar);
// }
- public void _testMacroNavigation_Bug208300() throws Exception {
+ public void testMacroNavigation_Bug208300() throws Exception {
StringBuffer[] buffers= getContents(2);
String hcode= buffers[0].toString();
String scode= buffers[1].toString();
@@ -969,6 +971,11 @@ public abstract class CPPSelectionTestsAnyIndexer extends BaseSelectionTestsInde
offset1 = scode.indexOf("MY_MACRO");
decl = testF3(file, offset1);
assertNode("MY_MACRO", offset0, decl);
+
+ offset0 = hcode.indexOf("gvar");
+ offset1 = scode.indexOf("gvar");
+ decl = testF3(file, offset1);
+ assertNode("gvar", offset0, decl);
}
// int wurscht;

Back to the top