MCPcopy Create free account
hub / github.com/apache/pig / test

Method test

test/org/apache/pig/parser/TestQueryParser.java:40–55  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

38public class TestQueryParser {
39
40 @Test
41 public void test() throws IOException, RecognitionException {
42 CharStream input = new QueryParserFileStream( "test/org/apache/pig/parser/TestParser.pig" );
43 QueryLexer lexer = new QueryLexer(input);
44 CommonTokenStream tokens = new CommonTokenStream(lexer);
45
46 QueryParser parser = new QueryParser(tokens);
47 QueryParser.query_return result = parser.query();
48
49 Tree ast = (Tree)result.getTree();
50
51 System.out.println( ast.toStringTree() );
52 TreePrinter.printTree( (CommonTree)ast, 0 );
53 Assert.assertEquals( 0, lexer.getNumberOfSyntaxErrors() );
54 Assert.assertEquals( 0, parser.getNumberOfSyntaxErrors() );
55 }
56
57 @Test
58 // After PIG-438, realias statement is valid

Callers

nothing calls this directly

Calls 2

printTreeMethod · 0.95
assertEqualsMethod · 0.45

Tested by

no test coverage detected