Home
last modified time | relevance | path

Searched refs:assert_true (Results 1 – 15 of 15) sorted by relevance

/freebsd-13.1/contrib/libcbor/test/
H A Dtype_2_test.c144 assert_true(cbor_isa_bytestring(bs)); in test_empty_bs()
146 assert_true(res.read == 1); in test_empty_bs()
157 assert_true(res.read == 2); in test_embedded_bs()
176 assert_true(res.read == 3); in test_short_bs1()
189 assert_true(res.read == 257); in test_short_bs2()
201 assert_true(res.read == 258); in test_half_bs()
213 assert_true(res.read == 260); in test_int_bs()
225 assert_true(res.read == 264); in test_long_bs()
240 assert_true(res.read == 2); in test_zero_indef()
257 assert_true(res.read == 5); in test_short_indef()
[all …]
H A Dtype_0_test.c30 assert_true(cbor_isa_uint(number)); in test_very_short_int()
33 assert_true(res.error.code == 0); in test_very_short_int()
34 assert_true(res.read == 1); in test_very_short_int()
35 assert_true(cbor_is_int(number)); in test_very_short_int()
53 assert_true(res.error.code == 0); in test_short_int()
54 assert_true(res.read == 2); in test_short_int()
55 assert_true(cbor_is_int(number)); in test_short_int()
67 assert_true(res.error.code == 0); in test_half_int()
68 assert_true(res.read == 3); in test_half_int()
82 assert_true(res.read == 5); in test_int()
[all …]
H A Dtype_1_test.c33 assert_true(res.error.code == 0); in test_very_short_int()
34 assert_true(res.read == 1); in test_very_short_int()
35 assert_true(cbor_is_int(number)); in test_very_short_int()
47 assert_true(res.error.code == 0); in test_short_int()
48 assert_true(res.read == 2); in test_short_int()
49 assert_true(cbor_is_int(number)); in test_short_int()
61 assert_true(res.error.code == 0); in test_half_int()
62 assert_true(res.read == 3); in test_half_int()
63 assert_true(cbor_is_int(number)); in test_half_int()
76 assert_true(res.read == 5); in test_int()
[all …]
H A Dtype_5_test.c27 assert_true(cbor_isa_map(map)); in test_empty_map()
29 assert_true(res.read == 1); in test_empty_map()
42 assert_true(cbor_isa_map(map)); in test_simple_map()
45 assert_true(res.read == 5); in test_simple_map()
62 assert_true(cbor_isa_map(map)); in test_indef_simple_map()
65 assert_true(res.read == 6); in test_indef_simple_map()
89 assert_true(cbor_isa_map(map)); in test_def_nested_map()
92 assert_true(res.read == 34); in test_def_nested_map()
113 assert_true(cbor_isa_map(map)); in test_streamed_key_map()
116 assert_true(res.read == 8); in test_streamed_key_map()
[all …]
H A Dtype_3_test.c26 assert_true(cbor_isa_string(string)); in test_empty_string()
29 assert_true(res.read == 1); in test_empty_string()
42 assert_true(cbor_isa_string(string)); in test_short_string()
46 assert_true(res.read == 13); in test_short_string()
60 assert_true(cbor_isa_string(string)); in test_short_multibyte_string()
64 assert_true(res.read == 16); in test_short_multibyte_string()
97 assert_true(res.read == 152); in test_int8_string()
131 assert_true(res.read == 153); in test_int16_string()
164 assert_true(res.read == 155); in test_int32_string()
198 assert_true(res.read == 159); in test_int64_string()
[all …]
H A Dtype_7_test.c27 assert_true(cbor_isa_float_ctrl(float_ctrl)); in test_float2()
28 assert_true(cbor_is_float(float_ctrl)); in test_float2()
40 assert_true(cbor_isa_float_ctrl(float_ctrl)); in test_float4()
41 assert_true(cbor_is_float(float_ctrl)); in test_float4()
55 assert_true(cbor_is_float(float_ctrl)); in test_float8()
68 assert_true(cbor_is_null(float_ctrl)); in test_null()
78 assert_true(cbor_is_undef(float_ctrl)); in test_undef()
88 assert_true(cbor_is_bool(float_ctrl)); in test_bool()
91 assert_true(cbor_get_bool(float_ctrl)); in test_bool()
97 assert_true(cbor_is_bool(float_ctrl)); in test_bool()
[all …]
H A Dstream_expectations.c37 assert_true(current().expectation == UINT8_EQ); in uint8_callback()
38 assert_true(current().data.int8 == actual); in uint8_callback()
49 assert_true(current().data.int16 == actual); in uint16_callback()
60 assert_true(current().data.int32 == actual); in uint32_callback()
71 assert_true(current().data.int64 == actual); in uint64_callback()
82 assert_true(current().data.int8 == actual); in negint8_callback()
93 assert_true(current().data.int16 == actual); in negint16_callback()
104 assert_true(current().data.int32 == actual); in negint32_callback()
115 assert_true(current().data.int64 == actual); in negint64_callback()
201 assert_true(current().data.int64 == value); in tag_callback()
[all …]
H A Dtype_4_test.c26 assert_true(cbor_isa_array(arr)); in test_empty_array()
27 assert_true(cbor_array_size(arr) == 0); in test_empty_array()
28 assert_true(res.read == 1); in test_empty_array()
39 assert_true(cbor_isa_array(arr)); in test_simple_array()
41 assert_true(res.read == 2); in test_simple_array()
65 assert_true(cbor_isa_array(arr)); in test_nested_arrays()
67 assert_true(res.read == 4); in test_nested_arrays()
86 assert_true(cbor_isa_array(arr)); in test_indef_arrays()
88 assert_true(res.read == 4); in test_indef_arrays()
106 assert_true(cbor_isa_array(arr)); in test_nested_indef_arrays()
[all …]
H A Dassertions.c12 assert_true(cbor_isa_uint(item)); in assert_uint8()
14 assert_true(cbor_get_uint8(item) == num); in assert_uint8()
18 assert_true(cbor_isa_uint(item)); in assert_uint16()
20 assert_true(cbor_get_uint16(item) == num); in assert_uint16()
24 assert_true(cbor_isa_uint(item)); in assert_uint32()
26 assert_true(cbor_get_uint32(item) == num); in assert_uint32()
30 assert_true(cbor_isa_uint(item)); in assert_uint64()
37 assert_true(read == result.read); in assert_decoder_result()
38 assert_true(status == result.status); in assert_decoder_result()
39 assert_true(0 == result.required); in assert_decoder_result()
[all …]
H A Dtype_6_test.c24 assert_true(cbor_refcount(tag) == 1); in test_refcounting()
26 assert_true(cbor_refcount(item) == 2); in test_refcounting()
29 assert_true(cbor_refcount(item) == 1); in test_refcounting()
37 assert_true(cbor_typeof(tag) == CBOR_TYPE_TAG); in test_embedded_tag()
38 assert_true(cbor_tag_value(tag) == 0); in test_embedded_tag()
49 assert_true(cbor_typeof(tag) == CBOR_TYPE_TAG); in test_int8_tag()
50 assert_true(cbor_tag_value(tag) == 255); in test_int8_tag()
61 assert_true(cbor_typeof(tag) == CBOR_TYPE_TAG); in test_int16_tag()
62 assert_true(cbor_tag_value(tag) == 255 << 8); in test_int16_tag()
99 assert_true(cbor_tag_value(tag) == 0); in test_nested_tag()
[all …]
H A Dbad_inputs_test.c27 assert_true(res.error.code == CBOR_ERR_NOTENOUGHDATA); in test_1()
35 assert_true(res.error.code == CBOR_ERR_MALFORMATED); in test_2()
43 assert_true(res.error.code == CBOR_ERR_NOTENOUGHDATA); in test_3()
52 assert_true(res.error.code == CBOR_ERR_MEMERROR); in test_4()
58 assert_true(res.error.code == CBOR_ERR_MEMERROR); in test_5()
70 assert_true(res.error.code == CBOR_ERR_SYNTAXERROR); in test_6()
82 assert_true(res.error.code == CBOR_ERR_MEMERROR); in test_7()
95 assert_true(res.error.code == CBOR_ERR_SYNTAXERROR); in test_8()
103 assert_true(res.error.code == CBOR_ERR_SYNTAXERROR); in test_9()
H A Dunicode_test.c23 assert_true(status.status == _CBOR_UNICODE_BADCP); in test_missing_bytes()
25 assert_true(status.status == _CBOR_UNICODE_OK); in test_missing_bytes()
33 assert_true(status.status == _CBOR_UNICODE_BADCP); in test_invalid_sequence()
34 assert_true(status.location == 2); in test_invalid_sequence()
H A Dcopy_test.c43 assert_true(cbor_get_uint8(copy = cbor_copy(item)) == 10); in test_negints()
48 assert_true(cbor_get_uint16(copy = cbor_copy(item)) == 10); in test_negints()
53 assert_true(cbor_get_uint32(copy = cbor_copy(item)) == 10); in test_negints()
58 assert_true(cbor_get_uint64(copy = cbor_copy(item)) == 10); in test_negints()
165 assert_true(cbor_is_null(copy = cbor_copy(item))); in test_ctrls()
172 assert_true(cbor_float_get_float2(copy = cbor_copy(item)) == in test_floats()
178 assert_true(cbor_float_get_float4(copy = cbor_copy(item)) == in test_floats()
184 assert_true(cbor_float_get_float8(copy = cbor_copy(item)) == in test_floats()
H A Dcbor_serialize_test.c149 assert_true(cbor_string_add_chunk(item, cbor_move(chunk))); in test_serialize_indefinite_string()
213 assert_true(cbor_map_add(item, (struct cbor_pair){.key = one, .value = two})); in test_serialize_indefinite_map()
214 assert_true(cbor_map_add(item, (struct cbor_pair){.key = two, .value = one})); in test_serialize_indefinite_map()
/freebsd-13.1/contrib/netbsd-tests/lib/libc/gen/
H A Dt_assert.c103 ATF_TC(assert_true);
104 ATF_TC_HEAD(assert_true, tc) in ATF_TC_HEAD() argument
109 ATF_TC_BODY(assert_true, tc) in ATF_TC_BODY() argument
145 ATF_TP_ADD_TC(tp, assert_true); in ATF_TP_ADD_TCS()