public void AllSubtractOperandTypesAreSupported()
 => TestCommon.TestThatAllPossibleOperandTypesAreSupported(_supportedOperatorPairs, (l, r) => TestCommon.Operate(null, OperatorType.Subtract, l, r), "subtracted");
 public void SubtractOperandTypeTests(string actualStr, string expectedStr, string expectedTypeStr)
 => TestCommon.EvaluateActualAndExpected(actualStr, expectedStr, expectedTypeStr, new Configuration()
 {
     AllowMultidayTimes = true
 });
Пример #3
0
 public void AMinusCanLeadTheExpression(string stringToParse, string expectedParseString)
 => TestCommon.CompareParseTree(stringToParse, expectedParseString);
Пример #4
0
 public void TypedFloatValueIsParsedCorrectly(string stringToParse, string expectedTokenStr)
 => TestCommon.LiteralTokensAreParsedCorrectly <FloatToken>(stringToParse, expectedTokenStr);
Пример #5
0
 public void ADoubleMinusIsANegativeNumber(string stringToParse, string expectedParseString)
 => TestCommon.CompareParseTree(stringToParse, expectedParseString);
Пример #6
0
 public void ATripleMinusIsInvalid(string stringToParse)
 => TestCommon.CompareParseTree(stringToParse);
 public void UnlimitedIntegerNegativeValuesAreParsedCorrectly(string stringToParse, string expectedTokenStr)
 => TestCommon.LiteralTokensAreParsedCorrectly <UnlimitedIntegerToken>(stringToParse, expectedTokenStr);
Пример #8
0
 public void ASingleMinusIsASimpleExpression(string stringToParse, string expectedParseString)
 => TestCommon.CompareParseTree(stringToParse, expectedParseString);
 public void AllDivideOperandTypesAreSupported()
 => TestCommon.TestThatAllPossibleOperandTypesAreSupported(_supportedOperatorPairs, (l, r) => TestCommon.Operate(null, OperatorType.Divide, l, r), "divided");
Пример #10
0
 public void AllPowerOperandTypesAreSupported()
 => TestCommon.TestThatAllPossibleOperandTypesAreSupported(_supportedOperatorPairs, (l, r) => TestCommon.Operate(null, OperatorType.Power, l, r), "raised to the power of");
Пример #11
0
 public void OctUnsignedLimitedIntegerValuesAreParsedCorrectly(string stringToParse, string expectedValue)
 => TestCommon.LiteralTokensAreParsedCorrectly <LimitedIntegerToken, BigInteger>(stringToParse, BigInteger.Parse(expectedValue));
Пример #12
0
 public void BinLimitedIntegerValuesWithInvalidDigitsAreNotParsed(string stringToParse)
 => TestCommon.LiteralTokensAreParsedCorrectly <LimitedIntegerToken>(stringToParse, null);
Пример #13
0
 public void BinLimitedIntegerValuesOutOfRangeAreNotParsed(string stringToParse)
 => TestCommon.LiteralTokensAreParsedCorrectly <LimitedIntegerToken>(stringToParse, null);
 public void AllMultiplyOperandTypesAreSupported()
 => TestCommon.TestThatAllPossibleOperandTypesAreSupported(_supportedOperatorPairs, (l, r) => TestCommon.Operate(null, OperatorType.Multiply, l, r), "multiplied");
Пример #15
0
 public void DatesAreParsedCorrectly(string stringToParse, string expectedTokenStr)
 => TestCommon.LiteralTokensAreParsedCorrectly <DateToken>(stringToParse, expectedTokenStr);