Package mlc.forselect

Source Code of mlc.forselect.ResultObj

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 > 0Assert.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;
}
TOP

Related Classes of mlc.forselect.ResultObj

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.