When
When wrap a set of tests against the functionality when a specific condition needs to be tested.
when(char* condition)
The when construct takes in the condition descriptor char* condition and groups a set of tests in its output.
Output
describe My Test Suite:
context .add_two_ints
when the sum does not overflow
it returns the sum of two numbers
...
Example
#include "awry/awry.h"
describe("when construct", test_when_construct)
when("a when construct is called")
it("is defined")
expect(WHEN_TYPE) to equal(0x06)
end
end
end
int main(void) {
Awry.run();
Awry.clear(&Awry);
return 0;
}
- Previous
- Next