aboutsummaryrefslogtreecommitdiff
path: root/tests/CMakeLists.txt
AgeCommit message (Collapse)AuthorFilesLines
2024-02-05cmocka: Add all_zero() function and testAndreas Schneider1-0/+1
Reviewed-by: Joseph Sutton <jsutton@samba.org>
2024-02-05tests: Add tests for assert_memory_equal()Andreas Schneider1-0/+9
Reviewed-by: Joseph Sutton <jsutton@samba.org>
2024-02-03Sanitize XML strings.Jakub Czapiga1-2/+2
Replace characters with their XML string equivalents to allow for them in the tests and groups names. Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2024-02-03Improve c_strreplace implementationJakub Czapiga1-0/+1
Return successfuly if there is nothing to replace. Allow for replacement with superset pattern. Simplified example without fix: c_strreplace("ABCD", "A", "AX") -> "AAAAAA...AAAXBCD" Simplified example with fix: c_strreplace("ABCD", "A", "AX") -> "AXBCD" Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2024-02-02tests: Add test for expect_int_in_set_count()Andreas Schneider1-0/+1
2024-01-05Add unit tests for assert_false()Eshan Kelkar1-0/+18
Signed-off-by: Eshan Kelkar <eshankelkar@galorithm.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2024-01-05Add unit tests for assert_true()Eshan Kelkar1-0/+18
Signed-off-by: Eshan Kelkar <eshankelkar@galorithm.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2023-02-01cmake: Use C99 and define GNU and POSIX flags directly at source filesAndreas Schneider1-1/+1
Fixes #50
2023-01-29tests: Add tests for will_return/mock with ptr and type saftey checkingAndreas Schneider1-1/+1
2023-01-29test: Test assert_ptr_equal and _not_equal macrosAlois Klink1-0/+9
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2022-12-01cmocka: Only handle exceptions on platforms supporting itAndreas Schneider1-1/+4
This also issues a warning during compile time.
2022-11-28tests: Add tests for assert_uint_not_in_set()Andreas Schneider1-1/+1
2022-11-28tests: Add tests for assert_uint_in_set()Andreas Schneider1-1/+1
2022-11-28tests: Add tests for assert_not_int_in_set()Andreas Schneider1-1/+1
2022-11-28tests: Add tests for assert_int_in_set()Andreas Schneider1-0/+9
2022-11-28tests: Add tests for assert_uint_not_in_range()Andreas Schneider1-1/+1
2022-11-28tests: Add test for assert_int_not_in_range()Andreas Schneider1-1/+1
2022-06-13tests: Add negative tests for assert_int_in_range()Andreas Schneider1-0/+8
2022-06-13tests: Add tests for assert_int_in_range()Andreas Schneider1-0/+1
2022-03-13tests: Add negative test for assert_uint_not_equal()Andreas Schneider1-1/+1
2022-03-13tests: Add negative test for assert_uint_equal()Andreas Schneider1-1/+1
2022-03-13tests: Add negative test for assert_int_not_equal()Andreas Schneider1-1/+1
2022-03-13tests: Add negative tests for assert_int_equal()Andreas Schneider1-0/+8
2022-03-13tests: Add test for assert_intequal()Andreas Schneider1-0/+1
2022-03-12Add a test to reproduce the 'NULL pointer dereference in _function_called' bug.Wolfram Ladurner1-1/+3
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2022-03-11Add new feature stopCarsten Lange1-1/+11
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2022-03-02tests: The exception handler doesn't work on WindowsAndreas Schneider1-11/+8
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2022-03-02tests: Relax regular expression for test_exception_handlerAndreas Schneider1-1/+1
2022-02-26Add macro for expect_check_countJohan Stridkvist1-0/+10
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2020-10-12cmocka: Remove deprecated functions and cmockery legacy supportAndreas Schneider1-6/+0
2020-10-05cmocka: Remove cast in assert_string_(not_)equal macrosAndreas Schneider1-0/+1
Also add basic tests Fixes #48
2020-10-04cmocka: add header with version to TAP13 outputSergey Bronnikov1-3/+6
Version must be specified in a first line of TAP13 output. See TAP13 specification - https://testanything.org/tap-version-13-specification.html Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2020-10-04Fix TAP output for skipped testsMatthias Schiffer1-1/+1
According to [1], a skipped test should print "ok" and not "not ok" before "# SKIP". This breaks tests harnesses like the one built into Meson [2]. [1] http://testanything.org/tap-specification.html [2] https://mesonbuild.com/Unit-tests.html
2020-02-06Add group_name in cmprintf_group_finish_standard.Arnaud Gelas1-3/+3
When using cmocka_run_group_tests_name, group_name was not printed; which made it complicated to know when one failure occurs.
2019-11-19cmocka: Add new assert macros to compare 2 double given an epsilon.Arnaud Gelas1-0/+1
assert_double_equal and assert_double_not_equal Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2019-10-22cmake: Create a static cmocka library for testingAndreas Schneider1-1/+1
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2019-10-16cmake: Make shared lib optionalArnaud Gelas1-6/+10
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2019-03-28tests: Add tests for skip filterAnderson Toshiyuki Sasaki1-1/+3
Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
2019-01-22include: Add new assert macros to compare 2 floats given an epsilon.Arnaud Gelas1-0/+1
assert_float_equal and assert_float_not_equal
2018-09-27cmake: Update AddCMockaTestAndreas Schneider1-14/+15
2018-09-26tests: Remove left over debug messageAndreas Schneider1-1/+0
2018-09-25cmake: Add -DCMAKE_BUILD_TYPE=UndefinedSanitizerAndreas Schneider1-15/+26
2018-09-11cmake: Fix linking with -fstack-protector* on SolarisAndreas Schneider1-0/+5
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2018-09-10cmake: Use modern cmake for buildng the testsAndreas Schneider1-6/+1
2018-08-29cmake: Don't use CMAKE_SOURCE_DIRAndreas Schneider1-1/+1
2018-08-23cmake: Also handle Illegal instructionAndreas Schneider1-1/+1
This is raised on a -O3 build.
2018-08-22cmake: Add new CompilerCheck.cmakeAndreas Schneider1-0/+2
2018-06-11tests: Add a test to check if wildcards are workingAndreas Schneider1-1/+2
2018-06-11cmocka: Add c_strmatch() functionAndreas Schneider1-0/+1
2017-08-11cmocka: Print the error message of a fixture if it failsAndreas Schneider1-2/+2
This adds error information to the output.