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

Cosmetics.

This commit is contained in:
Sergey Prigogin 2011-08-24 19:58:30 -07:00
parent 64c383952a
commit beeef2d87c

View file

@ -146,7 +146,7 @@ public class IndexBugsTests extends BaseTestCase {
} }
public void assertNoName(String section, int len) { public void assertNoName(String section, int len) {
IASTName name= findName(section,len,false); IASTName name= findName(section, len, false);
if (name != null) { if (name != null) {
String selection = section.substring(0, len); String selection = section.substring(0, len);
fail("Found unexpected \"" + selection + "\": " + name.resolveBinding()); fail("Found unexpected \"" + selection + "\": " + name.resolveBinding());
@ -158,7 +158,7 @@ public class IndexBugsTests extends BaseTestCase {
* it resolves to the given type of binding. * it resolves to the given type of binding.
*/ */
public IASTImplicitName assertImplicitName(String section, int len, Class<?> bindingClass) { public IASTImplicitName assertImplicitName(String section, int len, Class<?> bindingClass) {
IASTName name = findName(section,len,true); IASTName name = findName(section, len, true);
final String selection = section.substring(0, len); final String selection = section.substring(0, len);
assertNotNull("did not find \""+selection+"\"", name); assertNotNull("did not find \""+selection+"\"", name);
@ -186,13 +186,13 @@ public class IndexBugsTests extends BaseTestCase {
} }
public void assertNoImplicitName(String section, int len) { public void assertNoImplicitName(String section, int len) {
IASTName name = findName(section,len,true); IASTName name = findName(section, len, true);
final String selection = section.substring(0, len); final String selection = section.substring(0, len);
assertNull("found name \""+selection+"\"", name); assertNull("found name \""+selection+"\"", name);
} }
public IASTImplicitName[] getImplicitNames(String section, int len) { public IASTImplicitName[] getImplicitNames(String section, int len) {
IASTName name = findName(section,len,true); IASTName name = findName(section, len, true);
IASTImplicitNameOwner owner = (IASTImplicitNameOwner) name.getParent(); IASTImplicitNameOwner owner = (IASTImplicitNameOwner) name.getParent();
IASTImplicitName[] implicits = owner.getImplicitNames(); IASTImplicitName[] implicits = owner.getImplicitNames();
return implicits; return implicits;
@ -235,7 +235,7 @@ public class IndexBugsTests extends BaseTestCase {
} }
private IBinding binding(String section, int len) { private IBinding binding(String section, int len) {
IASTName name = findName(section, len,false); IASTName name = findName(section, len, false);
final String selection = section.substring(0, len); final String selection = section.substring(0, len);
assertNotNull("Did not find \"" + selection + "\"", name); assertNotNull("Did not find \"" + selection + "\"", name);
assertEquals(selection, name.getRawSignature()); assertEquals(selection, name.getRawSignature());
@ -1033,13 +1033,13 @@ public class IndexBugsTests extends BaseTestCase {
}; };
IBinding[] bindings= fIndex.findBindingsForPrefix(new char[] {'a'}, true, NON_FUNCTIONS, null); IBinding[] bindings= fIndex.findBindingsForPrefix(new char[] {'a'}, true, NON_FUNCTIONS, null);
assertEquals(3,bindings.length); assertEquals(3, bindings.length);
bindings= fIndex.findBindingsForPrefix(new char[] {'a'}, false, NON_FUNCTIONS, null); bindings= fIndex.findBindingsForPrefix(new char[] {'a'}, false, NON_FUNCTIONS, null);
assertEquals(6,bindings.length); assertEquals(6, bindings.length);
bindings= fIndex.findBindingsForPrefix(new char[] {'a','A'}, true, NON_FUNCTIONS, null); bindings= fIndex.findBindingsForPrefix(new char[] {'a','A'}, true, NON_FUNCTIONS, null);
assertEquals(1,bindings.length); assertEquals(1, bindings.length);
bindings= fIndex.findBindingsForPrefix(new char[] {'a','A'}, false, NON_FUNCTIONS, null); bindings= fIndex.findBindingsForPrefix(new char[] {'a','A'}, false, NON_FUNCTIONS, null);
assertEquals(2, bindings.length); assertEquals(2, bindings.length);
@ -1066,7 +1066,7 @@ public class IndexBugsTests extends BaseTestCase {
}; };
IBinding[] bindings= fIndex.findBindings(new char[][]{{'a'},{'b'},{'c'},{'f'}}, NON_CLASS, npm()); IBinding[] bindings= fIndex.findBindings(new char[][]{{'a'},{'b'},{'c'},{'f'}}, NON_CLASS, npm());
assertEquals(1,bindings.length); assertEquals(1, bindings.length);
} finally { } finally {
fIndex.releaseReadLock(); fIndex.releaseReadLock();
} }
@ -1164,7 +1164,6 @@ public class IndexBugsTests extends BaseTestCase {
} }
} }
// #define MAC(...) Bug200239 // #define MAC(...) Bug200239
// #include "header.h" // #include "header.h"
@ -1217,7 +1216,6 @@ public class IndexBugsTests extends BaseTestCase {
} }
} }
// typedef bug200553_A bug200553_B; // typedef bug200553_A bug200553_B;
// typedef bug200553_B bug200553_A; // typedef bug200553_B bug200553_A;
public void testTypedefRecursionCpp_Bug200553() throws Exception { public void testTypedefRecursionCpp_Bug200553() throws Exception {
@ -1513,7 +1511,6 @@ public class IndexBugsTests extends BaseTestCase {
} }
} }
// typedef int unrelated; // typedef int unrelated;
// class unrelated { // class unrelated {
@ -1625,7 +1622,6 @@ public class IndexBugsTests extends BaseTestCase {
} }
} }
// #include <header.h> // #include <header.h>
// #define _CONCAT(x,y) x##y // #define _CONCAT(x,y) x##y
// #define CONCAT(x,y) _CONCAT(x,y) // #define CONCAT(x,y) _CONCAT(x,y)
@ -1674,7 +1670,6 @@ public class IndexBugsTests extends BaseTestCase {
} }
} }
// #include "dir" // #include "dir"
// #include "header.h" // #include "header.h"
public void testInclusionOfFolders_Bug243682() throws Exception { public void testInclusionOfFolders_Bug243682() throws Exception {
@ -1698,7 +1693,6 @@ public class IndexBugsTests extends BaseTestCase {
} }
} }
// #ifndef B_H // #ifndef B_H
// #include "b.h" // #include "b.h"
// #endif // #endif
@ -1789,7 +1783,6 @@ public class IndexBugsTests extends BaseTestCase {
} }
} }
// #include "B.cpp" // #include "B.cpp"
// static int STATIC; // static int STATIC;
@ -2430,5 +2423,4 @@ public class IndexBugsTests extends BaseTestCase {
index.releaseReadLock(); index.releaseReadLock();
} }
} }
} }