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())); } }
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())); } }
public void EmptyUserTraceDoesntBlowUp() { var result = Lexico.TryParse("5", out int i, new UserTrace(Console.WriteLine)); }
public void OrderOfSequenceCorrect() { Assert.True(Lexico.TryParse(" 5 ", out NonGenericSequence _, new ConsoleDeveloperTrace())); }