From 4bfacefdd863f94e69a48ebd9a611a23e92f1b7c Mon Sep 17 00:00:00 2001 From: kervala Date: Fri, 5 Feb 2016 12:30:26 +0100 Subject: [PATCH] Merge with develop --- code/nel/tools/nel_unit_test/ut_misc_string_common.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/code/nel/tools/nel_unit_test/ut_misc_string_common.h b/code/nel/tools/nel_unit_test/ut_misc_string_common.h index 33378a8ec..623d2d39e 100644 --- a/code/nel/tools/nel_unit_test/ut_misc_string_common.h +++ b/code/nel/tools/nel_unit_test/ut_misc_string_common.h @@ -444,11 +444,13 @@ struct CUTMiscStringCommon : public Test::Suite // min limit -1, unable to compare with minimum value because no lower type ret = NLMISC::fromString("-9223372036854775809", val); - TEST_ASSERT(ret && val == std::numeric_limits::max()); + // with GCC, it returns min, with VC++ it returns max + TEST_ASSERT(ret && (val == std::numeric_limits::max() || std::numeric_limits::min())); // max limit +1, unable to compare with maximum value because no higher type ret = NLMISC::fromString("9223372036854775808", val); - TEST_ASSERT(ret && val == std::numeric_limits::min()); + // with GCC, it returns max with VC++ it returns min + TEST_ASSERT(ret && (val == std::numeric_limits::min() || std::numeric_limits::max())); // with period ret = NLMISC::fromString("1.2", val); @@ -508,7 +510,8 @@ struct CUTMiscStringCommon : public Test::Suite // max limit +1, unable to compare with maximum value because no higher type ret = NLMISC::fromString("18446744073709551616", val); - TEST_ASSERT(ret && val == std::numeric_limits::min()); + // with GCC, it returns max with VC++ it returns min + TEST_ASSERT(ret && (val == std::numeric_limits::min() || val == std::numeric_limits::max())); // with period ret = NLMISC::fromString("1.2", val);