From d1fd45b29a8ad6f8ad1f574cedcd917bae0e3c82 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Wed, 1 May 2019 12:49:01 +0800 Subject: [PATCH] Adjust test case --- .../tools/nel_unit_test/ut_misc_string_common.h | 15 ++++++++++++--- 1 file changed, 12 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 623d2d39e..b7c133e17 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 @@ -707,6 +707,12 @@ struct CUTMiscStringCommon : public Test::Suite ret = NLMISC::fromString("yes", val); TEST_ASSERT(ret && val); + ret = NLMISC::fromString("YES", val); + TEST_ASSERT(ret && val); + + ret = NLMISC::fromString("True", val); + TEST_ASSERT(ret && val); + // false values ret = NLMISC::fromString("0", val); TEST_ASSERT(ret && !val); @@ -730,14 +736,17 @@ struct CUTMiscStringCommon : public Test::Suite TEST_ASSERT(ret && !val); // wrong values - ret = NLMISC::fromString("YES", val); - TEST_ASSERT(!ret && !val); - ret = NLMISC::fromString("foo", val); TEST_ASSERT(!ret && !val); ret = NLMISC::fromString("a", val); TEST_ASSERT(!ret && !val); + + ret = NLMISC::fromString("Yesss", val); + TEST_ASSERT(!ret && !val); + + ret = NLMISC::fromString("nope", val); + TEST_ASSERT(!ret && !val); } };