From 9b66f7a754e53c3118d949320ae29d2d0cd172f7 Mon Sep 17 00:00:00 2001 From: Ettl Martin Date: Fri, 7 Jan 2011 12:27:12 +0100 Subject: [PATCH] #ticket 2429: added a test to the mathlib to ensure the used floating point number is recognized correctly --- lib/filelister_win32.cpp | 2 +- test/testmathlib.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/filelister_win32.cpp b/lib/filelister_win32.cpp index 565bd579b..a9a8f895d 100644 --- a/lib/filelister_win32.cpp +++ b/lib/filelister_win32.cpp @@ -88,7 +88,7 @@ static BOOL MyIsDirectory(std::string path) return (GetFileAttributes(path.c_str()) & FILE_ATTRIBUTE_DIRECTORY); #else // See http://msdn.microsoft.com/en-us/library/bb773621(VS.85).aspx -return PathIsDirectory(path.c_str()); + return PathIsDirectory(path.c_str()); #endif } diff --git a/test/testmathlib.cpp b/test/testmathlib.cpp index 4e0f2d3d2..155dec47c 100644 --- a/test/testmathlib.cpp +++ b/test/testmathlib.cpp @@ -262,6 +262,7 @@ private: ASSERT_EQUALS(false , MathLib::isFloat("+1E+10000")); ASSERT_EQUALS(false , MathLib::isFloat("-1E+1")); 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-10000"));