Skip to content

Releases: hamcrest/OCHamcrest

v5.0.0

03 Nov 06:20

Choose a tag to compare

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 matcher hasEntriesIn is 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 containsInRelativeOrder from prefix hc_ to HC_ to conform to other
    matchers.

Deleted:

  • equalToBool matcher (deprecated in v4.1.0)
  • containsString matcher (deprecated in v4.2.0)
  • assertThatAfter/futureValueOf (deprecated in v4.2.0)
  • HC_testFailureHandlerChain() (deprecated in v4.2.0)

v4.3.2

31 Oct 18:30

Choose a tag to compare

Version 4.3.2

31 Oct 2015

Project changes:

  • Enabling "Symbols hidden by default" in 4.3.1 was overkill, preventing people from using the
    prebuilt Mac framework.

v4.3.1

24 Oct 21:40

Choose a tag to compare

Version 4.3.1

24 Oct 2015

Project changes:

  • Remove debug symbols from Release configuration, which bloated the libraries and kept folks from
    using the prebuilt iOS framework.

v4.3.0

11 Oct 16:49

Choose a tag to compare

Version 4.3.0

11 Oct 2015

Features:

  • New matcher containsInRelativeOrder matches 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

12 Sep 04:53

Choose a tag to compare

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; use containsSubstring instead. containsString clashes with an
    NSString method introduced in iOS 8.
  • Deprecated assertThatAfter/futureValueOf. Use assertWithTimeout/thatEventually instead.
  • Deprecated HC_testFailureHandlerChain(); use [HCTestFailureReporterChain reporterChain] instead.

v4.1.1

31 Dec 16:54

Choose a tag to compare

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 equalToBool attempts to match a non-number.

Features:

  • assertThatAfter tests asynchronous code, retrying the assertion until a given timeout.
    Wrap the code you want to evaluate in futureValueOf. Thanks to: Sergio Padrino
  • New matcher everyItem matches collections if every item satisfies a given matcher.
  • New matcher throwsException matches a block if it throws an exception satisfying a given
    matcher.
  • New matchers isTrue and isFalse match non-zero and zero NSNumbers. Intended to replace
    equalToBool.

Improvements:

  • Added new base class HCDiagnosingMatcher to simplify complex matchers.
  • equalToBool matcher 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 hasProperty to 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:

  • equalToBool deprecated in favor of isTrue and isFalse. equalToBool(YES) had too much
    potential for symantic error since any non-zero number evaluates to true.

v.4.0.1

05 Jun 06:09

Choose a tag to compare

Version 4.0.1

04 Jun 2014

Project changes:

  • Increased deployment targets to OS X 10.8, iOS 6.0.

v4.0.0

11 May 00:00

Choose a tag to compare

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

30 Oct 16:09

Choose a tag to compare

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 describedAs matcher . Thanks to: Nikolaj Schumacher
  • Fixed crash in hasProperty matcher when the property is a primitive type. Thanks to: Nikolaj
    Schumacher

Improvements:

  • Changed matcher factory methods to return plain id so 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

30 Oct 03:57

Choose a tag to compare

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)
  • empty matcher (deprecated in v2.1.0)