Add some test cases in ValueTest (#1010)
* add some test cases in ValueTest
* add some test cases in ValueTest
diff --git a/src/test_lib_json/main.cpp b/src/test_lib_json/main.cpp
index c6f2c5c..7de8491 100644
--- a/src/test_lib_json/main.cpp
+++ b/src/test_lib_json/main.cpp
@@ -141,9 +141,17 @@
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 @@
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_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) {