Exemplo n.º 1
0
 public void ExplicitAlternative(string expression, bool passes)
 {
     if (passes)
     {
         Assert.True(Lexico.TryParse(expression, out Truthy _, new ConsoleDeveloperTrace()));
     }
     else
     {
         Assert.False(Lexico.TryParse(expression, out Truthy _, new ConsoleDeveloperTrace()));
     }
 }
Exemplo n.º 2
0
 public void IndirectAlternative(Type parseType, string expression, bool passes)
 {
     if (passes)
     {
         Assert.True(Lexico.TryParse(expression, parseType, out _, new ConsoleDeveloperTrace()));
     }
     else
     {
         Assert.False(Lexico.TryParse(expression, parseType, out _, new ConsoleDeveloperTrace()));
     }
 }
Exemplo n.º 3
0
 public void EmptyUserTraceDoesntBlowUp()
 {
     var result = Lexico.TryParse("5", out int i, new UserTrace(Console.WriteLine));
 }
Exemplo n.º 4
0
 public void OrderOfSequenceCorrect()
 {
     Assert.True(Lexico.TryParse(" 5 ", out NonGenericSequence _, new ConsoleDeveloperTrace()));
 }