Home
last modified time | relevance | path

Searched +refs:test +refs:assert (Results 1 – 25 of 241) sorted by relevance

12345678910

/freebsd/contrib/libucl/tests/
H A Dtest_generate.c32 assert (ptr == NULL); in ud_dtor()
46 const ucl_object_t *found, *it_obj, *test; in main() local
77 assert (ucl_object_replace_key (obj, cur, "key0", 0, false)); in main()
91 assert (ucl_array_index_of (ar, cur) == 0); in main()
94 assert (ucl_array_index_of (ar, cur) == 1); in main()
97 assert (ucl_array_index_of (ar, cur) == 0); in main()
124 assert (ucl_object_todouble (cur) == 1.0); in main()
129 assert (ucl_object_todouble (cur) == 2.0); in main()
134 assert (ucl_object_todouble (cur) == 3.0); in main()
171 test = ucl_object_lookup_any (obj, "key100", "key200", "key300", "key16", NULL); in main()
[all …]
/freebsd/crypto/krb5/src/lib/crypto/crypto_tests/
H A Dt_cksums.c35 struct test { struct
187 struct test *test; in main() local
197 test = &test_cases[i]; in main()
198 if (test->enctype != 0) { in main()
200 kb.enctype = test->enctype; in main()
201 kb.length = test->keybits.length; in main()
202 kb.contents = (unsigned char *)test->keybits.data; in main()
206 ret = krb5_c_make_checksum(context, test->sumtype, kbp, test->usage, in main()
207 &test->plaintext, &cksum); in main()
208 assert(!ret); in main()
[all …]
H A Dt_derive.c34 struct test { struct
316 struct test *test; in main() local
328 test = &test_cases[i]; in main()
330 kb.enctype = test->enctype; in main()
331 kb.length = test->inkey.length; in main()
332 kb.contents = (unsigned char *)test->inkey.data; in main()
334 assert(!ret); in main()
335 enc = get_enc_provider(test->enctype); in main()
336 hash = get_hash_provider(test->enctype); in main()
337 if (test->expected_key.length == enc->keylength) { in main()
[all …]
H A Dt_decrypt.c35 struct test { struct
558 assert(!ret); in generate()
562 assert(!ret); in generate()
566 assert(!ret); in generate()
568 assert(!ret); in generate()
570 assert(!ret); in generate()
590 struct test *test; in main() local
598 test = &test_cases[i]; in main()
600 kb.enctype = test->enctype; in main()
601 kb.length = test->keybits.length; in main()
[all …]
H A Dt_prf.c35 struct test { struct
125 const struct test *test; in main() local
128 test = &tests[i]; in main()
130 kb.enctype = test->enctype; in main()
131 kb.length = test->keybits.length; in main()
132 kb.contents = (uint8_t *)test->keybits.data; in main()
134 ret = krb5_c_prf_length(NULL, test->enctype, &prfsz); in main()
135 assert(!ret); in main()
137 assert(!ret); in main()
139 assert(!ret); in main()
H A Dt_encrypt.c53 test(const char *msg, krb5_error_code retval) in test() function
110 test ("Seeding random number generator", in main()
132 test ("Initializing a keyblock", in main()
134 test ("Generating random keyblock", in main()
136 test ("Creating opaque key from keyblock", in main()
147 test ("Encrypting (c)", in main()
150 test ("Decrypting", in main()
152 test ("Comparing", compare_results (&in, &check)); in main()
156 test ("Encrypting (k)", in main()
159 test ("Decrypting", in main()
[all …]
H A Dt_str2key.c29 struct test { struct
467 struct test *test; in main() local
474 test = &test_cases[i]; in main()
475 string = string2data(test->string); in main()
476 ret = krb5_init_keyblock(context, test->enctype, 0, &keyblock); in main()
477 assert(!ret); in main()
478 k5_allow_weak_pbkdf2iter = test->allow_weak; in main()
479 ret = krb5_c_string_to_key_with_params(context, test->enctype, in main()
480 &string, &test->salt, in main()
481 &test->params, keyblock); in main()
[all …]
H A Dvectors.c78 assert (tests[i].n / 8 <= sizeof (outbuf)); in test_nfold()
133 assert (strlen (s) + 4 < sizeof (buf)); in test_mit_des_s2k()
178 assert (strlen (s) + 4 < sizeof (buf)); in test_s2k()
380 } test[] = { in test_pbkdf2() local
407 for (j = 0; j < sizeof(test)/sizeof(test[0]); j++) { in test_pbkdf2()
409 test[j].count, test[j].pass); in test_pbkdf2()
410 if (isprint(test[j].salt[0])) in test_pbkdf2()
411 printf("\"%s\")\n", test[j].salt); in test_pbkdf2()
413 char *s = test[j].salt; in test_pbkdf2()
421 pass.data = test[j].pass; in test_pbkdf2()
[all …]
H A Dt_sha2.c39 struct test { struct
44 struct test sha256_tests[] = { argument
63 struct test sha384_tests[] = {
90 hash_test(const struct krb5_hash_provider *hash, struct test *tests) in hash_test()
92 struct test *t; in hash_test()
103 assert(iovs != NULL); in hash_test()
/freebsd/contrib/llvm-project/llvm/include/llvm/ADT/
H A DSmallBitVector.h96 assert(!isSmall()); in getPointer()
108 assert(!isSmall() && "Tried to use an unaligned pointer"); in switchToLarge()
114 assert(isSmall()); in getSmallRawBits()
119 assert(isSmall()); in setSmallRawBits()
376 assert(Idx <= static_cast<unsigned>( in set()
388 assert(I <= E && "Attempted to set backwards range!"); in set()
389 assert(E <= size() && "Attempted to set out-of-bounds range!"); in set()
419 assert(I <= E && "Attempted to reset backwards range!"); in reset()
420 assert(E <= size() && "Attempted to reset out-of-bounds range!"); in reset()
455 assert(Idx < size() && "Out-of-bounds Bit access.");
[all …]
H A DBitfields.h126 assert(UserValue <= UserMaxValue && "value is too big"); in pack()
127 assert(UserValue <= BP::Umax && "value is too big"); in pack()
139 assert(UserValue <= UserMaxValue && "value is too big");
140 assert(UserValue <= T(BP::Smax) && "value is too big");
141 assert(UserValue >= T(BP::Smin) && "value is too small");
185 static StorageType test(StorageType Packed) { return Packed & Mask; }
262 static StorageType test(StorageType Packed) {
264 return I::test(Packed);
/freebsd/contrib/libarchive/libarchive/test/
H A DREADME1 This is the test harness for libarchive.
7 Each test is a function named test_foo in a file named test_foo.c.
11 #include "test.h"
13 The test function must be declared with a line of this form
19 When you add a test, please update the top-level Makefile.am and the
22 automatically collect a list of test functions to be invoked.
24 Each test function can rely on the following:
27 suitable for that test. (The top-level main() creates a
28 directory for each separate test and chdir()s to that directory
29 before running the test
[all...]
/freebsd/crypto/krb5/src/util/support/
H A Dt_utf16.c46 struct test { struct
86 struct test *t; in main()
96 assert(ret == EINVAL); in main()
98 assert(ret == 0); in main()
99 assert(t->utf16len == utf16len); in main()
100 assert(memcmp(t->utf16, utf16, utf16len) == 0); in main()
108 assert(ret == EINVAL); in main()
110 assert(ret == 0); in main()
111 assert(strcmp(t->utf8, utf8) == 0); in main()
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/
H A DStatepointLowering.h58 assert(!Locations.count(Val) && in setLocation()
80 assert(I != PendingGCRelocateCalls.end() && in relocCallVisited()
93 assert(Offset >= 0 && Offset < (int)AllocatedStackSlots.size() && in reserveStackSlot()
95 assert(!AllocatedStackSlots.test(Offset) && "already reserved!"); in reserveStackSlot()
96 assert(NextSlotToAllocate <= (unsigned)Offset && "consistency!"); in reserveStackSlot()
101 assert(Offset >= 0 && Offset < (int)AllocatedStackSlots.size() && in isStackSlotAllocated()
103 return AllocatedStackSlots.test(Offset); in isStackSlotAllocated()
/freebsd/tools/regression/
H A DTODO3 A lot of the tests written in C use assert(), only printing 'ok' at the end
4 of the program if none of the assert()s fired.
6 This is wrong. They should do the test outside of an assert(), and print
8 That way if a test starts failing we'll know exactly which one failed, and
12 provide an ok() function (the non-fatal assert), probably with some helper
13 functions to keep track of test numbers and so on.
/freebsd/sys/contrib/openzfs/tests/zfs-tests/tests/functional/channel_program/lua_core/
H A Dtst.lib_table.lua65 assert(select(lim, unpack(a)) == lim and select('#', unpack(a)) == lim)
67 assert(x == 1)
69 assert(#x == lim and x[1] == 1 and x[lim] == lim)
71 assert(#x == 3 and x[1] == lim-2 and x[3] == lim)
73 assert(next(x) == nil) -- no elements
75 assert(next(x) == nil) -- no elements
77 assert(x == 10 and y == nil)
79 assert(x == 10 and y == 11 and z == nil)
81 assert(a==1 and x==nil)
83 assert(a==1 and x==nil)
[all …]
/freebsd/contrib/llvm-project/llvm/include/llvm/DebugInfo/PDB/Native/
H A DHashTable.h71 assert(Map->Present.test(Index));
81 if (Map->Present.test(Index))
243 assert(FirstUnused); in find_as()
257 assert(Iter != end()); in get()
262 bool isPresent(uint32_t K) const { return Present.test(K); } in isPresent()
263 bool isDeleted(uint32_t K) const { return Deleted.test(K); } in isDeleted()
277 assert(isPresent(Entry.index())); in set_as_internal()
278 assert(Traits.storageKeyToLookupKey(Buckets[Entry.index()].first) == K); in set_as_internal()
285 assert(!isPresent(Entry.index())); in set_as_internal()
286 assert(Entry.isEnd()); in set_as_internal()
[all …]
/freebsd/crypto/krb5/src/tests/gssapi/
H A Dt_invalid.c90 struct test { struct
198 make_fake_context(const struct test *test) in make_fake_context() argument
209 kgctx->sealalg = test->sealalg; in make_fake_context()
210 kgctx->signalg = test->signalg; in make_fake_context()
211 kgctx->cksum_size = test->cksum_size; in make_fake_context()
213 kb.enctype = test->enctype; in make_fake_context()
214 kb.length = test->keylen; in make_fake_context()
215 kb.contents = (unsigned char *)test->keydata; in make_fake_context()
219 kb.enctype = test->encseq_enctype; in make_fake_context()
254 assert(mech_krb5.length == 9); in make_token()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Target/Hexagon/MCTargetDesc/
H A DHexagonMCELFStreamer.cpp68 assert(MCB.getOpcode() == Hexagon::BUNDLE); in emitInstruction()
69 assert(HexagonMCInstrInfo::bundleSize(MCB) <= HEXAGON_PACKET_SIZE); in emitInstruction()
70 assert(HexagonMCInstrInfo::bundleSize(MCB) > 0); in emitInstruction()
197 if (Features.test(Hexagon::ExtensionHVXIEEEFP)) in emitTargetAttributes()
199 if (Features.test(Hexagon::ExtensionHVXQFloat)) in emitTargetAttributes()
201 if (Features.test(Hexagon::ExtensionZReg)) in emitTargetAttributes()
203 if (Features.test(Hexagon::ExtensionAudio)) in emitTargetAttributes()
205 if (Features.test(Hexagon::FeatureCabac)) in emitTargetAttributes()
/freebsd/contrib/llvm-project/llvm/lib/CodeGen/
H A DScheduleDAG.cpp138 assert(NumPreds < std::numeric_limits<unsigned>::max() && in addPred()
140 assert(N->NumSuccs < std::numeric_limits<unsigned>::max() && in addPred()
150 assert(NumPredsLeft < std::numeric_limits<unsigned>::max() && in addPred()
160 assert(N->NumSuccsLeft < std::numeric_limits<unsigned>::max() && in addPred()
184 assert(Succ != N->Succs.end() && "Mismatching preds / succs lists!"); in removePred()
187 assert(NumPreds > 0 && "NumPreds will underflow!"); in removePred()
188 assert(N->NumSuccs > 0 && "NumSuccs will underflow!"); in removePred()
194 assert(WeakPredsLeft > 0 && "WeakPredsLeft will underflow!"); in removePred()
197 assert(NumPredsLeft > 0 && "NumPredsLeft will underflow!"); in removePred()
203 assert(N->WeakSuccsLeft > 0 && "WeakSuccsLeft will underflow!"); in removePred()
[all …]
H A DStackColoring.cpp478 if (ConservativeSlots.test(Slot)) in applyFirstUse()
534 dbgs() << BV.test(I) << " "; in dumpBV()
540 assert(BI != BlockLiveness.end() && "Block not found"); in dumpBB()
567 assert((MI.getOpcode() == TargetOpcode::LIFETIME_START || in getStartOrEndSlot()
589 if (!InterestingSlots.test(Slot)) in isLifetimeStartOrEnd()
609 if (InterestingSlots.test(Slot) && applyFirstUse(Slot)) { in isLifetimeStartOrEnd()
686 if (! BetweenStartEnd.test(Slot)) { in collectMarkers()
740 assert(slots.size() == 1 && "unexpected: MI ends multiple slots"); in collectMarkers()
742 if (BlockInfo.Begin.test(Slot)) { in collectMarkers()
758 if (BlockInfo.End.test(Slot)) { in collectMarkers()
[all …]
/freebsd/contrib/ncurses/menu/
H A Dm_global.c117 assert(menu && menu->items); in ComputeMaximum_NameDesc_Lengths()
149 assert(menu && items); in ResetConnectionInfo()
273 int test = wcwidth(temp[n]); in _nc_Calculate_Text_Width() local
275 if (test <= 0) in _nc_Calculate_Text_Width()
276 test = 1; in _nc_Calculate_Text_Width()
277 result += test; in _nc_Calculate_Text_Width()
297 assert(menu && menu->items); in calculate_actual_width()
342 assert(menu); in _nc_Calculate_Item_Length_and_Width()
507 assert(menu); in _nc_Show_Menu()
514 assert(menu->sub); in _nc_Show_Menu()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Target/AMDGPU/Utils/
H A DAMDGPUBaseInfo.cpp657 assert(Info); in getVOPDComponents()
660 assert(OpX && OpY); in getVOPDComponents()
667 assert(OpDesc.getNumDefs() == Component::DST_NUM); in ComponentProps()
669 assert(OpDesc.getOperandConstraint(Component::SRC0, MCOI::TIED_TO) == -1); in ComponentProps()
670 assert(OpDesc.getOperandConstraint(Component::SRC1, MCOI::TIED_TO) == -1); in ComponentProps()
672 assert(TiedIdx == -1 || TiedIdx == Component::DST); in ComponentProps()
676 assert(SrcOperandsNum <= Component::MAX_SRC_NUM); in ComponentProps()
689 assert(CompOprIdx < Component::MAX_OPR_NUM); in getIndexInParsedOperands()
732 assert(CompIdx < COMPONENTS_NUM); in getRegIndices()
770 if (!STI.getFeatureBits().test(FeatureSupportsXNACK)) in AMDGPUTargetID()
[all …]
/freebsd/contrib/expat/tests/
H A Dminicheck.c75 assert(suite != NULL); in suite_add_tcase()
76 assert(tc != NULL); in suite_add_tcase()
77 assert(tc->next_tcase == NULL); in suite_add_tcase()
86 assert(tc != NULL); in tcase_add_checked_fixture()
92 tcase_add_test(TCase *tc, tcase_test_function test) { in tcase_add_test() argument
93 assert(tc != NULL); in tcase_add_test()
99 assert(new_tests != NULL); in tcase_add_test()
103 tc->tests[tc->ntests] = test; in tcase_add_test()
195 assert(runner != NULL); in srunner_run_all()
263 assert(runner != NULL); in srunner_ntests_failed()
/freebsd/contrib/llvm-project/llvm/lib/MC/
H A DMCSubtargetInfo.cpp43 if (Implies.test(FE.Value)) in SetImpliedBits()
52 if (FE.Implies.getAsBitset().test(Value)) { in ClearImpliedBits()
61 assert(SubtargetFeatures::hasFlag(Feature) && in ApplyFeatureFlag()
159 assert(llvm::is_sorted(ProcDesc) && "CPU table is not sorted"); in getFeatures()
160 assert(llvm::is_sorted(ProcFeatures) && "CPU features table is not sorted"); in getFeatures()
274 if (FeatureBits.test(FeatureEntry->Value)) { in ToggleFeature()
311 assert(llvm::is_sorted(ProcDesc) && in getSchedModelForCPU()
324 assert(CPUEntry->SchedModel && "Missing processor SchedModel value"); in getSchedModelForCPU()
343 return FeatureBits.test(FeatureKV.Value); in getEnabledProcessorFeatures()

12345678910