OCHamcrest
Modules | Classes | Defines | Functions
Unit Test Integration

Modules

 Unit Tests of Primitive Numbers
 
Unit test integration for primitive numbers.

Classes

class  HCTestFailure
 Test failure location and reason. More...
protocol  <HCTestFailureHandler>
 Chain-of-responsibility for handling test failures. More...

Defines

#define assertThat   HC_assertThat
 assertThat(actual, matcher) - Asserts that actual value satisfies matcher.

Functions

id< HCTestFailureHandlerHC_testFailureHandlerChain (void)
 Returns chain of test failure handlers.

Define Documentation

#define assertThat   HC_assertThat

assertThat(actual, matcher) - Asserts that actual value satisfies matcher.

Parameters:
actualThe object to evaluate as the actual value.
matcherThe matcher to satisfy as the expected condition.

assertThat passes the actual value to the matcher for evaluation. If the matcher is not satisfied, an exception is thrown describing the mismatch.

assertThat is designed to integrate well with OCUnit and other unit testing frameworks. Unmet assertions are reported as test failures. In Xcode, these failures can be clicked to reveal the line of the assertion.

In the event of a name clash, don't #define HC_SHORTHAND and use the synonym HC_assertThat instead.


Function Documentation

Returns chain of test failure handlers.