summaryrefslogtreecommitdiff
path: root/tests/test-bitset.c
Commit message (Collapse)AuthorAgeFilesLines
* maint: run 'make update-copyright'Simon Josefsson2023-01-011-1/+1
|
* license: fix GPLv3 texts to use a comma instead of semicolon.Bernhard Voelker2022-01-051-1/+1
| | | | | | | | | See: https://www.gnu.org/licenses/gpl-3.0.html#howto Run: $ git grep -l 'Foundation; either version 3' \ | xargs sed -i '/Foundation; either version 3/ s/n; e/n, e/' * All files using GPLv3: Adjust via the above command.
* maint: run 'make update-copyright'Paul Eggert2022-01-011-1/+1
|
* maint: run 'make update-copyright'Paul Eggert2020-12-311-1/+1
|
* bitset: tests: check BITSET_FOR_EACH_REVERSEAkim Demaille2020-11-301-0/+39
| | | | | * tests/test-bitset.c (compare, check_zero, check_one_bit, check_ones): Check BITSET_FOR_EACH_REVERSE.
* bitset: tests: exercise the stats tooAkim Demaille2020-11-191-0/+4
| | | | | | | * tests/test-bitset.c: Display the stats at the end of the test. * lib/bitset/stats.c (bitset_log_histogram_print): When diplaying the last bin, display "256-..." rather that "256-511", since the last bin does count item greater than or equal to 256.
* bitset: tests: try harder to break itAkim Demaille2020-11-191-10/+18
| | | | | | | | | | | bitset_list (used in bitset_first, bitset_next, bitset_count, BITSET_FOR_EACH, etc.) uses a cache of size BITSET_LIST_SIZE (1024). None of our tests current try bitsets bigger than this. * tests/test-bitset.c (compare): Be ready to use bitsets larger than BITSET_LIST_SIZE. (main): Likewise. While at it, also exercise super small bitsets.
* bitset: check empty and full bitsetsAkim Demaille2020-11-191-0/+56
| | | | | * tests/test-bitset.c (check_zero, check_ones): New. (check_attributes): Use them.
* bitset: strengthen testsAkim Demaille2020-11-181-80/+85
| | | | | | | * tests/test-bitset.c (compare): Also check count. Deal only with random values, move the one-bit tests to... (check_one_bit): this new function. (check_attributes): Call it.
* bitset: test: run deterministic tests on several bitset sizesAkim Demaille2020-11-181-10/+13
| | | | | * tests/test-bitset.c (check_attributes): Run it with small and large sizes.
* bitset: more testsAkim Demaille2020-11-151-9/+96
| | | | | | | | | These new tests managed to uncover shortcomings in previous versions of the following commit. * tests/test-bitset.c (compare): Make it clear that the random values should not be modified. Check bitset_first, bitset_last and BITSET_FOR_EACH.
* maint: Run 'make update-copyright'Paul Eggert2019-12-311-1/+1
|
* bitset: expose bitset_resizeAkim Demaille2019-03-211-6/+19
| | | | | | * lib/bitset.h (bitset_resize): Bounce on the polymorphic implementation. * tests/test-bitset.c (check_attributes): Check bitset_resize. (main): Use a variable bitset as reference, since fixed does not support resize.
* bitset: a bit (...) more testsAkim Demaille2019-03-171-0/+29
| | | | * tests/test-bitset.c (check_attributes): Check zero and ones.
* tests: Free allocated memory.Bruno Haible2019-03-101-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reported by <deltatau@protonmail.com> via Assaf Gordon. * tests/test-astrxfrm.c (main): Free allocated memory. * tests/test-bitset.c (compare, check_attributes): Free allocated bitsets. * tests/test-filenamecat.c (main): Free allocated memory. * tests/test-freadahead.c (main): Free allocated memory and close stdin. * tests/test-freadptr.c (main): Likewise. * tests/test-freadptr2.c (main): Free allocated memory. * tests/test-freadseek.c (main): Likewise. * tests/test-gc-arcfour.c (main): Close allocated context. * tests/test-gc-arctwo.c (main): Likewise. * tests/test-gc-des.c (main): Close all allocated contexts. * tests/test-pipe-filter-gi1.c (main): Free allocated memory. * tests/test-pipe-filter-ii1.c (main): Likewise. * tests/test-posix_spawn_file_actions_addchdir.c (main): Destroy the allocated file actions. * tests/test-posix_spawn_file_actions_addclose.c (main): Likewise. * tests/test-posix_spawn_file_actions_adddup2.c (main): Likewise. * tests/test-posix_spawn_file_actions_addopen.c (main): Likewise. * tests/test-sameacls.c (main): Free allocated memory and ACLs. * tests/test-strfmon_l.c (main): Free allocated locales. * tests/test-striconveh.c (main): Free allocated iconv_t objects. * tests/uniconv/test-u8-conv-to-enc.c (main): Free allocated memory. * tests/uniconv/test-u16-conv-to-enc.c (main): Likewise. * tests/uniconv/test-u32-conv-to-enc.c (main): Likewise. * tests/unistr/test-chr.h (main): Free input32. * tests/unistr/test-strchr.h (test_strchr): Likewise.
* maint: Run 'make update-copyright'Paul Eggert2019-01-011-1/+1
|
* bitset: check the operationsAkim Demaille2018-11-291-0/+103
| | | | | | * tests/test-bitset.c (bitset_random): New. Use it. * lib/bitset/expandable.c (ebitset_not): Fix typo.
* bitset: add tests and docAkim Demaille2018-11-251-0/+66
First stabs at providing a documentation and test for the bitset module. * doc/bitset.texi, modules/test-bitset, tests/bitset-tests.c: New.