Fixed #6280 (MathLib: binary literals are integers)
This commit is contained in:
parent
1c191845fb
commit
b7c9187539
|
@ -505,7 +505,7 @@ bool MathLib::isDec(const std::string & s)
|
|||
|
||||
bool MathLib::isInt(const std::string & s)
|
||||
{
|
||||
return isDec(s) || isHex(s) || isOct(s);
|
||||
return isDec(s) || isHex(s) || isOct(s) || isBin(s);
|
||||
}
|
||||
|
||||
std::string MathLib::add(const std::string & first, const std::string & second)
|
||||
|
|
|
@ -274,6 +274,8 @@ private:
|
|||
|
||||
ASSERT_EQUALS(true , MathLib::isInt("0xff"));
|
||||
ASSERT_EQUALS(true , MathLib::isInt("0xa"));
|
||||
ASSERT_EQUALS(true , MathLib::isInt("0b1000"));
|
||||
ASSERT_EQUALS(true , MathLib::isInt("0B1000"));
|
||||
ASSERT_EQUALS(true , MathLib::isInt("0l"));
|
||||
ASSERT_EQUALS(true , MathLib::isInt("0L"));
|
||||
ASSERT_EQUALS(true , MathLib::isInt("0ul"));
|
||||
|
|
Loading…
Reference in New Issue