MathLib: Added missing testcase for incdec.

This commit is contained in:
orbitcowboy 2014-06-04 08:41:30 +02:00
parent 60e80b6fb1
commit 8fe163285f
2 changed files with 2 additions and 1 deletions

View File

@ -548,7 +548,6 @@ std::string MathLib::incdec(const std::string & var, const std::string & op)
throw InternalError(0, std::string("Unexpected operation '") + op + "' in MathLib::incdec(). Please report this to Cppcheck developers.");
return "";
}
std::string MathLib::divide(const std::string &first, const std::string &second)

View File

@ -800,6 +800,8 @@ private:
const MathLib::biguint decrementedNum = MathLib::toULongNumber(strNum);
ASSERT_EQUALS(num - 1U, decrementedNum);
}
// invalid operation
ASSERT_THROW(MathLib::incdec("1", "x"), InternalError); // throw
}
};