• Home
  • Raw
  • Download

Lines Matching +full:copy +full:- +full:item

2   Copyright (c) 2009-2017 Dave Gamble and cJSON contributors
4 Permission is hereby granted, free of charge, to any person obtaining a copy
7 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
34 …TEST_ASSERT_BITS_MESSAGE(cJSON_IsInt64, cJSON_IsInt64, int64_number_item->type, "Item should be a … in assert_is_int64()
39 cJSON *item = NULL; in cjson_get_object_item_should_get_object_items_with_int64() local
42 item = cJSON_Parse("{\"one\":1, \"Two\":2, \"tHree\":3}"); in cjson_get_object_item_should_get_object_items_with_int64()
47 found = cJSON_GetObjectItem(item, NULL); in cjson_get_object_item_should_get_object_items_with_int64()
50 found = cJSON_GetObjectItem(item, "one"); in cjson_get_object_item_should_get_object_items_with_int64()
51 TEST_ASSERT_NOT_NULL_MESSAGE(found, "Failed to find first item."); in cjson_get_object_item_should_get_object_items_with_int64()
52 TEST_ASSERT_EQUAL_DOUBLE(found->valuedouble, 1); in cjson_get_object_item_should_get_object_items_with_int64()
55 found = cJSON_GetObjectItem(item, "tWo"); in cjson_get_object_item_should_get_object_items_with_int64()
56 TEST_ASSERT_NOT_NULL_MESSAGE(found, "Failed to find first item."); in cjson_get_object_item_should_get_object_items_with_int64()
57 TEST_ASSERT_EQUAL_DOUBLE(found->valuedouble, 2); in cjson_get_object_item_should_get_object_items_with_int64()
60 found = cJSON_GetObjectItem(item, "three"); in cjson_get_object_item_should_get_object_items_with_int64()
61 TEST_ASSERT_NOT_NULL_MESSAGE(found, "Failed to find item."); in cjson_get_object_item_should_get_object_items_with_int64()
62 TEST_ASSERT_EQUAL_DOUBLE(found->valuedouble, 3); in cjson_get_object_item_should_get_object_items_with_int64()
65 found = cJSON_GetObjectItem(item, "four"); in cjson_get_object_item_should_get_object_items_with_int64()
68 cJSON_Delete(item); in cjson_get_object_item_should_get_object_items_with_int64()
73 cJSON *item = NULL; in cjson_get_object_item_case_sensitive_should_get_object_items_with_int64() local
76 item = cJSON_Parse("{\"one\":1, \"Two\":2, \"tHree\":3}"); in cjson_get_object_item_case_sensitive_should_get_object_items_with_int64()
81 found = cJSON_GetObjectItemCaseSensitive(item, NULL); in cjson_get_object_item_case_sensitive_should_get_object_items_with_int64()
84 found = cJSON_GetObjectItemCaseSensitive(item, "one"); in cjson_get_object_item_case_sensitive_should_get_object_items_with_int64()
85 TEST_ASSERT_NOT_NULL_MESSAGE(found, "Failed to find first item."); in cjson_get_object_item_case_sensitive_should_get_object_items_with_int64()
86 TEST_ASSERT_EQUAL_DOUBLE(found->valuedouble, 1); in cjson_get_object_item_case_sensitive_should_get_object_items_with_int64()
89 found = cJSON_GetObjectItemCaseSensitive(item, "Two"); in cjson_get_object_item_case_sensitive_should_get_object_items_with_int64()
90 TEST_ASSERT_NOT_NULL_MESSAGE(found, "Failed to find first item."); in cjson_get_object_item_case_sensitive_should_get_object_items_with_int64()
91 TEST_ASSERT_EQUAL_DOUBLE(found->valuedouble, 2); in cjson_get_object_item_case_sensitive_should_get_object_items_with_int64()
94 found = cJSON_GetObjectItemCaseSensitive(item, "tHree"); in cjson_get_object_item_case_sensitive_should_get_object_items_with_int64()
95 TEST_ASSERT_NOT_NULL_MESSAGE(found, "Failed to find item."); in cjson_get_object_item_case_sensitive_should_get_object_items_with_int64()
96 TEST_ASSERT_EQUAL_DOUBLE(found->valuedouble, 3); in cjson_get_object_item_case_sensitive_should_get_object_items_with_int64()
99 found = cJSON_GetObjectItemCaseSensitive(item, "One"); in cjson_get_object_item_case_sensitive_should_get_object_items_with_int64()
102 cJSON_Delete(item); in cjson_get_object_item_case_sensitive_should_get_object_items_with_int64()
110 TEST_ASSERT_EQUAL_INT64(1LL, number->valueint); in cjson_set_number_value_should_set_numbers_with_int64()
111 TEST_ASSERT_EQUAL_DOUBLE(1.0, number->valuedouble); in cjson_set_number_value_should_set_numbers_with_int64()
113 cJSON_SetInt64NumberValue(number, -1LL); in cjson_set_number_value_should_set_numbers_with_int64()
114 TEST_ASSERT_EQUAL_INT64(-1LL, number->valueint); in cjson_set_number_value_should_set_numbers_with_int64()
115 TEST_ASSERT_EQUAL_DOUBLE(-1.0, number->valuedouble); in cjson_set_number_value_should_set_numbers_with_int64()
118 TEST_ASSERT_EQUAL_INT64(0LL, number->valueint); in cjson_set_number_value_should_set_numbers_with_int64()
119 TEST_ASSERT_EQUAL_DOUBLE(0.0, number->valuedouble); in cjson_set_number_value_should_set_numbers_with_int64()
122 TEST_ASSERT_EQUAL_INT64(LLONG_MAX, number->valueint); in cjson_set_number_value_should_set_numbers_with_int64()
123 TEST_ASSERT_EQUAL_DOUBLE((double)LLONG_MAX, number->valuedouble); in cjson_set_number_value_should_set_numbers_with_int64()
126 TEST_ASSERT_EQUAL_INT64(LLONG_MIN, number->valueint); in cjson_set_number_value_should_set_numbers_with_int64()
127 TEST_ASSERT_EQUAL_DOUBLE((double)LLONG_MIN, number->valuedouble); in cjson_set_number_value_should_set_numbers_with_int64()
132 cJSON item[1]; in typecheck_functions_should_check_type_with_int64() local
133 item->type = cJSON_Number; in typecheck_functions_should_check_type_with_int64()
134 TEST_ASSERT_FALSE(cJSON_IsInt64Number(item)); in typecheck_functions_should_check_type_with_int64()
136 item->type = cJSON_IsInt64; in typecheck_functions_should_check_type_with_int64()
137 TEST_ASSERT_FALSE(cJSON_IsInt64Number(item)); in typecheck_functions_should_check_type_with_int64()
139 item->type = cJSON_Number | cJSON_IsInt64; in typecheck_functions_should_check_type_with_int64()
140 TEST_ASSERT_TRUE(cJSON_IsInt64Number(item)); in typecheck_functions_should_check_type_with_int64()
142 item->type = cJSON_False; in typecheck_functions_should_check_type_with_int64()
143 TEST_ASSERT_FALSE(cJSON_IsInt64Number(item)); in typecheck_functions_should_check_type_with_int64()
148 cJSON *item = cJSON_CreateString("item"); in cjson_functions_should_not_crash_with_null_pointers_with_int64() local
151 cJSON_AddInt64NumberToObject(NULL, "item", 0LL); in cjson_functions_should_not_crash_with_null_pointers_with_int64()
152 cJSON_AddInt64NumberToObject(item, NULL, 0LL); in cjson_functions_should_not_crash_with_null_pointers_with_int64()
157 cJSON_Delete(item); in cjson_functions_should_not_crash_with_null_pointers_with_int64()
165 TEST_ASSERT_EQUAL_INT64(*cJSON_GetInt64NumberValue(number), number->valueint); in cjson_get_number_value_should_get_a_number_with_int64()