Skip to content

Commit

Permalink
coverage report fix: more testcases for mathlib::isInt() added in ord…
Browse files Browse the repository at this point in the history
…er to get a better coverage
  • Loading branch information
Martin Ettl committed Apr 2, 2010
1 parent 427d155 commit 0f284b4
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions test/testmathlib.cpp
Expand Up @@ -186,6 +186,25 @@ class TestMathLib : public TestFixture
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()
Expand Down

0 comments on commit 0f284b4

Please sign in to comment.