Property

exit_status

The expected termination status code.

Since v1.0
struct TestOptions {
    StatusCode exit_status;
}

Discussion 🔗

When this option is set, the test case becomes a death test. Death tests are tests that expect the test case to terminate. The value of this option is the expected exit status code.

If the test does not terminate the application with exit status CODE, the test fails. This option is mutually exclusive with the signal option.

TEST(yourSuite, yourTest, .exit_status=7) {
    // ...
}

This option implicitly enables the sandbox.