1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Fix for failing UI JUnits

This commit is contained in:
Bogdan Gheorghe 2005-07-12 14:42:42 +00:00
parent f817288fb3
commit 1c13ce92c0
3 changed files with 7 additions and 7 deletions

View file

@ -155,9 +155,9 @@ public class CPPSelectionTestsCTagsIndexer extends BaseSelectionTestsIndexer
public void testSimpleOpenDeclaration2() throws Exception { public void testSimpleOpenDeclaration2() throws Exception {
String header = "int x;\r\n // comment \r\nint y;\r\n /* comment */ \r\n int z;\r\n"; //$NON-NLS-1$ String header = "int x;\r\n // comment \r\nint y;\r\n /* comment */ \r\n int z;\r\n"; //$NON-NLS-1$
importFile("test.h", header); //$NON-NLS-1$ importFile("testSimpleOpenDeclaration2.h", header); //$NON-NLS-1$
String code = "#include \"test.h\"\r\nint foo() { \r\n return y;\r\n}\r\n"; //$NON-NLS-1$ String code = "#include \"testSimpleOpenDeclaration2.h\"\r\nint foo() { \r\n return y;\r\n}\r\n"; //$NON-NLS-1$
IFile file = importFile("test.cpp", code); //$NON-NLS-1$ IFile file = importFile("testSimpleOpenDeclaration2.cpp", code); //$NON-NLS-1$
int offset = code.indexOf("y;"); //$NON-NLS-1$ int offset = code.indexOf("y;"); //$NON-NLS-1$
IASTNode def = testCtrl_F3(file, offset); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ IASTNode def = testCtrl_F3(file, offset); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$

View file

@ -150,9 +150,9 @@ public class CSelectionTestsCTagsIndexer extends BaseSelectionTestsIndexer
public void testSimpleOpenDeclaration2() throws Exception { public void testSimpleOpenDeclaration2() throws Exception {
String header = "int x;\r\n // comment \r\nint y() { return 1; }\r\n /* comment */ \r\n int z;\r\n"; //$NON-NLS-1$ String header = "int x;\r\n // comment \r\nint y() { return 1; }\r\n /* comment */ \r\n int z;\r\n"; //$NON-NLS-1$
importFile("test.h", header); //$NON-NLS-1$ importFile("testSimpleOpenDeclaration2.h", header); //$NON-NLS-1$
String code = "int foo() { \n return y();\n}\n"; //$NON-NLS-1$ String code = "int foo() { \n return y();\n}\n"; //$NON-NLS-1$
IFile file = importFile("test.c", code); //$NON-NLS-1$ IFile file = importFile("testSimpleOpenDeclaration2.c", code); //$NON-NLS-1$
int offset = code.indexOf("y();\n}\n"); //$NON-NLS-1$ int offset = code.indexOf("y();\n}\n"); //$NON-NLS-1$
ISelection def = testCtrl_F3Selection(file, offset); ISelection def = testCtrl_F3Selection(file, offset);

View file

@ -144,9 +144,9 @@ public class CSelectionTestsDOMIndexer extends BaseSelectionTestsIndexer impleme
public void testSimpleOpenDeclaration2() throws Exception { public void testSimpleOpenDeclaration2() throws Exception {
String header = "int x;\r\n // comment \r\n int y() { return 1; } /* comment */ \r\n int z; \r\n"; //$NON-NLS-1$ String header = "int x;\r\n // comment \r\n int y() { return 1; } /* comment */ \r\n int z; \r\n"; //$NON-NLS-1$
importFile("test.h", header); //$NON-NLS-1$ importFile("testSimpleOpenDeclaration2.h", header); //$NON-NLS-1$
String code = "int foo() { \n return y();\n}\n"; //$NON-NLS-1$ String code = "int foo() { \n return y();\n}\n"; //$NON-NLS-1$
IFile file = importFile("test.c", code); IFile file = importFile("testSimpleOpenDeclaration2.c", code);
int offset = code.indexOf("y();\n}\n"); int offset = code.indexOf("y();\n}\n");
IASTNode def = testCtrl_F3(file, offset); IASTNode def = testCtrl_F3(file, offset);