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 23442 Details for
Bug 100568
[All Declarations][All References] has internal error and displays "Search "()""
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
tests that depend on this PR
cdt_ui_tests_patch.txt (text/plain), 11.35 KB, created by
Devin Steffler
on 2005-06-17 10:15:58 EDT
(
hide
)
Description:
tests that depend on this PR
Filename:
MIME Type:
Creator:
Devin Steffler
Created:
2005-06-17 10:15:58 EDT
Size:
11.35 KB
patch
obsolete
>Index: ui/org/eclipse/cdt/ui/tests/text/selectiontests/CSelectionTestsCTagsIndexer.java >=================================================================== >RCS file: /home/tools/org.eclipse.cdt-core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selectiontests/CSelectionTestsCTagsIndexer.java,v >retrieving revision 1.3 >diff -u -r1.3 CSelectionTestsCTagsIndexer.java >--- ui/org/eclipse/cdt/ui/tests/text/selectiontests/CSelectionTestsCTagsIndexer.java 13 Jun 2005 23:51:52 -0000 1.3 >+++ ui/org/eclipse/cdt/ui/tests/text/selectiontests/CSelectionTestsCTagsIndexer.java 17 Jun 2005 14:14:29 -0000 >@@ -142,15 +142,11 @@ > assertEquals(((TextSelection)def).getOffset(), header.indexOf("int x() { return 1; }\n")); > assertEquals(((TextSelection)def).getLength(), "int x() { return 1; }\n".length()); > } >- try { >- // TODO raised bug 97079 >- ISelection decl = testF3Selection(file, offset); >- if (decl instanceof TextSelection) { >- assertEquals(((TextSelection)decl).getOffset(), header.indexOf("int x() { return 1; }\n")); >- assertEquals(((TextSelection)decl).getLength(), "int x() { return 1; }\n".length()); >- } >- assertFalse(true); // when this fails then the test is passing correctly >- } catch (AssertionFailedError afe) {} >+ ISelection decl = testF3Selection(file, offset); >+ if (decl instanceof TextSelection) { >+ assertEquals(((TextSelection)decl).getOffset(), header.indexOf("int x() { return 1; }\n")); >+ assertEquals(((TextSelection)decl).getLength(), "int x() { return 1; }\n".length()); >+ } > } > > public void testSimpleOpenDeclaration2() throws Exception { >@@ -165,15 +161,11 @@ > assertEquals(((TextSelection)def).getOffset(), header.indexOf("int y() { return 1; }\r\n")); > assertEquals(((TextSelection)def).getLength(), "int y() { return 1; }\r\n".length()); > } >- try { >- // TODO raised bug 97079 >- ISelection decl = testF3Selection(file, offset); >- if (decl instanceof TextSelection) { >- assertEquals(((TextSelection)decl).getOffset(), header.indexOf("int y() { return 1; }\r\n")); >- assertEquals(((TextSelection)decl).getLength(), "int y() { return 1; }\r\n".length()); >- } >- assertFalse(true); // when this fails then the test is passing correctly >- } catch (AssertionFailedError afe) {} >+ ISelection decl = testF3Selection(file, offset); >+ if (decl instanceof TextSelection) { >+ assertEquals(((TextSelection)decl).getOffset(), header.indexOf("int y() { return 1; }\r\n")); >+ assertEquals(((TextSelection)decl).getLength(), "int y() { return 1; }\r\n".length()); >+ } > } > > // perform the tests from CSelectionTestsNoIndexer and make sure they work with an indexer as well: >@@ -549,10 +541,7 @@ > offset = code.indexOf("anotherX; // declares anotherX"); //$NON-NLS-1$ > def = testF2(file, offset); > decl = testF3(file, offset); >- try { >- assertNull(def); // TODO raised bug 96689 >- assertTrue(false); // try/catch/assertTrue(false) added to alert the tester when this test passes! >- } catch (AssertionFailedError e) {} >+ assertNull(def); > > assertTrue(decl instanceof IASTName); > assertEquals(((IASTName)decl).toString(), "anotherX"); //$NON-NLS-1$ >@@ -574,10 +563,7 @@ > int offset = code.indexOf("a1; // declares a"); //$NON-NLS-1$ > IASTNode def = testF2(file, offset); > IASTNode decl = testF3(file, offset); >- try { >- assertNull(def); // TODO raised bug 96689 >- assertTrue(false); // try/catch/assertTrue(false) added to alert the tester when this test passes! >- } catch (AssertionFailedError e) {} >+ assertNull(def); > > assertTrue(decl instanceof IASTName); > assertEquals(((IASTName)decl).toString(), "a1"); //$NON-NLS-1$ >@@ -587,10 +573,7 @@ > offset = code.indexOf("c1; // declares c"); //$NON-NLS-1$ > def = testF2(file, offset); > decl = testF3(file, offset); >- try { >- assertNull(def); // TODO raised bug 96689 >- assertTrue(false); // try/catch/assertTrue(false) added to alert the tester when this test passes! >- } catch (AssertionFailedError e) {} >+ assertNull(def); > assertTrue(decl instanceof IASTName); > assertEquals(((IASTName)decl).toString(), "c1"); //$NON-NLS-1$ > assertEquals(((ASTNode)decl).getOffset(), 46); >@@ -608,10 +591,7 @@ > offset = code.indexOf("S1; // declares S"); //$NON-NLS-1$ > def = testF2(file, offset); > decl = testF3(file, offset); >- try { >- assertNull(def); // TODO raised bug 96690 >- assertTrue(false); // try/catch/assertTrue(false) added to alert the tester when this test passes! >- } catch (AssertionFailedError e) {} >+ assertNull(def); > assertTrue(decl instanceof IASTName); > assertEquals(((IASTName)decl).toString(), "S1"); //$NON-NLS-1$ > assertEquals(((ASTNode)decl).getOffset(), 98); >@@ -643,15 +623,11 @@ > assertEquals(((TextSelection)def).getOffset(), header.indexOf(" int y() { return 1; } /* comment */ \r\n")); //$NON-NLS-1$ > assertEquals(((TextSelection)def).getLength(), " int y() { return 1; } /* comment */ \r\n".length()); //$NON-NLS-1$ > } >- try { >- // TODO raised bug 97079 >- ISelection decl = testF3Selection(file, offset); >- if (decl instanceof TextSelection) { >- assertEquals(((TextSelection)decl).getOffset(), header.indexOf(" int y() { return 1; } /* comment */ \r\n")); >- assertEquals(((TextSelection)decl).getLength(), " int y() { return 1; } /* comment */ \r\n".length()); >- } >- assertFalse(true); // when this fails then the test is passing correctly >- } catch (AssertionFailedError afe) {} >+ ISelection decl = testF3Selection(file, offset); >+ if (decl instanceof TextSelection) { >+ assertEquals(((TextSelection)decl).getOffset(), header.indexOf(" int y() { return 1; } /* comment */ \r\n")); >+ assertEquals(((TextSelection)decl).getLength(), " int y() { return 1; } /* comment */ \r\n".length()); >+ } > } > > // REMINDER: see CSelectionTestsCTagsIndexer#suite() when appending new tests to this suite >Index: ui/org/eclipse/cdt/ui/tests/text/selectiontests/CSelectionTestsDOMIndexer.java >=================================================================== >RCS file: /home/tools/org.eclipse.cdt-core/org.eclipse.cdt.ui.tests/ui/org/eclipse/cdt/ui/tests/text/selectiontests/CSelectionTestsDOMIndexer.java,v >retrieving revision 1.3 >diff -u -r1.3 CSelectionTestsDOMIndexer.java >--- ui/org/eclipse/cdt/ui/tests/text/selectiontests/CSelectionTestsDOMIndexer.java 13 Jun 2005 23:51:52 -0000 1.3 >+++ ui/org/eclipse/cdt/ui/tests/text/selectiontests/CSelectionTestsDOMIndexer.java 17 Jun 2005 14:14:30 -0000 >@@ -132,13 +132,9 @@ > > int offset = code.indexOf("x();\n}\n"); > IASTNode def = testF2(file, offset); >- try { >- // TODO raised bug 97079 >- assertTrue(def instanceof IASTName); >- assertEquals(((ASTNode)def).getOffset(), header.indexOf("x")); //$NON-NLS-1$ >- assertEquals(((ASTNode)def).getLength(), "x".length()); //$NON-NLS-1$ >- assertTrue(false); // when this fails then the test is passing correctly >- } catch (AssertionFailedError afe) {} >+ assertTrue(def instanceof IASTName); >+ assertEquals(((ASTNode)def).getOffset(), header.indexOf("x")); //$NON-NLS-1$ >+ assertEquals(((ASTNode)def).getLength(), "x".length()); //$NON-NLS-1$ > IASTNode decl = testF3(file, offset); > assertTrue(decl instanceof IASTName); > assertEquals(((ASTNode)decl).getOffset(), header.indexOf("x")); //$NON-NLS-1$ >@@ -154,13 +150,9 @@ > > int offset = code.indexOf("y();\n}\n"); > IASTNode def = testF2(file, offset); >- try { >- // TODO raised bug 97079 >- assertTrue(def instanceof IASTName); >- assertEquals(((ASTNode)def).getOffset(), header.indexOf("y")); //$NON-NLS-1$ >- assertEquals(((ASTNode)def).getLength(), "y".length()); //$NON-NLS-1$ >- assertTrue(false); // when this fails then the test is passing correctly >- } catch (AssertionFailedError afe) {} >+ assertTrue(def instanceof IASTName); >+ assertEquals(((ASTNode)def).getOffset(), header.indexOf("y")); //$NON-NLS-1$ >+ assertEquals(((ASTNode)def).getLength(), "y".length()); //$NON-NLS-1$ > IASTNode decl = testF3(file, offset); > assertTrue(decl instanceof IASTName); > assertEquals(((ASTNode)decl).getOffset(), header.indexOf("y")); //$NON-NLS-1$ >@@ -541,10 +533,7 @@ > offset = code.indexOf("anotherX; // declares anotherX"); //$NON-NLS-1$ > def = testF2(file, offset); > decl = testF3(file, offset); >- try { >- assertNull(def); // TODO raised bug 96689 >- assertTrue(false); // try/catch/assertTrue(false) added to alert the tester when this test passes! >- } catch (AssertionFailedError e) {} >+ assertNull(def); > > assertTrue(decl instanceof IASTName); > assertEquals(((IASTName)decl).toString(), "anotherX"); //$NON-NLS-1$ >@@ -566,10 +555,7 @@ > int offset = code.indexOf("a1; // declares a"); //$NON-NLS-1$ > IASTNode def = testF2(file, offset); > IASTNode decl = testF3(file, offset); >- try { >- assertNull(def); // TODO raised bug 96689 >- assertTrue(false); // try/catch/assertTrue(false) added to alert the tester when this test passes! >- } catch (AssertionFailedError e) {} >+ assertNull(def); > > assertTrue(decl instanceof IASTName); > assertEquals(((IASTName)decl).toString(), "a1"); //$NON-NLS-1$ >@@ -579,10 +565,7 @@ > offset = code.indexOf("c1; // declares c"); //$NON-NLS-1$ > def = testF2(file, offset); > decl = testF3(file, offset); >- try { >- assertNull(def); // TODO raised bug 96689 >- assertTrue(false); // try/catch/assertTrue(false) added to alert the tester when this test passes! >- } catch (AssertionFailedError e) {} >+ assertNull(def); > assertTrue(decl instanceof IASTName); > assertEquals(((IASTName)decl).toString(), "c1"); //$NON-NLS-1$ > assertEquals(((ASTNode)decl).getOffset(), 46); >@@ -600,10 +583,7 @@ > offset = code.indexOf("S1; // declares S"); //$NON-NLS-1$ > def = testF2(file, offset); > decl = testF3(file, offset); >- try { >- assertNull(def); // TODO raised bug 96690 >- assertTrue(false); // try/catch/assertTrue(false) added to alert the tester when this test passes! >- } catch (AssertionFailedError e) {} >+ assertNull(def); > assertTrue(decl instanceof IASTName); > assertEquals(((IASTName)decl).toString(), "S1"); //$NON-NLS-1$ > assertEquals(((ASTNode)decl).getOffset(), 98); >@@ -631,13 +611,9 @@ > > int offset = code.indexOf("y();\n}\n"); > IASTNode def = testF2(file, offset); >- try { >- // TODO raised bug 97079 >- assertTrue(def instanceof IASTName); >- assertEquals(((ASTNode)def).getOffset(), header.indexOf("y")); //$NON-NLS-1$ >- assertEquals(((ASTNode)def).getLength(), "y".length()); //$NON-NLS-1$ >- assertTrue(false); // when this fails then the test is passing correctly >- } catch (AssertionFailedError afe) {} >+ assertTrue(def instanceof IASTName); >+ assertEquals(((ASTNode)def).getOffset(), header.indexOf("y")); //$NON-NLS-1$ >+ assertEquals(((ASTNode)def).getLength(), "y".length()); //$NON-NLS-1$ > IASTNode decl = testF3(file, offset); > assertTrue(decl instanceof IASTName); > assertEquals(((ASTNode)decl).getOffset(), header.indexOf("y")); //$NON-NLS-1$
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
Flags:
bjorn.freeman-benson
:
iplog+
Actions:
View
|
Diff
Attachments on
bug 100568
:
23437
| 23442