diff --git a/test/testmathlib.cpp b/test/testmathlib.cpp index a682be854..866d242b6 100644 --- a/test/testmathlib.cpp +++ b/test/testmathlib.cpp @@ -186,6 +186,25 @@ private: ASSERT_EQUALS(false, MathLib::isInt("+1.0E-1")); ASSERT_EQUALS(false, MathLib::isInt("-1.E+1")); ASSERT_EQUALS(false, MathLib::isInt("+1.E-1")); + ASSERT_EQUALS(false, MathLib::isInt(" 1.0E+1")); + // with whitspaces in front + ASSERT_EQUALS(false, MathLib::isInt(" 1.0E-1")); + ASSERT_EQUALS(false, MathLib::isInt(" -1.0E+1")); + ASSERT_EQUALS(false, MathLib::isInt(" +1.0E-1")); + ASSERT_EQUALS(false, MathLib::isInt(" -1.E+1")); + ASSERT_EQUALS(false, MathLib::isInt(" +1.E-1")); + // with whitspaces in front and end + ASSERT_EQUALS(false, MathLib::isInt(" 1.0E-1 ")); + ASSERT_EQUALS(false, MathLib::isInt(" -1.0E+1 ")); + ASSERT_EQUALS(false, MathLib::isInt(" +1.0E-1 ")); + ASSERT_EQUALS(false, MathLib::isInt(" -1.E+1 ")); + ASSERT_EQUALS(false, MathLib::isInt(" +1.E-1 ")); + // with whitspaces in front and end + ASSERT_EQUALS(false, MathLib::isInt("1.0E-1 ")); + ASSERT_EQUALS(false, MathLib::isInt("-1.0E+1 ")); + ASSERT_EQUALS(false, MathLib::isInt("+1.0E-1 ")); + ASSERT_EQUALS(false, MathLib::isInt("-1.E+1 ")); + ASSERT_EQUALS(false, MathLib::isInt("+1.E-1 ")); } void isnegative()