Property

timeout

Test timeout duration (in milliseconds).

Since v1.0
struct TestOptions {
    int timeout;
}

Discussion 🔗

Each iteration of a test case will be aborted if it exceeds the specified timeout. If this option is zero, then there is no timeout.

The following code example sets the timeout to 3000 milliseconds (or 3 seconds).

TEST(yourSuite, yourTest, .timeout=3000) {
    // ...
}

This option implicitly enables the sandbox.