1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-07 09:46:02 +02:00

Test case for bug 263159.

This commit is contained in:
Sergey Prigogin 2009-02-01 03:57:17 +00:00
parent 87a19bbe37
commit 8c2f625a89

View file

@ -5927,7 +5927,6 @@ public class AST2CPPTests extends AST2BaseTest {
public void testTypeid_Bug209578() throws Exception { public void testTypeid_Bug209578() throws Exception {
parseAndCheckBindings(getAboveComment(), ParserLanguage.CPP); parseAndCheckBindings(getAboveComment(), ParserLanguage.CPP);
} }
// typedef char* t1; // typedef char* t1;
// typedef char t2[8]; // typedef char t2[8];
@ -5943,8 +5942,7 @@ public class AST2CPPTests extends AST2BaseTest {
public void testArrayToPtrConversionForTypedefs_Bug239931() throws Exception { public void testArrayToPtrConversionForTypedefs_Bug239931() throws Exception {
parseAndCheckBindings(getAboveComment(), ParserLanguage.CPP); parseAndCheckBindings(getAboveComment(), ParserLanguage.CPP);
} }
// typedef char t[12]; // typedef char t[12];
// void test1(char *); // void test1(char *);
// void test2(char []); // void test2(char []);
@ -5958,7 +5956,7 @@ public class AST2CPPTests extends AST2BaseTest {
public void testAdjustmentOfParameterTypes_Bug239975() throws Exception { public void testAdjustmentOfParameterTypes_Bug239975() throws Exception {
parseAndCheckBindings(getAboveComment(), ParserLanguage.CPP); parseAndCheckBindings(getAboveComment(), ParserLanguage.CPP);
} }
// class A { // class A {
// public: // public:
// void m(int c); // void m(int c);
@ -6620,7 +6618,7 @@ public class AST2CPPTests extends AST2BaseTest {
// struct A {}; // struct A {};
// //
// void foo() { // void test() {
// while ( // while (
// A* a = 0 // A* a = 0
// ); // );
@ -6630,4 +6628,17 @@ public class AST2CPPTests extends AST2BaseTest {
ba.assertNonProblem("A*", 1, ICPPClassType.class); ba.assertNonProblem("A*", 1, ICPPClassType.class);
ba.assertNonProblem("a", 1, ICPPVariable.class); ba.assertNonProblem("a", 1, ICPPVariable.class);
} }
// const char x[] = "";
//
// void f(const char* p);
// void f(char p);
//
// void test() {
// f(x); // problem on f
// }
public void _testArrayParameter_263159() throws Exception {
BindingAssertionHelper ba= new BindingAssertionHelper(getAboveComment(), true);
ba.assertNonProblem("f(x)", 1, ICPPFunction.class);
}
} }