]> git.feebdaed.xyz Git - 0xmirror/cJSON.git/commitdiff
update testcase, fixes #433
authorAlanscut <wp_scut@163.com>
Thu, 2 Apr 2020 08:24:10 +0000 (16:24 +0800)
committerAlanscut <wp_scut@163.com>
Thu, 2 Apr 2020 08:24:10 +0000 (16:24 +0800)
tests/compare_tests.c

index 307d0e828ec93e25a4d781df721235c757ddc5f9..797c7740cc4fe8acd61876fb0eb02f2d094033b2 100644 (file)
@@ -64,6 +64,9 @@ static void cjson_compare_should_compare_numbers(void)
     TEST_ASSERT_TRUE(compare_from_string("1", "1", false));
     TEST_ASSERT_TRUE(compare_from_string("0.0001", "0.0001", true));
     TEST_ASSERT_TRUE(compare_from_string("0.0001", "0.0001", false));
+    TEST_ASSERT_TRUE(compare_from_string("1E100", "10E99", false));
+
+    TEST_ASSERT_FALSE(compare_from_string("0.5E-100", "0.5E-101", false));
 
     TEST_ASSERT_FALSE(compare_from_string("1", "2", true));
     TEST_ASSERT_FALSE(compare_from_string("1", "2", false));