Skip to content

Commit 9e1f116

Browse files
add a test to skip in samples
1 parent 950a8bb commit 9e1f116

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

code/tests/cases/test_sample.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,18 @@ FOSSIL_TEST_CASE(test_input_half) {
7070
FOSSIL_TEST_ASSUME(actual_output == data.expected_output, "Half test failed");
7171
}
7272

73+
FOSSIL_TEST_CASE(test_should_not_run) {
74+
FOSSIL_TEST_ASSUME(1 == 0, "This test should not run");
75+
}
76+
7377
FOSSIL_TEST_GROUP(c_sample_test_cases) {
7478
FOSSIL_TEST_ADD(sample_suite, test_input_increment);
7579
FOSSIL_TEST_ADD(sample_suite, test_input_decrement);
7680
FOSSIL_TEST_ADD(sample_suite, test_input_double);
7781
FOSSIL_TEST_ADD(sample_suite, test_input_half);
7882

83+
FOSSIL_TEST_SKIP(test_should_not_run, "This test should not run");
84+
FOSSIL_TEST_ADD(sample_suite, test_should_not_run);
85+
7986
FOSSIL_TEST_REGISTER(sample_suite);
8087
}

code/tests/cases/test_sample.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,18 @@ FOSSIL_TEST_CASE(cpp_test_input_half) {
7070
FOSSIL_TEST_ASSUME(actual_output == data.expected_output, "Half test failed");
7171
}
7272

73+
FOSSIL_TEST_CASE(cpp_test_should_not_run) {
74+
FOSSIL_TEST_ASSUME(1 == 0, "This test should not run");
75+
}
76+
7377
FOSSIL_TEST_GROUP(cpp_sample_test_cases) {
7478
FOSSIL_TEST_ADD(cpp_sample_suite, cpp_test_input_increment);
7579
FOSSIL_TEST_ADD(cpp_sample_suite, cpp_test_input_decrement);
7680
FOSSIL_TEST_ADD(cpp_sample_suite, cpp_test_input_double);
7781
FOSSIL_TEST_ADD(cpp_sample_suite, cpp_test_input_half);
7882

83+
FOSSIL_TEST_SKIP(cpp_test_should_not_run, "This test should not run");
84+
FOSSIL_TEST_ADD(cpp_sample_suite, cpp_test_should_not_run);
85+
7986
FOSSIL_TEST_REGISTER(cpp_sample_suite);
8087
}

0 commit comments

Comments
 (0)