package mlc.forselect;
import java.io.File;
import java.io.IOException;
import junit.framework.Assert;
import org.antlr.runtime.RecognitionException;
import org.antlr.runtime.TokenStream;
import org.junit.Before;
import org.junit.Test;
import tool.model.grammar.ForSelectParser;
public class ResultObj extends ForTest{
public int testClassFile(File cex, boolean failOnError) throws RecognitionException, IOException {
ForSelectParser parser = getParser(cex);
printTree(parser.forStatement().getTree());
int errors = parser.getNumberOfSyntaxErrors();
if (errors > 0) Assert.fail() ;
return errors;
}
@Before
public void setUp() throws Exception {
}
@Test
public void testCDF() throws RecognitionException, IOException {
this.testClassFile(new File("pmilne_star_dev_batch_performance/Crucis/NavCoreServices/AbsInvAccTranDBHandler.CLA"), true);
}
// This regex will find for sql select
// for\s+\([\s\S]+?\)\sin\s+sql\s+select\s[\s\S]+?\send\s+for;
}