Replace Criterion by CUnit
Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
This commit is contained in:
parent
60752b3fd8
commit
74a48c5731
47 changed files with 4486 additions and 5388 deletions
|
@ -9,6 +9,7 @@
|
|||
#
|
||||
# SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
|
||||
#
|
||||
include(Criterion)
|
||||
add_criterion_executable(criterion_tools_pubsub . ../common.c ../testtype.c ../porting.c)
|
||||
target_link_libraries(criterion_tools_pubsub util CycloneDDS::ddsc)
|
||||
include(CUnit)
|
||||
|
||||
add_cunit_executable(CUnit_tools_pubsub ../common.c ../testtype.c ../porting.c basic.c)
|
||||
target_link_libraries(CUnit_tools_pubsub util CycloneDDS::ddsc)
|
|
@ -9,20 +9,17 @@
|
|||
*
|
||||
* SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
|
||||
*/
|
||||
#include <criterion/criterion.h>
|
||||
#include <criterion/logging.h>
|
||||
#include "CUnit/Test.h"
|
||||
|
||||
#define MAIN test_main
|
||||
#include "../pubsub.c"
|
||||
|
||||
Test(tools_pubsub, main) {
|
||||
CU_Test(tools_pubsub, main) {
|
||||
char *argv[] = {"pubsub", "-T", "pubsubTestTopic", "-K", "KS", "-w1:1", "-D", "1", "-q", "t:d=t,r=r", "pubsub_partition"};
|
||||
int argc = sizeof(argv) / sizeof(char*);
|
||||
|
||||
cr_log_info("Starting pubsub basic test");
|
||||
int result = MAIN(argc, argv);
|
||||
if (result != 0)
|
||||
printf("exitcode was %d\n", result);
|
||||
cr_assert_eq(result, 0, "pubsub exited non-zero");
|
||||
cr_log_info("Stopping pubsub basic test");
|
||||
CU_ASSERT_EQUAL_FATAL(result, 0);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue