mirror of
https://github.com/open-source-parsers/jsoncpp.git
synced 2024-12-12 10:03:51 +01:00
Add some test cases in ValueTest (#1010)
* add some test cases in ValueTest * add some test cases in ValueTest
This commit is contained in:
parent
b941149a37
commit
c92c87b47d
@ -141,9 +141,17 @@ JSONTEST_FIXTURE(ValueTest, checkNormalizeFloatingPointStr) {
|
||||
JSONTEST_ASSERT_STRING_EQUAL("1234.0", normalizeFloatingPointStr("1234.0"));
|
||||
JSONTEST_ASSERT_STRING_EQUAL("1234.0e0",
|
||||
normalizeFloatingPointStr("1234.0e0"));
|
||||
JSONTEST_ASSERT_STRING_EQUAL("1234.0e-1",
|
||||
normalizeFloatingPointStr("1234.0e-1"));
|
||||
JSONTEST_ASSERT_STRING_EQUAL("1234.0e+0",
|
||||
normalizeFloatingPointStr("1234.0e+0"));
|
||||
JSONTEST_ASSERT_STRING_EQUAL("1234.0e+1",
|
||||
normalizeFloatingPointStr("1234.0e+001"));
|
||||
JSONTEST_ASSERT_STRING_EQUAL("1234e-1", normalizeFloatingPointStr("1234e-1"));
|
||||
JSONTEST_ASSERT_STRING_EQUAL("1234e+0",
|
||||
normalizeFloatingPointStr("1234e+000"));
|
||||
JSONTEST_ASSERT_STRING_EQUAL("1234e+1",
|
||||
normalizeFloatingPointStr("1234e+001"));
|
||||
JSONTEST_ASSERT_STRING_EQUAL("1234e10", normalizeFloatingPointStr("1234e10"));
|
||||
JSONTEST_ASSERT_STRING_EQUAL("1234e10",
|
||||
normalizeFloatingPointStr("1234e010"));
|
||||
@ -155,8 +163,6 @@ JSONTEST_FIXTURE(ValueTest, checkNormalizeFloatingPointStr) {
|
||||
normalizeFloatingPointStr("1234e+100"));
|
||||
JSONTEST_ASSERT_STRING_EQUAL("1234e-100",
|
||||
normalizeFloatingPointStr("1234e-100"));
|
||||
JSONTEST_ASSERT_STRING_EQUAL("1234e+1",
|
||||
normalizeFloatingPointStr("1234e+001"));
|
||||
}
|
||||
|
||||
JSONTEST_FIXTURE(ValueTest, memberCount) {
|
||||
@ -172,6 +178,9 @@ JSONTEST_FIXTURE(ValueTest, memberCount) {
|
||||
JSONTEST_ASSERT_PRED(checkMemberCount(emptyString_, 0));
|
||||
JSONTEST_ASSERT_PRED(checkMemberCount(string_, 0));
|
||||
JSONTEST_ASSERT_PRED(checkMemberCount(true_, 0));
|
||||
JSONTEST_ASSERT_PRED(checkMemberCount(false_, 0));
|
||||
JSONTEST_ASSERT_PRED(checkMemberCount(string1_, 0));
|
||||
JSONTEST_ASSERT_PRED(checkMemberCount(float_, 0));
|
||||
}
|
||||
|
||||
JSONTEST_FIXTURE(ValueTest, objects) {
|
||||
|
Loading…
Reference in New Issue
Block a user