#ticket 2429: added a test to the mathlib to ensure the used floating point number is recognized correctly

This commit is contained in:
Ettl Martin 2011-01-07 12:27:12 +01:00
parent bfc95e01c1
commit 9b66f7a754
2 changed files with 2 additions and 1 deletions

View File

@ -88,7 +88,7 @@ static BOOL MyIsDirectory(std::string path)
return (GetFileAttributes(path.c_str()) & FILE_ATTRIBUTE_DIRECTORY); return (GetFileAttributes(path.c_str()) & FILE_ATTRIBUTE_DIRECTORY);
#else #else
// See http://msdn.microsoft.com/en-us/library/bb773621(VS.85).aspx // See http://msdn.microsoft.com/en-us/library/bb773621(VS.85).aspx
return PathIsDirectory(path.c_str()); return PathIsDirectory(path.c_str());
#endif #endif
} }

View File

@ -262,6 +262,7 @@ private:
ASSERT_EQUALS(false , MathLib::isFloat("+1E+10000")); ASSERT_EQUALS(false , MathLib::isFloat("+1E+10000"));
ASSERT_EQUALS(false , MathLib::isFloat("-1E+1")); ASSERT_EQUALS(false , MathLib::isFloat("-1E+1"));
ASSERT_EQUALS(false , MathLib::isFloat("-1E+10000")); ASSERT_EQUALS(false , MathLib::isFloat("-1E+10000"));
ASSERT_EQUALS(true , MathLib::isFloat(".1250E+04"));
ASSERT_EQUALS(true , MathLib::isFloat("-1E-1")); ASSERT_EQUALS(true , MathLib::isFloat("-1E-1"));
ASSERT_EQUALS(true , MathLib::isFloat("-1E-10000")); ASSERT_EQUALS(true , MathLib::isFloat("-1E-10000"));