Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature/update ocmock #10

Closed
wants to merge 344 commits into from
Closed

Conversation

byohay
Copy link

@byohay byohay commented Jun 20, 2021

  • First stab at implementing quantifiers.
  • Added macro version.
  • Trying yet another syntax variant.
  • Retain class type arguments of NSInvocation
  • Prevent initialization in production code from resetting mock state.
  • When a second mock is created for the same class, dispose of the dynamically created subclass for the first mock.
  • Added credits.
  • Switched to currently newest Xcode.
  • Check instantiation via stubs variable.
  • Fix for Crash on Xcode 9 when mocking a NSManagedObject erikdoe/ocmock#339.
  • Simplified test, adapted code style.
  • Added description of recent changes.
  • Added description for last merge.
  • Preparation for 3.4.2 release.
  • Fix for regression introduced by When a second mock is created for the same class, dispose of the dynamically created subclass for the first mock. erikdoe/ocmock#352, as reported in Bug: realObject release when partial mocking of the same class. erikdoe/ocmock#357.
  • Partial fix for Class Mocks Not Thread-Safe erikdoe/ocmock#328.
  • Added description/credit for recent changes.
  • update CI to Xcode 10.1
  • Fix for the Guard Malloc issue reported in Issues Identified by TSan and UBSan erikdoe/ocmock#362.
  • Fix for the UBSan issue reported in Issues Identified by TSan and UBSan erikdoe/ocmock#362.
  • Preparation for 3.4.3 release.
  • Updated year in copyright notice.
  • Preparation for 3.4.3 release.
  • Fixed deployment target.
  • Added ignoringNonObjectArgs invocation action macro
  • Added a property type override for OCMStubRecorder
  • Update project settings to latest xcode and fix warnings
  • stopMocking doesn't call because of retain cycle while stubbing stopMocking doesn't call because of retain cycle while stubbing erikdoe/ocmock#356
  • Added behaviour to raise an exception when user try to send a real object to OCMock macros.
  • Add valid archs for simulator to OCMocklib to silent xcodebuild warnings
  • Add watchOS
  • update to latest Xcode and Xcode image
  • update to Xcode 11
  • update test device for Xcode 11
  • Silence strict selector matching warning
  • OCMockObject invocations retain arguments
  • update Xcode 11 iOS simulator target
  • update to Xcode 11.2
  • Fix for New clang warns Wincompatible-pointer-types in OCMConstraint.m erikdoe/ocmock#369.
  • Remove redundant plist and add watchOS to code signing
  • Updated SDKs to match Xcode 11.2.
  • Updated changes.
  • Fixed watchOS product name and added sanity checks.
  • Updated signing identities.
  • Did some minor cleanups.
  • Updated change log.
  • Added checks to ensure mock is not used after stopMocking.
  • Moved internal tests to a separate file.
  • Added real checks for correct architectures.
  • Made tests a little more stringent.
  • Updated change log.
  • Cleaned up test and refactored code.
  • Updated change log.
  • Cleaned up test.
  • Refactored code and slightly improved some old hacks.
  • Updated change log after last PR merge.
  • Made recommended updates to settings, and updated OCHamcrest.
  • Updated copyright in banners to 2019.
  • Preparation for 3.5 release.
  • Added release date.
  • Fixed release date.
  • Fix typo in Changes.txt
  • Switched to Carthage to manage dependencies.
  • Show description when throwing exceptions because of no invocations
  • Update Source/OCMock/OCMockObject.m
  • Updated tests
  • Revert a wrong change
  • Remove #define HC_SHORTHAND
  • Fixed second test and refactored assertions of exception reason.
  • Added change to change log.
  • Cleaned up build settings.
  • Cleaned up plist files.
  • Added plain macros, removed those with arguments.
  • Swtiched to variadic macro with factory for quantifiers.
  • Switched from one macro plus factory to simple macros.
  • Added quantifier that matches an exact count.
  • Made some refactorings and prevented at least / at most with zero count.
  • Simplified the macro names slightly.
  • Added optional (on by default) short-hand syntax for quantifiers.
  • Added macro to disable almost all short syntax. Updated change log.
  • Cleaned up some details for release.
  • Updated copyright date in banners.
  • Preparation for 3.6 release.
  • Changed name of product dir to macOS.
  • Added missing header to podspec.
  • Fix for Binary size for tvOS in 3.6 dmg file is zero byte erikdoe/ocmock#385.
  • Fix up printf specifiers
  • Fix up duplicate header copy
  • Cast mock arguments in OCMVerify* macros
  • Catches references to self when not using macros.
  • Small refactoring and some formatting changes.
  • Allow expectation to complete in test
  • Clean up descriptions.
  • Remove unneeded dealloc from OCPartialMockObject
  • silence Xcode 11.4 warnings w.r.t. upgrade
  • Better exception when attempting to mock NSObject method with macro.
  • Fixes OCMockObjects when init* methods are stubbed under ARC.
  • Made corresponding change for verify, plus some small refactorings.
  • Moved family classifiers to category and added unit tests.
  • Made some refactorings, cleaned up now unused imports.
  • Refactored init method return value logic.
  • Refactored the tests. No functional changes.
  • Stop retaining class objects in invocations
  • Add exception for mocking class methods after stopMocking called.
  • Pass exceptions through macros
  • Blacklists resolveClassMethod: from having a forwarder set up for it.
  • Made some small refactorings.
  • Better error message for OCMVerify of some methods on partial mocks.
  • Add support for noescape blocks.
  • Made some refactorings and added test for "opposite" case.
  • Only adding hint when stubbing might help.
  • Reverted removal of import.
  • Made some refactorings.
  • Made some refactorings.
  • Made some refactorings.
  • Added credits for recently merged changes.
  • Update CI to Xcode 11.5
  • update Makefile for simulator changes
  • Handle using nil as argument for andReturn in ObjC++ code.
  • Use forward declaration in OCMVerifier.h
  • Replace retain attributes with other memory management attributes
  • Replace asserts with exceptions.
  • Fix warning with -Wmisleading-indentation.
  • Made some tiny refactorings.
  • Disable invocation and arg actions for rejects.
  • fix build time warning for duplicate file in Copy Headers phase
  • Bumped SDK versions.
  • Made some refactorings and removed case with incorrect sequence.
  • Throw an exception when the (meta)class for a mock has been changed underneath it.
  • Renamed method to avoid clashes.
  • Fixed file type.
  • Made some refactorings.
  • Made some small refactorings.
  • Fixed test.
  • Disabling an erroneous compiler warning.
  • Preparation for 3.7 release.
  • Removed setting of obsolete diskimage flag.
  • Fixed architecture check.
  • Cleaned up some small issues.
  • Fix for OCMVerify times gets wrong count when using OCMPartialMock erikdoe/ocmock#444.
  • Removed superfluous assertions.
  • Preparation for 3.7.1 release.
  • Add support for debugging/logging
  • Add support for [OCM anyPointer] to invocation descriptions
  • Retain returnValues
  • Simplified comment.
  • Made some small refactorings.
  • Fix up create family method retain counts in cases other than just andReturn
  • Add support for classes blocking mocking.
  • Remove unused code in retainObjectArgumentsExcludingObject
  • Add warning message regarding KVO notifications not being sent
  • Retain objects passed as block arguments.
  • Tidied up imports in framework.
  • Changed import style in main header.
  • Removed unneeded plist localisation files.
  • Tidied up imports in tests.
  • Added new public header to podspec.
  • CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES_ERROR
  • Turn off unwanted clang-tidy warnings
  • Deprecate OCMObserverMockObjects
  • Fix a stack overflow within -[OCMBoxedReturnValueProvider handleInvocation:]
  • Updated to XCode 12 and corresponding SDKs.
  • Also updated XCode version for CI system.
  • Building frameworks for simulators. Should work on ARM Macs, too.
  • Switched away from deprecated API for atomic int operations.
  • Block direct instantiation of OCMockObject
  • Made some small refactorings. Simplified explanation.
  • Updated change log.
  • Made error messages slightly more consistent.
  • Fixed the logic for retaining/releasing the targets.
  • Add support for .andFulfill(expectation)
  • Removed testing with 32-bit SDK.
  • Minor formatting changes and small type fixes.
  • Updated change log.
  • Moved off deprecated API for reporting test failures.
  • Completely removed return value handling.
  • Changed name of debugger macro to andBreak.
  • Made some refactorings. See Add support for classes blocking mocking. erikdoe/ocmock#439 for details.
  • Updated change log.
  • Made some minor changes and updated change log.
  • Clarified tests and comments regarding special KVO class handling.
  • Added function to test for dynamically created subclass.
  • Refactored dist build to use make.
  • Silenced a warning.
  • Preparation for 3.8 release.
  • Improved architectures and signatures in build.
  • Restored compatibility with Xcode 11 (OCMock 3.8 does not compile in Xcode 11 erikdoe/ocmock#472).
  • Changed return type to avoid warnings.
  • Added workaround to allow building with Carthage.
  • Added XCTest dependency to podspec (OCMock 3.8 does not compile via CocoaPods erikdoe/ocmock#471).
  • Preparation for 3.8.1 release
  • Added Carthage built to makefile.
  • Fixed social URL.
  • Extended simulator launch timeout even more.
  • Move to using _objc_msgForward directly instead of obtaining through special selector name
  • Cleaned up most white space issues and many formatting inconsistencies.
  • Fix up minor typo
  • Updated copyright date in banners.
  • Enforce that you cannot partial mock a proxy. Test that you can class mock a proxy.
  • byref sometimes just returns 'R' as encoding.
  • Xcode recommends "Don't Code SIgn" for CODE_SIGN_IDENTITY
  • fix for Incorrect object reference counting erikdoe/ocmock#456: clang-analyzer false positives
  • Allow mocks to be created inside OCM Macro calls
  • Fix up usage of NSGetSizeAndAlignment
  • Remove unnecessary shadow varaible mock from testBlockConstraintRetainedByStub
  • Check expected file path as a suffix in OCMockObjectMacroTests
  • Updated to slightly newer version of Hamcrest.
  • Cleaned up whitespace.
  • Removed signing check because we're not signing any more.
  • Ran check and ignored recommended changes to deployment targets.
  • Added unit test for an otherwise uncovered branch.
  • Add a macro to disable XCTest support optionally
  • Cleaned up some changes and comments.
  • Reduced and simplified the test.
  • SPM with custom module map
  • Remove header links
  • Public headers instead of umbrella and excludes
  • Xcode 12 is now GHA default
  • Rebase, update Package.swift, and migrate CI to travis
  • Made some small refactorings.
  • Made some refactorings. Removed unrelated test.
  • Use OCMAtLeast() instead of atLeast() in OCMQuantifierTests
  • Added SwiftPM build to CI target. Added ignore for new build dir.
  • Updated to reflect recent changes.
  • Renamed XCTest preprocessor define. Using it for the watchOS build.
  • Fixed memory management.

erikdoe and others added 30 commits January 3, 2020 20:09
# Conflicts:
#	Source/OCMock.xcodeproj/project.pbxproj
#	Source/OCMock/OCMockObject.m
Fix up printf specifiers for NSUInteger types.
Remove duplicate header from copy headers phase.
In cases where people are doing things like

NSBundle *foo = OCClassMock([NSBundle class])

or

id<MyProtocol> bar = OCClassMock([MyClass class])

calling OCMVerifyAll or OCMVerifyAllWithDelay requires a cast to (OCMockObject *) so that the verify methods can be found. This makes it so callers don't have to constantly do OCMVerifyAll((id)bar) or something similar.
Previous code would only catch references to self when using the OCMStub/OCMExpect macros.
Now we avoid self referential retain loops if you use the `[[[foo stub] andReturn:foo] sharedInstance]` API.
Cast mock arguments in OCMVerify* macros
erikdoe and others added 28 commits May 5, 2021 20:49
…dmaclach-lazy_mocks

# Conflicts:
#	Source/OCMock/OCMockObject.m
This is somewhat pointless because (at least now) the recorder's `init` method will always throw an exception. It avoids an analyser warning, though. See erikdoe#456 for details.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants