mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-24 01:15:29 +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 ProjectWithDepProj() { setStrategy(new ReferencedProject(false)); }
|
||||||
public static TestSuite suite() { return suite(ProjectWithDepProj.class); }
|
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(SingleProject.suite());
|
||||||
suite.addTest(ProjectWithDepProj.suite());
|
suite.addTest(ProjectWithDepProj.suite());
|
||||||
}
|
}
|
||||||
|
|
||||||
// #include <stdio.h>
|
// #include <stdio.h>
|
||||||
// void func1(void) {
|
// void func1(void) {
|
||||||
// int i = 0;
|
// int i = 0;
|
||||||
// for (i=0; i<10;i++) {
|
// for (i=0; i<10;i++) {
|
||||||
// printf("%i", i);
|
// printf("%i", i);
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// #include "header.h"
|
// #include "header.h"
|
||||||
//
|
//
|
||||||
// int main(void) {
|
// int main(void) {
|
||||||
|
@ -77,7 +77,7 @@ public class IndexCBindingResolutionBugs extends IndexBindingResolutionTestBase
|
||||||
}
|
}
|
||||||
|
|
||||||
// void func1(void);
|
// void func1(void);
|
||||||
|
|
||||||
// #include "header.h"
|
// #include "header.h"
|
||||||
//
|
//
|
||||||
// int main(void) {
|
// int main(void) {
|
||||||
|
@ -87,7 +87,7 @@ public class IndexCBindingResolutionBugs extends IndexBindingResolutionTestBase
|
||||||
IBinding b0 = getBindingFromASTName("func1;", 5);
|
IBinding b0 = getBindingFromASTName("func1;", 5);
|
||||||
assertTrue(b0 instanceof IFunction);
|
assertTrue(b0 instanceof IFunction);
|
||||||
}
|
}
|
||||||
|
|
||||||
// typedef struct {
|
// typedef struct {
|
||||||
// int utm;
|
// int utm;
|
||||||
// } usertype;
|
// } usertype;
|
||||||
|
@ -132,7 +132,7 @@ public class IndexCBindingResolutionBugs extends IndexBindingResolutionTestBase
|
||||||
assertInstance(type, IEnumeration.class);
|
assertInstance(type, IEnumeration.class);
|
||||||
assertTrue(type instanceof IEnumeration);
|
assertTrue(type instanceof IEnumeration);
|
||||||
}
|
}
|
||||||
|
|
||||||
// int globalVar;
|
// int globalVar;
|
||||||
|
|
||||||
// // don't include header
|
// // don't include header
|
||||||
|
@ -268,10 +268,10 @@ public class IndexCBindingResolutionBugs extends IndexBindingResolutionTestBase
|
||||||
e= (IEnumeration) b1;
|
e= (IEnumeration) b1;
|
||||||
ei= e.getEnumerators();
|
ei= e.getEnumerators();
|
||||||
assertEquals(1, ei.length);
|
assertEquals(1, ei.length);
|
||||||
}
|
}
|
||||||
|
|
||||||
// // no header needed
|
// // no header needed
|
||||||
|
|
||||||
// typedef struct {
|
// typedef struct {
|
||||||
// int member;
|
// int member;
|
||||||
// } t_struct;
|
// } t_struct;
|
||||||
|
@ -289,7 +289,7 @@ public class IndexCBindingResolutionBugs extends IndexBindingResolutionTestBase
|
||||||
assertTrue(tdIndex instanceof IIndexBinding);
|
assertTrue(tdIndex instanceof IIndexBinding);
|
||||||
assertTrue(tdAST instanceof ITypedef);
|
assertTrue(tdAST instanceof ITypedef);
|
||||||
assertTrue(tdIndex instanceof ITypedef);
|
assertTrue(tdIndex instanceof ITypedef);
|
||||||
|
|
||||||
IType tAST= ((ITypedef) tdAST).getType();
|
IType tAST= ((ITypedef) tdAST).getType();
|
||||||
IType tIndex= ((ITypedef) tdIndex).getType();
|
IType tIndex= ((ITypedef) tdIndex).getType();
|
||||||
assertTrue(tAST instanceof ICompositeType);
|
assertTrue(tAST instanceof ICompositeType);
|
||||||
|
@ -304,7 +304,7 @@ public class IndexCBindingResolutionBugs extends IndexBindingResolutionTestBase
|
||||||
assertTrue(tdIndex instanceof IIndexBinding);
|
assertTrue(tdIndex instanceof IIndexBinding);
|
||||||
assertTrue(tdAST instanceof ITypedef);
|
assertTrue(tdAST instanceof ITypedef);
|
||||||
assertTrue(tdIndex instanceof ITypedef);
|
assertTrue(tdIndex instanceof ITypedef);
|
||||||
|
|
||||||
tAST= ((ITypedef) tdAST).getType();
|
tAST= ((ITypedef) tdAST).getType();
|
||||||
tIndex= ((ITypedef) tdIndex).getType();
|
tIndex= ((ITypedef) tdIndex).getType();
|
||||||
assertTrue(tAST instanceof ICompositeType);
|
assertTrue(tAST instanceof ICompositeType);
|
||||||
|
@ -319,7 +319,7 @@ public class IndexCBindingResolutionBugs extends IndexBindingResolutionTestBase
|
||||||
assertTrue(tdIndex instanceof IIndexBinding);
|
assertTrue(tdIndex instanceof IIndexBinding);
|
||||||
assertTrue(tdAST instanceof ITypedef);
|
assertTrue(tdAST instanceof ITypedef);
|
||||||
assertTrue(tdIndex instanceof ITypedef);
|
assertTrue(tdIndex instanceof ITypedef);
|
||||||
|
|
||||||
tAST= ((ITypedef) tdAST).getType();
|
tAST= ((ITypedef) tdAST).getType();
|
||||||
tIndex= ((ITypedef) tdIndex).getType();
|
tIndex= ((ITypedef) tdIndex).getType();
|
||||||
assertTrue(tAST instanceof IEnumeration);
|
assertTrue(tAST instanceof IEnumeration);
|
||||||
|
@ -327,13 +327,13 @@ public class IndexCBindingResolutionBugs extends IndexBindingResolutionTestBase
|
||||||
assertTrue(tAST.isSameType(tIndex));
|
assertTrue(tAST.isSameType(tIndex));
|
||||||
assertTrue(tIndex.isSameType(tAST));
|
assertTrue(tIndex.isSameType(tAST));
|
||||||
}
|
}
|
||||||
|
|
||||||
// struct outer {
|
// struct outer {
|
||||||
// union {
|
// union {
|
||||||
// int var1;
|
// int var1;
|
||||||
// };
|
// };
|
||||||
// };
|
// };
|
||||||
|
|
||||||
// #include "header.h"
|
// #include "header.h"
|
||||||
// void test() {
|
// void test() {
|
||||||
// struct outer x;
|
// struct outer x;
|
||||||
|
@ -354,7 +354,7 @@ public class IndexCBindingResolutionBugs extends IndexBindingResolutionTestBase
|
||||||
// int var1;
|
// int var1;
|
||||||
// };
|
// };
|
||||||
// };
|
// };
|
||||||
|
|
||||||
// #include "header.h"
|
// #include "header.h"
|
||||||
// void test() {
|
// void test() {
|
||||||
// union outer x;
|
// union outer x;
|
||||||
|
@ -369,14 +369,14 @@ public class IndexCBindingResolutionBugs extends IndexBindingResolutionTestBase
|
||||||
assertTrue(outer instanceof ICCompositeTypeScope);
|
assertTrue(outer instanceof ICCompositeTypeScope);
|
||||||
assertEquals("outer", outer.getScopeName().toString());
|
assertEquals("outer", outer.getScopeName().toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
// int myFunc();
|
// int myFunc();
|
||||||
|
|
||||||
// int myFunc(var)
|
// int myFunc(var)
|
||||||
// int var;
|
// int var;
|
||||||
// {
|
// {
|
||||||
// return var;
|
// return var;
|
||||||
// }
|
// }
|
||||||
// int main(void) {
|
// int main(void) {
|
||||||
// return myFunc(0);
|
// return myFunc(0);
|
||||||
// }
|
// }
|
||||||
|
@ -390,7 +390,7 @@ public class IndexCBindingResolutionBugs extends IndexBindingResolutionTestBase
|
||||||
assertTrue(params[0].getType() instanceof IBasicType);
|
assertTrue(params[0].getType() instanceof IBasicType);
|
||||||
assertEquals(IBasicType.Kind.eInt, ((IBasicType) params[0].getType()).getKind());
|
assertEquals(IBasicType.Kind.eInt, ((IBasicType) params[0].getType()).getKind());
|
||||||
}
|
}
|
||||||
|
|
||||||
// typedef struct S S;
|
// typedef struct S S;
|
||||||
// void setValue(S *pSelf, int value);
|
// void setValue(S *pSelf, int value);
|
||||||
|
|
||||||
|
@ -404,7 +404,7 @@ public class IndexCBindingResolutionBugs extends IndexBindingResolutionTestBase
|
||||||
IBinding b = getBindingFromASTName("value =", 5);
|
IBinding b = getBindingFromASTName("value =", 5);
|
||||||
assertTrue(b instanceof IField);
|
assertTrue(b instanceof IField);
|
||||||
}
|
}
|
||||||
|
|
||||||
// void f255(
|
// 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,
|
||||||
// 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,
|
// 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(
|
// 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,
|
||||||
// 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 {
|
public void testFunctionsWithManyParameters_Bug319186() throws Exception {
|
||||||
getBindingFromASTName("f255", 0);
|
getBindingFromASTName("f255", 0);
|
||||||
getBindingFromASTName("f256", 0);
|
getBindingFromASTName("f256", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
// struct B {
|
// struct B {
|
||||||
// float f;
|
// float f;
|
||||||
// };
|
// };
|
||||||
|
@ -474,5 +474,5 @@ public class IndexCBindingResolutionBugs extends IndexBindingResolutionTestBase
|
||||||
// };
|
// };
|
||||||
public void testDesignatedInitializer_Bug210019() throws Exception {
|
public void testDesignatedInitializer_Bug210019() throws Exception {
|
||||||
IField f= getBindingFromASTName("f", 0);
|
IField f= getBindingFromASTName("f", 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue