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

Fixed Bug 79540 [Parser] Macros in class declaration

Committed test case.
This commit is contained in:
John Camelon 2005-07-12 20:17:15 +00:00
parent 2586ae45c5
commit 9faa7fee14

View file

@ -101,6 +101,16 @@ import org.eclipse.cdt.internal.core.parser.ParserException;
*/
public class AST2CPPTests extends AST2BaseTest {
public void testBug79540() throws Exception {
StringBuffer buffer = new StringBuffer( "#define REF_WRAP(e) class A { public: A (){ } A& foo2(e& v) { return *this; } }\n" ); //$NON-NLS-1$
buffer.append( "class B\n" ); //$NON-NLS-1$
buffer.append( "{\n" ); //$NON-NLS-1$
buffer.append( "REF_WRAP(B);\n" ); //$NON-NLS-1$
buffer.append( "B();\n" ); //$NON-NLS-1$
buffer.append( "void foo();\n" ); //$NON-NLS-1$
buffer.append( "};\n" ); //$NON-NLS-1$
parseAndCheckBindings( buffer.toString() );
}
public void testBug78103() throws Exception {
StringBuffer buffer = new StringBuffer( "int *p1; int *p2;\n" ); //$NON-NLS-1$