Home
last modified time | relevance | path

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

/freebsd/contrib/libcbor/test/
H A Dbytestring_test.c139 assert_true(cbor_typeof(bs) == CBOR_TYPE_BYTESTRING); in test_empty_bs()
140 assert_true(cbor_isa_bytestring(bs)); in test_empty_bs()
142 assert_true(res.read == 1); in test_empty_bs()
150 assert_true(cbor_typeof(bs) == CBOR_TYPE_BYTESTRING); in test_embedded_bs()
151 assert_true(cbor_isa_bytestring(bs)); in test_embedded_bs()
152 assert_true(cbor_bytestring_length(bs) == 1); in test_embedded_bs()
153 assert_true(res.read == 2); in test_embedded_bs()
154 assert_true(*cbor_bytestring_handle(bs) == 0xA1); in test_embedded_bs()
163 assert_true(res.error.code == CBOR_ERR_NOTENOUGHDATA); in test_notenough_data()
169 assert_true(cbor_typeof(bs) == CBOR_TYPE_BYTESTRING); in test_short_bs1()
[all …]
H A Duint_test.c25 assert_true(cbor_typeof(number) == CBOR_TYPE_UINT); in test_very_short_int()
26 assert_true(cbor_int_get_width(number) == CBOR_INT_8); in test_very_short_int()
27 assert_true(cbor_isa_uint(number)); in test_very_short_int()
29 assert_true(cbor_get_uint8(number) == 2); in test_very_short_int()
30 assert_true(res.error.code == 0); in test_very_short_int()
31 assert_true(res.read == 1); in test_very_short_int()
32 assert_true(cbor_is_int(number)); in test_very_short_int()
40 assert_true(res.error.code == CBOR_ERR_NOTENOUGHDATA); in test_incomplete_data()
45 assert_true(cbor_typeof(number) == CBOR_TYPE_UINT); in test_short_int()
46 assert_true(cbor_int_get_width(number) == CBOR_INT_8); in test_short_int()
[all …]
H A Dnegint_test.c24 assert_true(cbor_typeof(number) == CBOR_TYPE_NEGINT); in test_very_short_int()
25 assert_true(cbor_int_get_width(number) == CBOR_INT_8); in test_very_short_int()
27 assert_true(cbor_isa_negint(number)); in test_very_short_int()
28 assert_true(cbor_get_uint8(number) == 2); in test_very_short_int()
29 assert_true(res.error.code == 0); in test_very_short_int()
30 assert_true(res.read == 1); in test_very_short_int()
31 assert_true(cbor_is_int(number)); in test_very_short_int()
38 assert_true(cbor_typeof(number) == CBOR_TYPE_NEGINT); in test_short_int()
39 assert_true(cbor_int_get_width(number) == CBOR_INT_8); in test_short_int()
41 assert_true(cbor_isa_negint(number)); in test_short_int()
[all …]
H A Dmap_test.c28 assert_true(cbor_typeof(map) == CBOR_TYPE_MAP); in test_empty_map()
29 assert_true(cbor_isa_map(map)); in test_empty_map()
30 assert_true(cbor_map_size(map) == 0); in test_empty_map()
31 assert_true(res.read == 1); in test_empty_map()
43 assert_true(cbor_typeof(map) == CBOR_TYPE_MAP); in test_simple_map()
44 assert_true(cbor_isa_map(map)); in test_simple_map()
45 assert_true(cbor_map_is_definite(map)); in test_simple_map()
46 assert_true(cbor_map_size(map) == 2); in test_simple_map()
47 assert_true(res.read == 5); in test_simple_map()
63 assert_true(cbor_typeof(map) == CBOR_TYPE_MAP); in test_indef_simple_map()
[all …]
H A Dfloat_ctrl_test.c29 assert_true(cbor_isa_float_ctrl(float_ctrl)); in test_float2()
30 assert_true(cbor_is_float(float_ctrl)); in test_float2()
31 assert_true(cbor_float_get_width(float_ctrl) == CBOR_FLOAT_16); in test_float2()
32 assert_true(cbor_float_get_float2(float_ctrl) == 65504.0F); in test_float2()
42 assert_true(cbor_isa_float_ctrl(float_ctrl)); in test_float4()
43 assert_true(cbor_is_float(float_ctrl)); in test_float4()
44 assert_true(cbor_float_get_width(float_ctrl) == CBOR_FLOAT_32); in test_float4()
45 assert_true(cbor_float_get_float4(float_ctrl) == 100000.0F); in test_float4()
56 assert_true(cbor_isa_float_ctrl(float_ctrl)); in test_float8()
57 assert_true(cbor_is_floa in test_float8()
[all...]
H A Dstream_expectations.c29 assert_true(current().expectation == UINT8_EQ); in uint8_callback()
30 assert_true(current().data.int8 == actual); in uint8_callback()
40 assert_true(current().expectation == UINT16_EQ); in uint16_callback()
41 assert_true(current().data.int16 == actual); in uint16_callback()
51 assert_true(current().expectation == UINT32_EQ); in uint32_callback()
52 assert_true(current().data.int32 == actual); in uint32_callback()
62 assert_true(current().expectation == UINT64_EQ); in uint64_callback()
63 assert_true(current().data.int64 == actual); in uint64_callback()
73 assert_true(current().expectation == NEGINT8_EQ); in negint8_callback()
74 assert_true(current().data.int8 == actual); in negint8_callback()
[all …]
H A Dassertions.c12 assert_true(cbor_isa_uint(item)); in assert_uint8()
13 assert_true(cbor_int_get_width(item) == CBOR_INT_8); in assert_uint8()
14 assert_true(cbor_get_uint8(item) == num); in assert_uint8()
18 assert_true(cbor_isa_uint(item)); in assert_uint16()
19 assert_true(cbor_int_get_width(item) == CBOR_INT_16); in assert_uint16()
20 assert_true(cbor_get_uint16(item) == num); in assert_uint16()
24 assert_true(cbor_isa_uint(item)); in assert_uint32()
25 assert_true(cbor_int_get_width(item) == CBOR_INT_32); in assert_uint32()
26 assert_true(cbor_get_uint32(item) == num); in assert_uint32()
30 assert_true(cbor_isa_uint(item)); in assert_uint64()
[all …]
H A Dstring_test.c21 assert_true(cbor_typeof(string) == CBOR_TYPE_STRING); in test_empty_string()
22 assert_true(cbor_isa_string(string)); in test_empty_string()
25 assert_true(res.read == 1); in test_empty_string()
37 assert_true(cbor_typeof(string) == CBOR_TYPE_STRING); in test_short_string()
38 assert_true(cbor_isa_string(string)); in test_short_string()
42 assert_true(res.read == 13); in test_short_string()
55 assert_true(cbor_typeof(string) == CBOR_TYPE_STRING); in test_short_multibyte_string()
56 assert_true(cbor_isa_string(string)); in test_short_multibyte_string()
60 assert_true(res.read == 16); in test_short_multibyte_string()
84 assert_true(cbor_typeo in test_int8_string()
[all...]
H A Dcallbacks_test.c53 assert_true(cbor_typeof(bytestring) == CBOR_TYPE_BYTESTRING); in test_builder_byte_string_callback_append()
54 assert_true(cbor_isa_bytestring(bytestring)); in test_builder_byte_string_callback_append()
56 assert_true(cbor_bytestring_is_indefinite(bytestring)); in test_builder_byte_string_callback_append()
61 assert_true(cbor_typeof(bytestring) == CBOR_TYPE_BYTESTRING); in test_builder_byte_string_callback_append()
62 assert_true(cbor_isa_bytestring(chunk)); in test_builder_byte_string_callback_append()
63 assert_true(cbor_bytestring_is_definite(chunk)); in test_builder_byte_string_callback_append()
88 assert_true(context.creation_failed); in test_builder_byte_string_callback_append_alloc_failure()
95 assert_true(cbor_typeof(bytestring) == CBOR_TYPE_BYTESTRING); in test_builder_byte_string_callback_append_alloc_failure()
96 assert_true(cbor_isa_bytestring(bytestring)); in test_builder_byte_string_callback_append_alloc_failure()
98 assert_true(cbor_bytestring_is_indefinit in test_builder_byte_string_callback_append_alloc_failure()
[all...]
H A Darray_test.c20 assert_true(cbor_typeof(arr) == CBOR_TYPE_ARRAY); in test_empty_array()
21 assert_true(cbor_isa_array(arr)); in test_empty_array()
22 assert_true(cbor_array_size(arr) == 0); in test_empty_array()
23 assert_true(res.read == 1); in test_empty_array()
33 assert_true(cbor_typeof(arr) == CBOR_TYPE_ARRAY); in test_simple_array()
34 assert_true(cbor_isa_array(arr)); in test_simple_array()
36 assert_true(res.read == 2); in test_simple_array()
59 assert_true(cbor_typeof(arr) == CBOR_TYPE_ARRAY); in test_nested_arrays()
60 assert_true(cbor_isa_array(arr)); in test_nested_arrays()
61 assert_true(cbor_array_size(arr) == 2); in test_nested_arrays()
[all …]
H A Dtag_test.c19 assert_true(cbor_refcount(tag) == 1); in test_refcounting()
21 assert_true(cbor_refcount(item) == 2); in test_refcounting()
24 assert_true(cbor_refcount(item) == 1); in test_refcounting()
32 assert_true(cbor_typeof(tag) == CBOR_TYPE_TAG); in test_embedded_tag()
33 assert_true(cbor_tag_value(tag) == 0); in test_embedded_tag()
44 assert_true(cbor_typeof(tag) == CBOR_TYPE_TAG); in test_int8_tag()
45 assert_true(cbor_tag_value(tag) == 255); in test_int8_tag()
56 assert_true(cbor_typeof(tag) == CBOR_TYPE_TAG); in test_int16_tag()
57 assert_true(cbor_tag_value(tag) == 255 << 8); in test_int16_tag()
68 assert_true(cbor_typeo in test_int32_tag()
[all...]
H A Dcopy_test.c38 assert_true(cbor_get_uint8(copy = cbor_copy(item)) == 10); in test_negints()
43 assert_true(cbor_get_uint16(copy = cbor_copy(item)) == 10); in test_negints()
48 assert_true(cbor_get_uint32(copy = cbor_copy(item)) == 10); in test_negints()
53 assert_true(cbor_get_uint64(copy = cbor_copy(item)) == 10); in test_negints()
68 assert_true(cbor_bytestring_add_chunk( in test_indef_bytestring()
91 assert_true(cbor_string_add_chunk(item, cbor_move(cbor_build_string("abc")))); in test_indef_string()
105 assert_true(cbor_array_push(item, cbor_move(cbor_build_uint8(42)))); in test_def_array()
115 assert_true(cbor_array_push(item, cbor_move(cbor_build_uint8(42)))); in test_indef_array()
125 assert_true(cbor_map_add(item, (struct cbor_pair){ in test_def_map()
138 assert_true(cbor_map_add(item, (struct cbor_pair){ in test_indef_map()
[all …]
H A Dunicode_test.c17 assert_true(_cbor_unicode_codepoint_count(missing_bytes_data, 1, &status) == in test_missing_bytes()
19 assert_true(status.status == _CBOR_UNICODE_BADCP); in test_missing_bytes()
20 assert_true(status.location == 1); in test_missing_bytes()
22 assert_true(_cbor_unicode_codepoint_count(missing_bytes_data, 2, &status) == in test_missing_bytes()
24 assert_true(status.status == _CBOR_UNICODE_OK); in test_missing_bytes()
25 assert_true(status.location == 0); in test_missing_bytes()
32 assert_true( in test_invalid_sequence()
34 assert_true(status.status == _CBOR_UNICODE_BADCP); in test_invalid_sequence()
35 assert_true(status.location == 2); in test_invalid_sequence()
H A Dbad_inputs_test.c22 assert_true(res.error.code == CBOR_ERR_NOTENOUGHDATA); in test_1()
30 assert_true(res.error.code == CBOR_ERR_MALFORMATED); in test_2()
38 assert_true(res.error.code == CBOR_ERR_NOTENOUGHDATA); in test_3()
47 assert_true(res.error.code == CBOR_ERR_MEMERROR); in test_4()
53 assert_true(res.error.code == CBOR_ERR_MEMERROR); in test_5()
65 assert_true(res.error.code == CBOR_ERR_SYNTAXERROR); in test_6()
77 assert_true(res.error.code == CBOR_ERR_MEMERROR); in test_7()
90 assert_true(res.error.code == CBOR_ERR_SYNTAXERROR); in test_8()
98 assert_true(res.error.code == CBOR_ERR_SYNTAXERROR); in test_9()
H A Dmemory_utils_test.c13 assert_true(_cbor_safe_to_multiply(1, 1)); in test_safe_multiply()
14 assert_true(_cbor_safe_to_multiply(SIZE_MAX, 0)); in test_safe_multiply()
15 assert_true(_cbor_safe_to_multiply(SIZE_MAX, 1)); in test_safe_multiply()
21 assert_true(_cbor_safe_to_add(1, 1)); in test_safe_add()
22 assert_true(_cbor_safe_to_add(SIZE_MAX - 1, 1)); in test_safe_add()
23 assert_true(_cbor_safe_to_add(SIZE_MAX, 0)); in test_safe_add()
H A Dcbor_serialize_test.c150 assert_true(cbor_bytestring_add_chunk(item, cbor_move(chunk))); in test_serialize_indefinite_bytestring()
191 assert_true(cbor_bytestring_add_chunk(item, cbor_move(chunk))); in test_serialize_indefinite_bytestring_no_space()
257 assert_true(cbor_string_add_chunk(item, cbor_move(chunk))); in test_serialize_indefinite_string_no_space()
288 assert_true(cbor_string_add_chunk(item, cbor_move(chunk))); in test_serialize_definite_array()
308 assert_true(cbor_array_push(item, one));
309 assert_true(cbor_array_set(item, 1, two)); in test_serialize_indefinite_array()
310 assert_true(cbor_array_replace(item, 0, one)); in test_serialize_indefinite_array()
323 assert_true(cbor_array_push(item, one)); in test_serialize_indefinite_array()
344 assert_true(cbor_array_push(item, one)); in test_serialize_indefinite_map()
345 assert_true(cbor_array_pus in test_serialize_indefinite_map()
[all...]
H A Darray_encoders_test.c34 assert_true(cbor_array_push(array, one)); in test_indef_array_encoding()
35 assert_true(cbor_array_push(array, two)); in test_indef_array_encoding()
H A Dfloat_ctrl_encoders_test.c44 assert_true(cbor_isa_float_ctrl(half_float)); in assert_half_float_codec_identity()
45 assert_true(cbor_is_float(half_float)); in assert_half_float_codec_identity()
/freebsd/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()
/freebsd/contrib/expat/tests/
H A Dacc_tests.c411 assert_true(parser != NULL); in START_TEST()
413 assert_true(XML_SetBillionLaughsAttackProtectionMaximumAmplification( in START_TEST()
416 assert_true(XML_SetBillionLaughsAttackProtectionActivationThreshold( in START_TEST()
421 assert_true(ext_parser != NULL); in START_TEST()
426 assert_true(actualStatus == expectedStatus); in START_TEST()
428 assert_true(XML_GetErrorCode(ext_parser) in START_TEST()
H A Dbasic_tests.c1228 assert_true(parser != NULL); in START_TEST()
1231 assert_true(ext_parser != NULL); in START_TEST()
1236 assert_true(actualStatus == expectedStatus); in START_TEST()
1238 assert_true(XML_GetErrorCode(ext_parser) in START_TEST()
1908 assert_true(strcmp(c_entry->name, "record_cdata_handler") == 0); in START_TEST()
1909 assert_true(c_entry->arg > 0); in START_TEST()
1910 assert_true(c_entry->arg <= cdata_len_remaining); in START_TEST()
1917 assert_true(storage.count == i); in START_TEST()
1939 assert_true(strcmp(c_entry->name, "record_cdata_nodefault_handler") == 0); in START_TEST()
1940 assert_true(c_entr in START_TEST()
[all...]
H A Dmisc_tests.c128 assert_true(sizeof(enum XML_Error) == sizeof(int)); // self-test in START_TEST()
425 assert_true(ext_parser != NULL); in START_TEST()
428 assert_true(ext_parser == NULL); in START_TEST()
492 assert_true(parser != NULL); in START_TEST()
514 assert_true(XML_GetErrorCode(parser) == XML_ERROR_NONE); in make_miscellaneous_test_case()
515 assert_true(XML_StopParser(parser, resumable) == XML_STATUS_ERROR); in make_miscellaneous_test_case()
516 assert_true(XML_GetErrorCode(parser) == XML_ERROR_NOT_STARTED); in make_miscellaneous_test_case()
H A Dminicheck.h88 # define assert_true(cond) \ macro
H A Dhandlers.h518 assert_true(strcmp(e->name, expected_name) == 0); \
519 assert_true(e->arg == (expected_arg)); \
H A Dhandlers.c1671 assert_true(rec->count < max_entries); in record_call()