mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 08:55:25 +02:00
Cosmetics.
This commit is contained in:
parent
8fcd01b3c7
commit
7a5d9818fc
2 changed files with 238 additions and 237 deletions
File diff suppressed because it is too large
Load diff
|
@ -42,20 +42,20 @@ public class IndexCBindingResolutionBugs extends IndexBindingResolutionTestBase
|
|||
public ProjectWithDepProj() { setStrategy(new ReferencedProject(false)); }
|
||||
public static TestSuite suite() { return suite(ProjectWithDepProj.class); }
|
||||
}
|
||||
|
||||
public static void addTests(TestSuite suite) {
|
||||
|
||||
public static void addTests(TestSuite suite) {
|
||||
suite.addTest(SingleProject.suite());
|
||||
suite.addTest(ProjectWithDepProj.suite());
|
||||
}
|
||||
|
||||
// #include <stdio.h>
|
||||
// #include <stdio.h>
|
||||
// void func1(void) {
|
||||
// int i = 0;
|
||||
// for (i=0; i<10;i++) {
|
||||
// printf("%i", i);
|
||||
// }
|
||||
// }
|
||||
|
||||
|
||||
// #include "header.h"
|
||||
//
|
||||
// int main(void) {
|
||||
|
@ -77,7 +77,7 @@ public class IndexCBindingResolutionBugs extends IndexBindingResolutionTestBase
|
|||
}
|
||||
|
||||
// void func1(void);
|
||||
|
||||
|
||||
// #include "header.h"
|
||||
//
|
||||
// int main(void) {
|
||||
|
@ -87,7 +87,7 @@ public class IndexCBindingResolutionBugs extends IndexBindingResolutionTestBase
|
|||
IBinding b0 = getBindingFromASTName("func1;", 5);
|
||||
assertTrue(b0 instanceof IFunction);
|
||||
}
|
||||
|
||||
|
||||
// typedef struct {
|
||||
// int utm;
|
||||
// } usertype;
|
||||
|
@ -132,7 +132,7 @@ public class IndexCBindingResolutionBugs extends IndexBindingResolutionTestBase
|
|||
assertInstance(type, IEnumeration.class);
|
||||
assertTrue(type instanceof IEnumeration);
|
||||
}
|
||||
|
||||
|
||||
// int globalVar;
|
||||
|
||||
// // don't include header
|
||||
|
@ -268,10 +268,10 @@ public class IndexCBindingResolutionBugs extends IndexBindingResolutionTestBase
|
|||
e= (IEnumeration) b1;
|
||||
ei= e.getEnumerators();
|
||||
assertEquals(1, ei.length);
|
||||
}
|
||||
}
|
||||
|
||||
// // no header needed
|
||||
|
||||
|
||||
// typedef struct {
|
||||
// int member;
|
||||
// } t_struct;
|
||||
|
@ -289,7 +289,7 @@ public class IndexCBindingResolutionBugs extends IndexBindingResolutionTestBase
|
|||
assertTrue(tdIndex instanceof IIndexBinding);
|
||||
assertTrue(tdAST instanceof ITypedef);
|
||||
assertTrue(tdIndex instanceof ITypedef);
|
||||
|
||||
|
||||
IType tAST= ((ITypedef) tdAST).getType();
|
||||
IType tIndex= ((ITypedef) tdIndex).getType();
|
||||
assertTrue(tAST instanceof ICompositeType);
|
||||
|
@ -304,7 +304,7 @@ public class IndexCBindingResolutionBugs extends IndexBindingResolutionTestBase
|
|||
assertTrue(tdIndex instanceof IIndexBinding);
|
||||
assertTrue(tdAST instanceof ITypedef);
|
||||
assertTrue(tdIndex instanceof ITypedef);
|
||||
|
||||
|
||||
tAST= ((ITypedef) tdAST).getType();
|
||||
tIndex= ((ITypedef) tdIndex).getType();
|
||||
assertTrue(tAST instanceof ICompositeType);
|
||||
|
@ -319,7 +319,7 @@ public class IndexCBindingResolutionBugs extends IndexBindingResolutionTestBase
|
|||
assertTrue(tdIndex instanceof IIndexBinding);
|
||||
assertTrue(tdAST instanceof ITypedef);
|
||||
assertTrue(tdIndex instanceof ITypedef);
|
||||
|
||||
|
||||
tAST= ((ITypedef) tdAST).getType();
|
||||
tIndex= ((ITypedef) tdIndex).getType();
|
||||
assertTrue(tAST instanceof IEnumeration);
|
||||
|
@ -327,13 +327,13 @@ public class IndexCBindingResolutionBugs extends IndexBindingResolutionTestBase
|
|||
assertTrue(tAST.isSameType(tIndex));
|
||||
assertTrue(tIndex.isSameType(tAST));
|
||||
}
|
||||
|
||||
|
||||
// struct outer {
|
||||
// union {
|
||||
// int var1;
|
||||
// };
|
||||
// };
|
||||
|
||||
|
||||
// #include "header.h"
|
||||
// void test() {
|
||||
// struct outer x;
|
||||
|
@ -354,7 +354,7 @@ public class IndexCBindingResolutionBugs extends IndexBindingResolutionTestBase
|
|||
// int var1;
|
||||
// };
|
||||
// };
|
||||
|
||||
|
||||
// #include "header.h"
|
||||
// void test() {
|
||||
// union outer x;
|
||||
|
@ -369,14 +369,14 @@ public class IndexCBindingResolutionBugs extends IndexBindingResolutionTestBase
|
|||
assertTrue(outer instanceof ICCompositeTypeScope);
|
||||
assertEquals("outer", outer.getScopeName().toString());
|
||||
}
|
||||
|
||||
|
||||
// int myFunc();
|
||||
|
||||
|
||||
// int myFunc(var)
|
||||
// int var;
|
||||
// {
|
||||
// return var;
|
||||
// }
|
||||
// int var;
|
||||
// {
|
||||
// return var;
|
||||
// }
|
||||
// int main(void) {
|
||||
// return myFunc(0);
|
||||
// }
|
||||
|
@ -390,7 +390,7 @@ public class IndexCBindingResolutionBugs extends IndexBindingResolutionTestBase
|
|||
assertTrue(params[0].getType() instanceof IBasicType);
|
||||
assertEquals(IBasicType.Kind.eInt, ((IBasicType) params[0].getType()).getKind());
|
||||
}
|
||||
|
||||
|
||||
// typedef struct S S;
|
||||
// void setValue(S *pSelf, int value);
|
||||
|
||||
|
@ -404,7 +404,7 @@ public class IndexCBindingResolutionBugs extends IndexBindingResolutionTestBase
|
|||
IBinding b = getBindingFromASTName("value =", 5);
|
||||
assertTrue(b instanceof IField);
|
||||
}
|
||||
|
||||
|
||||
// void f255(
|
||||
// int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int,
|
||||
// int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int,
|
||||
|
@ -439,8 +439,8 @@ public class IndexCBindingResolutionBugs extends IndexBindingResolutionTestBase
|
|||
// int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int,
|
||||
// int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int,
|
||||
// int, int, int, int, int, int, int, int, int, int, int, int, int, int, int, int);
|
||||
|
||||
// void test() {
|
||||
|
||||
// void test() {
|
||||
// f255(
|
||||
// 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
// 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||
|
@ -463,8 +463,8 @@ public class IndexCBindingResolutionBugs extends IndexBindingResolutionTestBase
|
|||
public void testFunctionsWithManyParameters_Bug319186() throws Exception {
|
||||
getBindingFromASTName("f255", 0);
|
||||
getBindingFromASTName("f256", 0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// struct B {
|
||||
// float f;
|
||||
// };
|
||||
|
@ -474,5 +474,5 @@ public class IndexCBindingResolutionBugs extends IndexBindingResolutionTestBase
|
|||
// };
|
||||
public void testDesignatedInitializer_Bug210019() throws Exception {
|
||||
IField f= getBindingFromASTName("f", 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue