coverage report fix: more testcases for mathlib::isInt() added in order to get a better coverage

This commit is contained in:
Martin Ettl 2010-04-02 22:18:50 +02:00
parent 427d155644
commit 0f284b477d
1 changed files with 19 additions and 0 deletions

View File

@ -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()