Lines Matching refs:json_ctx
35 do_one_test (json_ctx_t *json_ctx, impl_t *impl, CHAR *s, CHAR *s_end, in do_one_test() argument
49 json_element_double (json_ctx, (double) cur / i); in do_one_test()
53 do_test (json_ctx_t *json_ctx, int c, size_t len) in do_test() argument
55 json_element_object_begin (json_ctx); in do_test()
56 json_attr_uint (json_ctx, "length", len); in do_test()
57 json_attr_uint (json_ctx, "char", c); in do_test()
58 json_array_begin (json_ctx, "timings"); in do_test()
62 do_one_test (json_ctx, impl, (CHAR *) buf1, in do_test()
67 json_array_end (json_ctx); in do_test()
68 json_element_object_end (json_ctx); in do_test()
74 json_ctx_t json_ctx; in test_main() local
79 json_init (&json_ctx, 0, stdout); in test_main()
81 json_document_begin (&json_ctx); in test_main()
82 json_attr_string (&json_ctx, "timing_type", TIMING_TYPE); in test_main()
84 json_attr_object_begin (&json_ctx, "functions"); in test_main()
85 json_attr_object_begin (&json_ctx, TEST_NAME); in test_main()
86 json_attr_string (&json_ctx, "bench-variant", "walk"); in test_main()
88 json_array_begin (&json_ctx, "ifuncs"); in test_main()
90 json_element_string (&json_ctx, impl->name); in test_main()
91 json_array_end (&json_ctx); in test_main()
93 json_array_begin (&json_ctx, "results"); in test_main()
96 do_test (&json_ctx, 65, i); in test_main()
97 do_test (&json_ctx, 65, i + 1); in test_main()
102 do_test (&json_ctx, 0, i); in test_main()
103 do_test (&json_ctx, 0, i + 1); in test_main()
106 json_array_end (&json_ctx); in test_main()
107 json_attr_object_end (&json_ctx); in test_main()
108 json_attr_object_end (&json_ctx); in test_main()
109 json_document_end (&json_ctx); in test_main()