Releases: hamcrest/OCHamcrest
Releases · hamcrest/OCHamcrest
v5.0.0
Version 5.0.0
02 Nov 2015
For detailed discussion on v5.0.0, see http://qualitycoding.org/ochamcrest-v5-0-0/
Features:
- Instead of enabling short syntax by defining HC_SHORTHAND, short syntax is now enabled by default.
To disable it, #define HC_DISABLE_SHORT_SYNTAX. - Matchers which take nil-terminated lists have "In" variants which take a single NSArray, like
allOfIn. The matcherhasEntriesInis an exception and takes an NSDictionary. - Improved documentation on all matchers. Documentation is now shown for matchers with fixed numbers
of arguments. All matchers provide argument hinting.
Renamed:
- Renamed long syntax for
containsInRelativeOrderfrom prefix hc_ to HC_ to conform to other
matchers.
Deleted:
equalToBoolmatcher (deprecated in v4.1.0)containsStringmatcher (deprecated in v4.2.0)assertThatAfter/futureValueOf(deprecated in v4.2.0)HC_testFailureHandlerChain()(deprecated in v4.2.0)
v4.3.2
v4.3.1
v4.3.0
Version 4.3.0
11 Oct 2015
Features:
- New matcher
containsInRelativeOrdermatches collections containing items in relative order. - New matcher HCArgumentCaptor matches anything, capturing matched values.
Project changes:
- Updated project settings to Xcode 7, with tests now run by XCTest.
v4.2.0
Version 4.2.0
11 Sep 2015
Fixes:
- Fixed "Incompatible pointer types sending 'Class' to parameter of type 'NSString *'" warning on
instanceOf.
Features:
- Improved readability of asynchronous tests:
assertWithTimeout(1, thatEventually(var), is(@10)); - Added ability to add custom test failure reporter. See HCTestFailureReporterChain.
Deprecated:
- Deprecated
containsString; usecontainsSubstringinstead.containsStringclashes with an
NSString method introduced in iOS 8. - Deprecated
assertThatAfter/futureValueOf. UseassertWithTimeout/thatEventuallyinstead. - Deprecated
HC_testFailureHandlerChain(); use[HCTestFailureReporterChain reporterChain]instead.
v4.1.1
Version 4.1.1
31 Dec 2014
- Oops! Add the new features to OCHamcrest.h
Version 4.1.0
30 Dec 2014
Fixes:
- Fix crash when OCHamcrest tries to describe an OCMockito mock object. Thanks to: Michael Seghers
- Fix crash when
equalToBoolattempts to match a non-number.
Features:
assertThatAftertests asynchronous code, retrying the assertion until a given timeout.
Wrap the code you want to evaluate infutureValueOf. Thanks to: Sergio Padrino- New matcher
everyItemmatches collections if every item satisfies a given matcher. - New matcher
throwsExceptionmatches a block if it throws an exception satisfying a given
matcher. - New matchers
isTrueandisFalsematch non-zero and zero NSNumbers. Intended to replace
equalToBool.
Improvements:
- Added new base class HCDiagnosingMatcher to simplify complex matchers.
equalToBoolmatcher can no longer be created with a value other than YES or NO. This especially
avoids the accidental @yES.- Improved ordered comparison matchers (
greaterThan, etc.) so that when the given object can't be
compared, the matchers return NO instead of throwing an exception. - Improved mismatch descriptions for
hasItem. - Improved mismatch descriptions for
hasPropertyto show actual property value or "no property". - Improved mismatch descriptions for
onlyContains, especially in reporting all elements that don't
match. - Updated project to make it run-path dependent. Thanks to: csano
Deprecated:
equalToBooldeprecated in favor ofisTrueandisFalse.equalToBool(YES)had too much
potential for symantic error since any non-zero number evaluates to true.
v.4.0.1
v4.0.0
Version 4.0.0
10 May 2014
This is a refactoring release with potential backwards compatibility issues for writers of custom
matchers:
- Almost all ivars have been converted to hidden properties. Let me know if this trips you up.
- If you subclass HCInvocationMatcher for a custom matcher, the ivars have been renamed.
- If you import HCCollectMatchers.h for a custom matcher, change this to import HCCollect.h.
- HCTestFailureHandler has changed from a protocol to a class.
Also, if you're not using CocoaPods, specify -ObjC in your "Other Linker Flags".
v3.0.1
Version 3.0.1
29 Oct 2013
Fixes:
- Fixed problem where isNot did not ask the sub-matcher's mismatch description. Thanks to: James
Richard and Jonathan Barnes - Fixed crash in
describedAsmatcher . Thanks to: Nikolaj Schumacher - Fixed crash in
hasPropertymatcher when the property is a primitive type. Thanks to: Nikolaj
Schumacher
Improvements:
- Changed matcher factory methods to return plain
idso that matchers can be used without casting
to(id)for OCMockito arguments. - Added support for 64-bit iOS devices.
Examples & Documentation:
- Updated examples so they are based on Apple's templates for main target vs. test target. Added
CocoaPods examples. - Eliminated DocSet. Documentation will be in the main README and in the OCHamcrest wiki,
https://github.com/hamcrest/OCHamcrest/wiki/_pages
v3.0.0
Version 3.0.0
06 Sep 2013
Features:
- Added support for XCTest. Special thanks to Jiajun "gaosboy" for pointing the way, and to Richard
Clem for testing. - Made unit test integration more flexible with HC_testFailureHandlerChain. It can be called from
outside OCHamcrest to signal a test failure within the current testing framework. (At present it
tries XCTest, then SenTestCase, then falls back on raising a generic exception.)
Deleted:
- HCRequireNonNilString.h (deprecated in v1.2)
emptymatcher (deprecated in v2.1.0)