Skip to content

Commit

Permalink
[CN-Test-Gen] Don't init tests if generator failed
Browse files Browse the repository at this point in the history
  • Loading branch information
ZippeyKeys12 committed Oct 21, 2024
1 parent 81efc43 commit 2b0cfb2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion runtime/libcn/include/cn-testing/test.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ void cn_register_test_case(char* suite, char* name, cn_test_case_fn* func);
for (int i = 0; i < Samples; i++) { \
CN_TEST_INIT(); \
struct cn_gen_##Name##_record *res = cn_gen_##Name(); \
Init(res); \
if (cn_gen_backtrack_type() != CN_GEN_BACKTRACK_NONE) { \
return CN_TEST_GEN_FAIL; \
} \
Init(res); \
Name(__VA_ARGS__); \
cn_gen_rand_replace(checkpoint); \
} \
Expand Down

0 comments on commit 2b0cfb2

Please sign in to comment.