Lines Matching defs:compare_from_string

27 static cJSON_bool compare_from_string(const char * const a, const char * const b, const cJSON_bool case_sensitive)
63 TEST_ASSERT_TRUE(compare_from_string("1", "1", true));
64 TEST_ASSERT_TRUE(compare_from_string("1", "1", false));
65 TEST_ASSERT_TRUE(compare_from_string("0.0001", "0.0001", true));
66 TEST_ASSERT_TRUE(compare_from_string("0.0001", "0.0001", false));
67 TEST_ASSERT_TRUE(compare_from_string("1E100", "10E99", false));
69 TEST_ASSERT_FALSE(compare_from_string("0.5E-100", "0.5E-101", false));
71 TEST_ASSERT_FALSE(compare_from_string("1", "2", true));
72 TEST_ASSERT_FALSE(compare_from_string("1", "2", false));
78 TEST_ASSERT_TRUE(compare_from_string("1LL", "1LL", true));
79 TEST_ASSERT_TRUE(compare_from_string("1LL", "1LL", false));
80 TEST_ASSERT_TRUE(compare_from_string("9223372036854775807LL", "9223372036854775807LL", true));
81 TEST_ASSERT_TRUE(compare_from_string("9223372036854775807LL", "9223372036854775807LL", false));
82 TEST_ASSERT_TRUE(compare_from_string("-9223372036854775808LL", "-9223372036854775808LL", true));
83 TEST_ASSERT_TRUE(compare_from_string("-9223372036854775808LL", "-9223372036854775808LL", false));
85 TEST_ASSERT_FALSE(compare_from_string("1LL", "2LL", true));
86 TEST_ASSERT_FALSE(compare_from_string("1LL", "2LL", false));
93 TEST_ASSERT_TRUE(compare_from_string("true", "true", true));
94 TEST_ASSERT_TRUE(compare_from_string("true", "true", false));
97 TEST_ASSERT_TRUE(compare_from_string("false", "false", true));
98 TEST_ASSERT_TRUE(compare_from_string("false", "false", false));
101 TEST_ASSERT_FALSE(compare_from_string("true", "false", true));
102 TEST_ASSERT_FALSE(compare_from_string("true", "false", false));
103 TEST_ASSERT_FALSE(compare_from_string("false", "true", true));
104 TEST_ASSERT_FALSE(compare_from_string("false", "true", false));
109 TEST_ASSERT_TRUE(compare_from_string("null", "null", true));
110 TEST_ASSERT_TRUE(compare_from_string("null", "null", false));
112 TEST_ASSERT_FALSE(compare_from_string("null", "true", true));
113 TEST_ASSERT_FALSE(compare_from_string("null", "true", false));
129 TEST_ASSERT_TRUE(compare_from_string("\"abcdefg\"", "\"abcdefg\"", true));
130 TEST_ASSERT_TRUE(compare_from_string("\"abcdefg\"", "\"abcdefg\"", false));
132 TEST_ASSERT_FALSE(compare_from_string("\"ABCDEFG\"", "\"abcdefg\"", true));
133 TEST_ASSERT_FALSE(compare_from_string("\"ABCDEFG\"", "\"abcdefg\"", false));
158 TEST_ASSERT_TRUE(compare_from_string("[]", "[]", true));
159 TEST_ASSERT_TRUE(compare_from_string("[]", "[]", false));
161 TEST_ASSERT_TRUE(compare_from_string("[false,true,null,42,\"string\",[],{}]", "[false, true, null, 42, \"string\", [], {}]", true));
162 TEST_ASSERT_TRUE(compare_from_string("[false,true,null,42,\"string\",[],{}]", "[false, true, null, 42, \"string\", [], {}]", false));
164 TEST_ASSERT_TRUE(compare_from_string("[[[1], 2]]", "[[[1], 2]]", true));
165 TEST_ASSERT_TRUE(compare_from_string("[[[1], 2]]", "[[[1], 2]]", false));
167 TEST_ASSERT_FALSE(compare_from_string("[true,null,42,\"string\",[],{}]", "[false, true, null, 42, \"string\", [], {}]", true));
168 TEST_ASSERT_FALSE(compare_from_string("[true,null,42,\"string\",[],{}]", "[false, true, null, 42, \"string\", [], {}]", false));
171 TEST_ASSERT_FALSE(compare_from_string("[1,2,3]", "[1,2]", true));
172 TEST_ASSERT_FALSE(compare_from_string("[1,2,3]", "[1,2]", false));
177 TEST_ASSERT_TRUE(compare_from_string("{}", "{}", true));
178 TEST_ASSERT_TRUE(compare_from_string("{}", "{}", false));
180 TEST_ASSERT_TRUE(compare_from_string(
184 TEST_ASSERT_FALSE(compare_from_string(
188 TEST_ASSERT_TRUE(compare_from_string(
192 TEST_ASSERT_FALSE(compare_from_string(
197 TEST_ASSERT_FALSE(compare_from_string(
201 TEST_ASSERT_FALSE(compare_from_string(