package tests.antlrParsers.moduleParser;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
import antlr.C.ModuleParser;
public class OtherTests extends FunctionDefinitionTests
{
@Test
public void testNestedFunctionName()
{
String input = "int (foo)(){}";
ModuleParser parser = createParser(input);
String output = parser.function_def().toStringTree(parser);
assertTrue(output.startsWith("(function_def "));
}
@Test
public void testOperatorOverloading()
{
String input = "inline bool operator == (const PlMessageHeader &b) const {}";
ModuleParser parser = createParser(input);
String output = parser.function_def().toStringTree(parser);
assertTrue(output.startsWith("(function_def "));
}
@Test
public void testExceptionSpecificationCpp()
{
String input = "int foo() throw(){}";
ModuleParser parser = createParser(input);
String output = parser.function_def().toStringTree(parser);
assertTrue(output.startsWith("(function_def "));
}
}