Home
last modified time | relevance | path

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

12345678910>>...28

/dflybsd-src/tools/regression/lib/libc/gen/
H A Dtest-wordexp.c73 assert(r == 0); in main()
74 assert(we.we_wordc == 2); in main()
75 assert(strcmp(we.we_wordv[0], "hello") == 0); in main()
76 assert(strcmp(we.we_wordv[1], "world") == 0); in main()
77 assert(we.we_wordv[2] == NULL); in main()
84 assert(r == 0); in main()
85 assert(we.we_wordc == 10000); in main()
86 assert(we.we_wordv[10000] == NULL); in main()
92 assert(r == 0); in main()
93 assert(we.we_wordc == 2); in main()
[all …]
/dflybsd-src/tools/regression/lib/libm/
H A Dtest-fenv.c135 assert(memcmp(&env, FE_DFL_ENV, sizeof(env)) == 0); in test_dfl_env()
137 assert(fetestexcept(FE_ALL_EXCEPT) == 0); in test_dfl_env()
149 assert(fetestexcept(std_except_sets[i]) == 0); in test_fetestclearexcept()
155 assert(fetestexcept(excepts) == excepts); in test_fetestclearexcept()
156 assert(feclearexcept(FE_ALL_EXCEPT) == 0); in test_fetestclearexcept()
157 assert(fetestexcept(FE_ALL_EXCEPT) == 0); in test_fetestclearexcept()
160 assert(fetestexcept(excepts) == excepts); in test_fetestclearexcept()
163 assert((fetestexcept(ALL_STD_EXCEPT) | FE_INEXACT) == in test_fetestclearexcept()
166 assert(fetestexcept(ALL_STD_EXCEPT) == excepts); in test_fetestclearexcept()
168 assert(feclearexcept(excepts) == 0); in test_fetestclearexcept()
[all …]
H A Dtest-rem.c116 assert(isnan(remainder(x, y))); in test_invalid()
117 assert(isnan(remquo(x, y, &q))); in test_invalid()
119 assert(q == 0xdeadbeef); in test_invalid()
122 assert(isnan(remainderf(x, y))); in test_invalid()
123 assert(isnan(remquof(x, y, &q))); in test_invalid()
125 assert(q == 0xdeadbeef); in test_invalid()
128 assert(isnan(remainderl(x, y))); in test_invalid()
129 assert(isnan(remquol(x, y, &q))); in test_invalid()
131 assert(q == 0xdeadbeef); in test_invalid()
150 assert(rem == expected_rem); in testl()
[all …]
H A Dtest-trig.c66 assert(feclearexcept(FE_ALL_EXCEPT) == 0); \
67 assert(fpequal((func)(_d), (result))); \
68 assert(((func), fetestexcept(exceptmask) == (excepts))); \
172 assert(fabs(sinf(f_pi_odd[i])) < FLT_EPSILON); in run_reduction_tests()
173 assert(cosf(f_pi_odd[i]) == -1.0); in run_reduction_tests()
174 assert(fabs(tan(f_pi_odd[i])) < FLT_EPSILON); in run_reduction_tests()
176 assert(fabs(sinf(-f_pi_odd[i])) < FLT_EPSILON); in run_reduction_tests()
177 assert(cosf(-f_pi_odd[i]) == -1.0); in run_reduction_tests()
178 assert(fabs(tanf(-f_pi_odd[i])) < FLT_EPSILON); in run_reduction_tests()
180 assert(fabs(sinf(f_pi_odd[i] * 2)) < FLT_EPSILON); in run_reduction_tests()
[all …]
H A Dtest-nan.c67 assert(isnan(af[0])); in testnan()
69 assert(end == nan_str + strlen(nan_str)); in testnan()
70 assert(sscanf(nan_str, "%e", &af[2]) == 1); in testnan()
71 assert(memcmp(&af[0], &af[1], sizeof(float)) == 0); in testnan()
72 assert(memcmp(&af[1], &af[2], sizeof(float)) == 0); in testnan()
76 assert(memcmp(&af[2], &af[3], sizeof(float)) == 0); in testnan()
80 assert(isnan(ad[0])); in testnan()
82 assert(end == nan_str + strlen(nan_str)); in testnan()
83 assert(sscanf(nan_str, "%le", &ad[2]) == 1); in testnan()
84 assert(memcmp(&ad[0], &ad[1], sizeof(double)) == 0); in testnan()
[all …]
H A Dtest-nearbyint.c109 assert(fpequal(out, nearbyintf(in))); in test_nearby()
110 assert(fpequal(out, nearbyint(in))); in test_nearby()
111 assert(fpequal(out, nearbyintl(in))); in test_nearby()
112 assert(fetestexcept(ALL_STD_EXCEPT) == 0); in test_nearby()
116 assert(fpequal(out, nearbyintf(in))); in test_nearby()
117 assert(fpequal(out, nearbyint(in))); in test_nearby()
118 assert(fpequal(out, nearbyintl(in))); in test_nearby()
119 assert(fetestexcept(ALL_STD_EXCEPT) == 0); in test_nearby()
144 assert(fpequal(out, modff(in, &ipartf))); in test_modf()
145 assert(fpequal(ipart_expected, ipartf)); in test_modf()
[all …]
H A Dtest-ilogb.c46 assert(ilogb(0) == FP_ILOGB0); in main()
47 assert(ilogb(NAN) == FP_ILOGBNAN); in main()
48 assert(ilogb(INFINITY) == INT_MAX); in main()
52 assert(*end == '\0'); in main()
54 assert(i == e); in main()
58 assert(ilogbf(0) == FP_ILOGB0); in main()
59 assert(ilogbf(NAN) == FP_ILOGBNAN); in main()
60 assert(ilogbf(INFINITY) == INT_MAX); in main()
64 assert(*end == '\0'); in main()
66 assert(i == e); in main()
[all …]
H A Dtest-lrint.c49 assert(feclearexcept(FE_ALL_EXCEPT) == 0); \
50 assert((func)(_d) == (result) || fetestexcept(FE_INVALID)); \
51 assert(fetestexcept(FE_ALL_EXCEPT) == (excepts)); \
71 assert(fesetround(FE_DOWNWARD) == 0); in run_tests()
75 assert(fesetround(FE_TONEAREST) == 0); in run_tests()
87 assert(fesetround(FE_UPWARD) == 0); in run_tests()
91 assert(fesetround(FE_DOWNWARD) == 0); in run_tests()
98 assert(fesetround(FE_TOWARDZERO) == 0); in run_tests()
105 assert(fesetround(FE_TONEAREST) == 0); in run_tests()
119 assert(fesetround(FE_TONEAREST) == 0); in run_tests()
H A Dtest-csqrt.c90 assert(isnan(creall(d2))); in assert_equal()
92 assert(creall(d1) == creall(d2)); in assert_equal()
93 assert(copysignl(1.0, creall(d1)) == in assert_equal()
97 assert(isnan(cimagl(d2))); in assert_equal()
99 assert(cimagl(d1) == cimagl(d2)); in assert_equal()
100 assert(copysignl(1.0, cimagl(d1)) == in assert_equal()
163 assert(t_csqrt(cpackl(a, b)) == cpackl(x, y)); in test_finite()
220 assert(creall(t_csqrt(cpackl(INFINITY, NAN))) == INFINITY); in test_nans()
221 assert(isnan(cimagl(t_csqrt(cpackl(INFINITY, NAN))))); in test_nans()
223 assert(isnan(creall(t_csqrt(cpackl(-INFINITY, NAN))))); in test_nans()
[all …]
H A Dtest-exponential.c63 assert(feclearexcept(FE_ALL_EXCEPT) == 0); \
64 assert(fpequal((func)(_d), (result))); \
65 assert(((func), fetestexcept(exceptmask) == (excepts))); \
137 assert(exp2f(i) == ldexpf(1.0, i)); in run_exp2_tests()
138 assert(fetestexcept(ALL_STD_EXCEPT) == 0); in run_exp2_tests()
141 assert(exp2(i) == ldexp(1.0, i)); in run_exp2_tests()
142 assert(fetestexcept(ALL_STD_EXCEPT) == 0); in run_exp2_tests()
145 assert(exp2l(i) == ldexpl(1.0, i)); in run_exp2_tests()
146 assert(fetestexcept(ALL_STD_EXCEPT) == 0); in run_exp2_tests()
/dflybsd-src/test/libpthread/
H A Dsem_d.c69 assert(-1 == sem_init(&sem_b, 1, 0)); in main()
70 assert(EPERM == errno); in main()
73 assert(0 == sem_init(&sem_b, 0, 0)); in main()
74 assert(0 == sem_getvalue(&sem_b, &val)); in main()
75 assert(0 == val); in main()
77 assert(0 == sem_post(&sem_b)); in main()
78 assert(0 == sem_getvalue(&sem_b, &val)); in main()
79 assert(1 == val); in main()
81 assert(0 == sem_wait(&sem_b)); in main()
82 assert(-1 == sem_trywait(&sem_b)); in main()
[all …]
H A Dmutex_d.c262 assert ((tok = (char *) malloc (strlen(order) + 1)) != NULL); in check_run_order()
264 assert (ioctl (pipefd[0], FIONREAD, &bytes) == 0); in check_run_order()
273 assert ((endptr != NULL) && (*endptr == '\0')); in check_run_order()
276 assert (read (pipefd[0], &id, sizeof (id)) == sizeof (id)); in check_run_order()
368 assert (pthread_mutex_unlock (&cond_mutex) == 0); in waiter()
375 assert (mutex_count < sizeof (held_mutex)); in waiter()
389 assert ((mutex_count <= sizeof (held_mutex)) && in waiter()
393 assert (pthread_mutex_unlock in waiter()
398 assert (pthread_mutex_lock (cmd.mutex) == 0); in waiter()
399 assert (pthread_cond_wait (cmd.cond, cmd.mutex) == 0); in waiter()
[all …]
/dflybsd-src/usr.sbin/nscd/
H A Dparser.c97 assert( entry != NULL); in find_create_entry()
99 assert(res == 0); in find_create_entry()
129 assert(ttl >= 0); in set_positive_time_to_live()
130 assert(entry_name != NULL); in set_positive_time_to_live()
151 assert(nttl > 0); in set_negative_time_to_live()
152 assert(entry_name != NULL); in set_negative_time_to_live()
157 assert(entry != NULL); in set_negative_time_to_live()
174 assert(count >= 0); in set_keep_hot_count()
175 assert(entry_name != NULL); in set_keep_hot_count()
178 assert(entry != NULL); in set_keep_hot_count()
[all …]
H A Dcachelib.c81 assert(hp1->key != NULL); in ht_items_cmp_func()
82 assert(hp2->key != NULL); in ht_items_cmp_func()
107 assert(hp1->key != NULL); in ht_items_fixed_size_left_cmp_func()
108 assert(hp2->key != NULL); in ht_items_fixed_size_left_cmp_func()
135 assert(hp->key != NULL); in ht_item_hash_func()
155 assert(key != NULL); in entries_bsearch_cmp_func()
156 assert(ent != NULL); in entries_bsearch_cmp_func()
166 assert(e1 != NULL); in entries_qsort_cmp_func()
167 assert(e2 != NULL); in entries_qsort_cmp_func()
189 assert(ws != NULL); in destroy_cache_mp_write_session()
[all …]
H A Dconfig.c115 assert(name != NULL); in create_configuration_entry()
116 assert(positive_params != NULL); in create_configuration_entry()
117 assert(negative_params != NULL); in create_configuration_entry()
118 assert(mp_params != NULL); in create_configuration_entry()
122 assert(retval != NULL); in create_configuration_entry()
163 assert(retval->name != NULL); in create_configuration_entry()
172 assert(retval->positive_cache_params.entry_name != NULL); in create_configuration_entry()
175 assert(retval->negative_cache_params.entry_name != NULL); in create_configuration_entry()
178 assert(retval->mp_cache_params.entry_name != NULL); in create_configuration_entry()
238 assert(entry != NULL); in destroy_configuration_entry()
[all …]
/dflybsd-src/test/testcases/io/pselect_1/
H A Dpselect_1.c55 assert(r == 1); in test_pselect()
56 assert(FD_ISSET(1, &wset)); in test_pselect()
63 assert(r == 0); in test_pselect()
70 assert(r == 1); in test_pselect()
73 assert(r == 1); in test_pselect()
74 assert(FD_ISSET(des[0], &rset)); in test_pselect()
77 assert(r == 1); in test_pselect()
78 assert(buf[0] == 'f'); in test_pselect()
91 assert(r == -1); in test_pselect()
92 assert(errno == EINTR); in test_pselect()
[all …]
/dflybsd-src/test/testcases/io/select_1/
H A Dselect_1.c53 assert(r == 1); in test_select()
54 assert(FD_ISSET(1, &wset)); in test_select()
61 assert(r == 0); in test_select()
68 assert(r == 1); in test_select()
71 assert(r == 1); in test_select()
72 assert(FD_ISSET(des[0], &rset)); in test_select()
75 assert(r == 1); in test_select()
76 assert(buf[0] == 'f'); in test_select()
89 assert(r == -1); in test_select()
90 assert(errno == EINTR); in test_select()
[all …]
/dflybsd-src/contrib/mdocml/
H A Ddbm.c150 assert(ip >= 0); in dbm_page_get()
151 assert(ip < npages); in dbm_page_get()
175 assert(match != NULL); in dbm_page_byname()
182 assert(match != NULL); in dbm_page_bysect()
189 assert(match != NULL); in dbm_page_byarch()
196 assert(match != NULL); in dbm_page_bydesc()
203 assert(im >= 0); in dbm_page_bymacro()
204 assert(im < MACRO_MAX); in dbm_page_bymacro()
205 assert(match != NULL); in dbm_page_bymacro()
240 assert(arg_iter == ITER_NAME || arg_iter == ITER_DESC || in page_bytitle()
[all …]
/dflybsd-src/lib/libc/rpc/
H A Drpc_prot.c70 assert(xdrs != NULL); in xdr_opaque_auth()
71 assert(ap != NULL); in xdr_opaque_auth()
86 assert(xdrs != NULL); in xdr_des_block()
87 assert(blkp != NULL); in xdr_des_block()
102 assert(xdrs != NULL); in xdr_accepted_reply()
103 assert(ar != NULL); in xdr_accepted_reply()
140 assert(xdrs != NULL); in xdr_rejected_reply()
141 assert(rr != NULL); in xdr_rejected_reply()
160 assert(0); in xdr_rejected_reply()
178 assert(xdrs != NULL); in xdr_replymsg()
[all …]
/dflybsd-src/contrib/nvi2/regex/
H A Dengine.c194 assert(m->coldp != NULL); in matcher()
200 assert(m->coldp < m->endp); in matcher()
235 assert(g->backrefs); /* must be back references doing it */ in matcher()
236 assert(g->nplus == 0 || m->lastpos != NULL); in matcher()
247 assert(m->pmatch[i].rm_so == -1); in matcher()
248 assert(m->pmatch[i].rm_eo == -1); in matcher()
254 assert(dp == NULL || dp == endp); in matcher()
261 assert(start <= stop); in matcher()
270 assert(m->pmatch != NULL); in matcher()
329 assert(nope); in dissect()
[all …]
/dflybsd-src/usr.bin/getent/
H A Dgetent.c142 assert(word != NULL); in parsenum()
143 assert(result != NULL); in parsenum()
193 assert(argc > 1); in ethers()
194 assert(argv != NULL); in ethers()
235 assert(argc > 1); in group()
236 assert(argv != NULL); in group()
274 assert(he != NULL); in hostsprint()
287 assert(argc > 1); in hosts()
288 assert(argv != NULL); in hosts()
324 assert(ne != NULL); in networksprint()
[all …]
/dflybsd-src/contrib/zstd/lib/compress/
H A Dzstd_cwksp.h164 assert(ws->workspace <= ws->objectEnd); in ZSTD_cwksp_assert_internal_consistency()
165 assert(ws->objectEnd <= ws->tableEnd); in ZSTD_cwksp_assert_internal_consistency()
166 assert(ws->objectEnd <= ws->tableValidEnd); in ZSTD_cwksp_assert_internal_consistency()
167 assert(ws->tableEnd <= ws->allocStart); in ZSTD_cwksp_assert_internal_consistency()
168 assert(ws->tableValidEnd <= ws->allocStart); in ZSTD_cwksp_assert_internal_consistency()
169 assert(ws->allocStart <= ws->workspaceEnd); in ZSTD_cwksp_assert_internal_consistency()
177 assert((align & mask) == 0); in ZSTD_cwksp_align()
203 assert(phase >= ws->phase); in ZSTD_cwksp_internal_advance_phase()
255 assert(alloc >= bottom); in ZSTD_cwksp_reserve_internal()
289 assert((bytes & (sizeof(U32)-1)) == 0); in ZSTD_cwksp_reserve_aligned()
[all …]
/dflybsd-src/contrib/ldns/ldns/
H A Dbuffer.h84 assert(buffer != NULL); in ldns_buffer_invariant()
85 assert(buffer->_position <= buffer->_limit); in ldns_buffer_invariant()
86 assert(buffer->_limit <= buffer->_capacity); in ldns_buffer_invariant()
87 assert(buffer->_data != NULL); in ldns_buffer_invariant()
173 assert(mark <= buffer->_limit); in ldns_buffer_set_position()
187 assert(buffer->_position + count <= buffer->_limit); in ldns_buffer_skip()
211 assert(limit <= buffer->_capacity); in ldns_buffer_set_limit()
259 assert(at <= buffer->_limit); in ldns_buffer_at()
309 assert(at <= buffer->_limit); in ldns_buffer_remaining_at()
362 assert(ldns_buffer_available_at(buffer, at, count)); in ldns_buffer_write_at()
[all …]
/dflybsd-src/contrib/elftoolchain/libelf/
H A Delf_update.c142 assert(sh_type != SHT_NULL && sh_type != SHT_NOBITS); in _libelf_compute_section_extents()
384 assert(pt == NULL || in _libelf_extent_is_unused()
407 assert(type >= ELF_EXTENT_EHDR && type <= ELF_EXTENT_SHDR); in _libelf_insert_extent()
519 assert(ec == ELFCLASS32 || ec == ELFCLASS64); in _libelf_resync_elf()
725 assert(ex->ex_type == ELF_EXTENT_SECTION); in _libelf_write_scn()
745 assert(elftype >= ELF_T_FIRST && elftype <= ELF_T_LAST); in _libelf_write_scn()
748 assert(sh_off % _libelf_falign(elftype, ec) == 0); in _libelf_write_scn()
774 assert(d->d_buf != NULL); in _libelf_write_scn()
775 assert(d->d_type == ELF_T_BYTE); in _libelf_write_scn()
776 assert(d->d_version == e->e_version); in _libelf_write_scn()
[all …]
/dflybsd-src/contrib/dhcpcd/src/
H A Dsa.c59 assert(sa != NULL); in sa_addroffset()
81 assert(sa != NULL); in sa_addrlen()
125 assert(sa != NULL); in sa_is_unspecified()
155 assert(sa != NULL); in sa_is_allones()
187 assert(sa != NULL); in sa_is_loopback()
220 assert(sa != NULL); in sa_toprefix()
295 assert(sa_cmp(sa, &ss.sa) == 0); in sa_toprefix()
366 assert(sa_toprefix(sa) == prefix); in sa_fromprefix()
379 assert(buf != NULL); in sa_addrtop()
380 assert(len > 0); in sa_addrtop()
[all …]

12345678910>>...28