xtest/examples/groups.c

101 lines
1.5 KiB
C

#include <stddef.h>
#include "../xtest.h"
void test_1() {}
void test_2() {}
void test_3() {}
void test_4() {}
void test_5() {}
void test_6() {}
void test_7() {}
void test_8() {}
void test_9() {}
void groups_manual() {
xtest_group(A);
xtest_group(foo);
xtest_run(test_1);
xtest_group(bar);
xtest_run(test_2);
xtest_run(test_3);
xtest_end_group();
xtest_end_group();
xtest_run(test_4);
xtest_end_group();
xtest_group(B);
xtest_run(test_5);
xtest_run(test_6);
xtest_end_group();
xtest_group(C);
xtest_group(X);
xtest_group(Y);
xtest_group(Z);
xtest_run(test_7);
xtest_end_group();
xtest_end_group();
xtest_end_group();
xtest_end_group();
xtest_group(D);
xtest_run(test_8);
xtest_run(test_9);
xtest_end_group();
}
void bar() {
xtest_run(test_2);
xtest_run(test_3);
}
void foo() {
xtest_run(test_1);
xtest_run_group(bar);
}
void A() {
xtest_run_group(foo);
xtest_run(test_4);
}
void B() {
xtest_run(test_5);
xtest_run(test_6);
}
void Z() {
xtest_run(test_7);
}
void Y() {
xtest_run_group(Z);
}
void X() {
xtest_run_group(Y);
}
void C() {
xtest_run_group(X);
}
void D() {
xtest_run(test_8);
xtest_run(test_9);
}
void groups_convenient() {
xtest_run_group(A);
xtest_run_group(B);
xtest_run_group(C);
xtest_run_group(D);
}
void example_groups() {
groups_manual();
groups_convenient();
}
#ifndef XTEST_ALL_EXAMPLES
XTEST_RUN_MAIN(example_groups)
#endif