示例#1
0
 /// <summary>
 /// This is a private helper method that will read a dictionary of test
 /// inputs and expected outputs. For each item in the dictionary, the
 /// actual results of the RawInputParser.ParseExpressionIntoList method
 /// will be checked using the CheckSyntaxTokenListsAreEqual method.
 /// </summary>
 private void TestAllExpressionsParseCorrectly(Dictionary <string, string[]> expressionsAndResults)
 {
     foreach (var currentTestCase in expressionsAndResults)
     {
         string   inputExpression         = currentTestCase.Key;
         string[] expectedSyntaxTokenList = currentTestCase.Value;
         string[] actualSyntaxTokenList   = RawInputParser.ParseExpressionIntoList(inputExpression);
         Assert.IsTrue(CheckSyntaxTokenListsAreEqual(expectedSyntaxTokenList, actualSyntaxTokenList));
     }
 }
 public string[] ParseInputLine(string inputLine)
 {
     return(RawInputParser.ParseExpressionIntoList(inputLine));
 }