Commit graph

11 commits

Author SHA1 Message Date
Dag-Erling Smørgrav
944782f506 Remove unnecessary headers. 2017-08-23 13:19:59 +02:00
Dag-Erling Smørgrav
3917a6dfd7 Annotate t_add_test() as printf()-like and fix the fallout. 2017-03-14 15:07:02 +01:00
Dag-Erling Smørgrav
f70dac496f Mechanically bump copyright dates to the date of the latest commit. 2017-02-19 20:07:43 +01:00
Dag-Erling Smørgrav
d8e26bc5bb Solve further asprintf() issues by sweeping them under the rug.
All further instances of asprintf() or vasprintf() in our codebase are either in libcryb-test or in individual unit tests, and in all cases, the only consequence of a failed call is that the result will say "no description" instead of either a description of the test or an explanation of how it failed.  Therefore, we can simply ignore the problem and cast the call to void to satisfy gcc.
2016-09-18 22:40:48 +02:00
Dag-Erling Smørgrav
e78c0f811b Remove unneeded #includes. 2016-09-17 16:05:31 +02:00
Dag-Erling Smørgrav
e276f2b407 Ensure that we always have off_t and ssize_t in scope.
POSIX requires <stdio.h> and <unistd.h> to define off_t and ssize_t like <sys/types.h> does, but not all platforms respect that.  Play it safe by always including <sys/types.h>.
2016-09-15 10:15:00 +02:00
Dag-Erling Smørgrav
401465d8ea Move main() from libcryb-test to the test program.
Instead of having libcryb-test provide main() and assume that the test program defines t_prepare() and t_cleanup(), have libcryb-test provide a t_main() function which the test program calls with pointers to its prepare and cleanup functions.
2016-03-15 14:29:44 +01:00
Dag-Erling Smørgrav
f8ebdbc14d Move the test framework into its own subdirectory 2015-10-04 07:49:48 +00:00
Dag-Erling Smørgrav
0961e4b2e0 Rewrite unit tests for the Fletcher and Adler checksums to exercise
boundary conditions (low and high word overflow).
2015-08-28 08:38:49 +00:00
Dag-Erling Smørgrav
5e1e20c624 Add marginally useful test cases based on t_zero. 2015-08-18 15:21:02 +00:00
Dag-Erling Smørgrav
aa97da3335 Add simple implementations of Fletcher's checksum. 2015-08-17 15:21:47 +00:00