1
0
mirror of https://git.tukaani.org/xz.git synced 2026-10-31 03:14:56 +00:00

Tests: tuktest.h: Fix a comment

This commit is contained in:
Lasse Collin 2026-05-19 14:10:03 +03:00
parent 29584cdaf3
commit 6566e6251a
No known key found for this signature in database
GPG Key ID: 38EE757D69184620

View File

@ -627,8 +627,10 @@ tuktest_run_test(void (*testfunc)(void), const char *testfunc_str)
/// to the filename. Otherwise the filename is used as is (and so /// to the filename. Otherwise the filename is used as is (and so
/// the behavior is identical to tuktest_file_from_builddir() below). /// the behavior is identical to tuktest_file_from_builddir() below).
/// ///
/// On success the a pointer to malloc'ed memory is returned. /// On success a pointer to allocated memory is returned.
/// The size of the allocation and the file is stored in *size. /// The size of the allocation and the file is stored in *size.
/// The allocation is done like by tuktest_malloc(), so there
/// usually is no need to explicitly free the memory.
/// ///
/// If anything goes wrong, a hard error is reported and this function /// If anything goes wrong, a hard error is reported and this function
/// won't return. Possible other tests won't be run (this will call exit()). /// won't return. Possible other tests won't be run (this will call exit()).
@ -637,8 +639,7 @@ tuktest_run_test(void (*testfunc)(void), const char *testfunc_str)
/// The assumption is that something is wrong in these cases. /// The assumption is that something is wrong in these cases.
/// ///
/// This function can be called either from outside the tests (like in main()) /// This function can be called either from outside the tests (like in main())
/// or from tests run via tuktest_run(). Remember to free() the memory to /// or from tests run via tuktest_run().
/// keep Valgrind happy.
#define tuktest_file_from_srcdir(filename, sizeptr) \ #define tuktest_file_from_srcdir(filename, sizeptr) \
tuktest_file_from_x(getenv("srcdir"), filename, sizeptr, \ tuktest_file_from_x(getenv("srcdir"), filename, sizeptr, \
__FILE__, __LINE__) __FILE__, __LINE__)