From bb40c4cbc74fe48a04069e6efb78c94bd0cc0451 Mon Sep 17 00:00:00 2001 From: "martin@ashbysoft.com" Date: Sat, 11 Jun 2022 21:59:03 +0000 Subject: Add CuTest and test script. Update ex1-9 with unit tests using CuTest. --- cutest-1.5/AllTests.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 cutest-1.5/AllTests.c (limited to 'cutest-1.5/AllTests.c') diff --git a/cutest-1.5/AllTests.c b/cutest-1.5/AllTests.c new file mode 100644 index 0000000..5c849ef --- /dev/null +++ b/cutest-1.5/AllTests.c @@ -0,0 +1,25 @@ +#include + +#include "CuTest.h" + +CuSuite* CuGetSuite(); +CuSuite* CuStringGetSuite(); + +void RunAllTests(void) +{ + CuString *output = CuStringNew(); + CuSuite* suite = CuSuiteNew(); + + CuSuiteAddSuite(suite, CuGetSuite()); + CuSuiteAddSuite(suite, CuStringGetSuite()); + + CuSuiteRun(suite); + CuSuiteSummary(suite, output); + CuSuiteDetails(suite, output); + printf("%s\n", output->buffer); +} + +int main(void) +{ + RunAllTests(); +} -- cgit v1.2.3-ZIG