I was evaluating this framework and found that is seems not possible to build multiple c test files. So do I have to put all tests in one single module?
This file alone ( test_all.c) compiles and run correctly.
#define CESTER_NO_MAIN
#include <exotic/cester.h>
CESTER_TEST(test1, test_instance,
cester_assert_equal(NULL, NULL);
)
CESTER_TEST(test_two, test_instance,
cester_assert_ptr_equal(test_instance, NULL);
)
CESTER_TEST(test_three, test_instance,
cester_assert_short_eq(1, 1);
)
CESTER_BODY(
int main(int argc, char** argv) {
return CESTER_RUN_ALL_TESTS(argc, argv);
}
)
But as I add a new one (test_my_module1.c) I get some strange linker errors saying that there are:
I also had to define CESTER_NO_MAIN and CESTER_NO_SIGNAL in order to lower the number of "multiple definition" errors.
#define CESTER_NO_MAIN
#define CESTER_NO_SIGNAL
#include <exotic/cester.h>
CESTER_TEST(test4, test_instance,
cester_assert_equal(NULL, NULL);
)
Discussed in #54
Originally posted by stefano-p July 21, 2021
Please add support for for multiple C/C++ files containing assertions/tests. Ideally it should be possible to build the tests with a single command, and then run the tests with a single command.