MathLib: Added missing testcase for incdec.
This commit is contained in:
parent
60e80b6fb1
commit
8fe163285f
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue