void TestCase(GeneralAntlrParserWrapper parser, string filename) { string input = Path.Join(GetTestFilesFolder(), filename); string output = input + ".result"; var texts = AntlrCommon.ReadTestCases(input); AntlrCommon.WriteTestCaseResultsToFile(parser, texts, output); Assert.AreEqual(FileEquals(output, input + ".result.canon"), true); }
static void Main(string[] args) { string input = ParseArgs(args); var output = input + ".result"; var texts = AntlrCommon.ReadTestCases(input); GeneralAntlrParserWrapper parser = null; Console.Error.Write(String.Format("Grammar {0}\n", ParseType)); if (ParseType == "realty_all") { parser = new AntlrStrictParser(); } else if (ParseType == "country") { parser = new AntlrCountryListParser(); } else { Debug.Assert(false); } parser.BeVerbose(); AntlrCommon.WriteTestCaseResultsToFile(parser, texts, output); }