package tool.model.grammar;
import java.io.IOException;
import junit.framework.Assert;
import org.antlr.runtime.CharStream;
import org.antlr.runtime.CommonTokenStream;
import org.antlr.runtime.RecognitionException;
import org.antlr.runtime.TokenStream;
import org.antlr.runtime.tree.CommonTree;
import org.junit.Test;
public class TestCursor extends ANTLRTest {
@Test
public void cursorFile() throws RecognitionException, IOException{
CharStream stream =
new NoCaseFileStream("TestSmall/WinDB/BlobCursor.cur");
ToolSQLLexer lexer = new ToolSQLLexer(stream);
TokenStream tokenStream = new CommonTokenStream(lexer);
ForteParser parser = new ForteParser(tokenStream);
CommonTree tree = (CommonTree) parser.cursorFile().getTree();
printTree(tree);
int errors = parser.getNumberOfSyntaxErrors();
if (errors > 0) Assert.fail() ;
}
}