lawrencelomax / LLReactiveMatchers

Expecta matchers for ReactiveCocoa
MIT License
46 stars 12 forks source link

Optimisations - Fail early in appropriate matchers #8

Closed lawrencelomax closed 10 years ago

lawrencelomax commented 10 years ago

In matchers for next values we can fail early

For example with haveIdenticalValues() for two signals: 1, 2, 3, 4, 5 1, 2, 5, 4, 5

we can fail when the events are known to be non-identical, i.e at index 2 of the values

lawrencelomax commented 10 years ago

Matchers should be stricter by default. Unit Tests should make assertions about the exact values a Signal will contain, as non-determinism is not a desirable trait of tests. This may be relevant to async matchers, but synchronous matching is based on the actual Signal having completed before the matcher even returns success or failure.

Closing as I can't see this being that important right now.