public void sad_path_with_exception()
        {
            grammar = new CheckGrammar<int>("value", () => { throw new NotImplementedException(); });

            StepExecutionResult results = grammar.Execute(step);
            results.Counts.ShouldEqual(0, 0, 1, 0);
            results.Results.HasErrors().ShouldBeTrue();
        }
Exemple #2
0
        public void sad_path_with_exception()
        {
            grammar = new CheckGrammar <int>("value", () => { throw new NotImplementedException(); });

            StepExecutionResult results = grammar.Execute(step);

            results.Counts.ShouldEqual(0, 0, 1, 0);
            results.Results.HasErrors().ShouldBeTrue();
        }
Exemple #3
0
 public void SetUp()
 {
     step    = new Step("grammar").With("value", "4");
     grammar = new CheckGrammar <int>("value", () => 4);
 }
 void IParserPostProcessor.Postprocess(ParserPostProcessParams postProcessorParams)
 {
     TreeContext context = new TreeContext(postProcessorParams);
     var checker = new CheckGrammar(context);
     if (!checker.bOk_) return;
     var normalize = new NormalizeTree(context,checker.setRules_);
     if (!normalize.bOk_) return;
     Peg.CSharp.PegCSharpGenerator cSharpGenerator = new Peg.CSharp.PegCSharpGenerator(context);
 }
 public void SetUp()
 {
     step = new Step("grammar").With("value", "4");
     grammar = new CheckGrammar<int>("value", () => 4);
 }