Lines Matching refs:found
40 cJSON *found = NULL;
44 found = cJSON_GetObjectItem(NULL, "test");
45 TEST_ASSERT_NULL_MESSAGE(found, "Failed to fail on NULL pointer.");
47 found = cJSON_GetObjectItem(item, NULL);
48 TEST_ASSERT_NULL_MESSAGE(found, "Failed to fail on NULL string.");
50 found = cJSON_GetObjectItem(item, "one");
51 TEST_ASSERT_NOT_NULL_MESSAGE(found, "Failed to find first item.");
52 TEST_ASSERT_EQUAL_DOUBLE(found->valuedouble, 1);
53 assert_is_int64(found);
55 found = cJSON_GetObjectItem(item, "tWo");
56 TEST_ASSERT_NOT_NULL_MESSAGE(found, "Failed to find first item.");
57 TEST_ASSERT_EQUAL_DOUBLE(found->valuedouble, 2);
58 assert_is_int64(found);
60 found = cJSON_GetObjectItem(item, "three");
61 TEST_ASSERT_NOT_NULL_MESSAGE(found, "Failed to find item.");
62 TEST_ASSERT_EQUAL_DOUBLE(found->valuedouble, 3);
63 assert_is_int64(found);
65 found = cJSON_GetObjectItem(item, "four");
66 TEST_ASSERT_NULL_MESSAGE(found, "Should not find something that isn't there.");
74 cJSON *found = NULL;
78 found = cJSON_GetObjectItemCaseSensitive(NULL, "test");
79 TEST_ASSERT_NULL_MESSAGE(found, "Failed to fail on NULL pointer.");
81 found = cJSON_GetObjectItemCaseSensitive(item, NULL);
82 TEST_ASSERT_NULL_MESSAGE(found, "Failed to fail on NULL string.");
84 found = cJSON_GetObjectItemCaseSensitive(item, "one");
85 TEST_ASSERT_NOT_NULL_MESSAGE(found, "Failed to find first item.");
86 TEST_ASSERT_EQUAL_DOUBLE(found->valuedouble, 1);
87 assert_is_int64(found);
89 found = cJSON_GetObjectItemCaseSensitive(item, "Two");
90 TEST_ASSERT_NOT_NULL_MESSAGE(found, "Failed to find first item.");
91 TEST_ASSERT_EQUAL_DOUBLE(found->valuedouble, 2);
92 assert_is_int64(found);
94 found = cJSON_GetObjectItemCaseSensitive(item, "tHree");
95 TEST_ASSERT_NOT_NULL_MESSAGE(found, "Failed to find item.");
96 TEST_ASSERT_EQUAL_DOUBLE(found->valuedouble, 3);
97 assert_is_int64(found);
99 found = cJSON_GetObjectItemCaseSensitive(item, "One");
100 TEST_ASSERT_NULL_MESSAGE(found, "Should not find something that isn't there.");