Lines Matching defs:values

203 	/* Failing Test: duplicated names for json values */
260 struct spdk_json_val values[4];
266 values[0].type = SPDK_JSON_VAL_ARRAY_BEGIN;
267 values[0].len = 2;
268 values[1].type = SPDK_JSON_VAL_NUMBER;
269 values[1].len = 4;
270 values[1].start = "1234";
271 values[2].type = SPDK_JSON_VAL_NUMBER;
272 values[2].len = 4;
273 values[2].start = "5678";
274 values[3].type = SPDK_JSON_VAL_ARRAY_END;
275 CU_ASSERT(spdk_json_decode_array(values, spdk_json_decode_uint32, my_int, 2, &out_size,
282 values[0].len = 3;
283 CU_ASSERT(spdk_json_decode_array(values, spdk_json_decode_uint32, my_int, 2, &out_size,
287 values[0].len = 2;
288 values[2].type = SPDK_JSON_VAL_STRING;
289 values[2].len = 5;
290 values[2].start = "HELLO";
291 CU_ASSERT(spdk_json_decode_array(values, spdk_json_decode_uint32, my_int, 2, &out_size,
295 values[0].type = SPDK_JSON_VAL_NUMBER;
296 values[2].type = SPDK_JSON_VAL_NUMBER;
297 values[2].len = 4;
298 values[2].start = "5678";
299 CU_ASSERT(spdk_json_decode_array(values, spdk_json_decode_uint32, my_int, 2, &out_size,
303 values[0].type = SPDK_JSON_VAL_ARRAY_BEGIN;
304 values[1].type = SPDK_JSON_VAL_STRING;
305 values[1].len = 5;
306 values[1].start = "HELLO";
307 values[2].type = SPDK_JSON_VAL_STRING;
308 values[2].len = 5;
309 values[2].start = "WORLD";
310 CU_ASSERT(spdk_json_decode_array(values, spdk_json_decode_uint32, my_int, 2, &out_size,
314 CU_ASSERT(spdk_json_decode_array(values, spdk_json_decode_string, my_string, 2, &out_size,
828 struct spdk_json_val *values, *key, *val, *key2, *val2;
835 values = calloc(values_cnt, sizeof(struct spdk_json_val));
836 SPDK_CU_ASSERT_FATAL(values != NULL);
838 rc = spdk_json_parse(ut_json_text, strlen(ut_json_text), values, values_cnt, NULL, 0);
842 rc = spdk_json_find(values, "string", &key, &val, SPDK_JSON_VAL_STRING);
849 rc = spdk_json_find(values, "object", &key, &val, SPDK_JSON_VAL_OBJECT_BEGIN);
878 free(values);
885 struct spdk_json_val *values, *key;
892 values = calloc(values_cnt, sizeof(struct spdk_json_val));
893 SPDK_CU_ASSERT_FATAL(values != NULL);
895 rc = spdk_json_parse(array_json_text, strlen(array_json_text), values, values_cnt, NULL, 0);
903 rc = spdk_json_find(values, "Text", &key, NULL, SPDK_JSON_VAL_STRING);
906 free(values);
912 struct spdk_json_val *values;
925 values = calloc(values_cnt, sizeof(struct spdk_json_val));
926 SPDK_CU_ASSERT_FATAL(values != NULL);
928 rc = spdk_json_parse(ut_json_text, strlen(ut_json_text), values, values_cnt, NULL, 0);
934 string_key = spdk_json_object_first(values);
991 free(values);