Adjust test case
This commit is contained in:
parent
83fdb7b4a1
commit
d1fd45b29a
1 changed files with 12 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue