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
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
344 commits
Select commit Hold shift + click to select a range
1169f13
Added change to change log.
erikdoe Jan 3, 2020
7a99de8
Cleaned up build settings.
erikdoe Jan 3, 2020
be8a707
Cleaned up plist files.
erikdoe Jan 3, 2020
ca349a0
Merge branch 'master' into quantifiers
erikdoe Jan 20, 2020
4fd721f
Added plain macros, removed those with arguments.
erikdoe Jan 20, 2020
d2c7a64
Swtiched to variadic macro with factory for quantifiers.
erikdoe Jan 20, 2020
6b4830d
Switched from one macro plus factory to simple macros.
erikdoe Jan 21, 2020
57d73ee
Added quantifier that matches an exact count.
erikdoe Jan 21, 2020
2811e29
Made some refactorings and prevented at least / at most with zero count.
erikdoe Jan 21, 2020
0b39b20
Simplified the macro names slightly.
erikdoe Jan 21, 2020
f0f3bea
Added optional (on by default) short-hand syntax for quantifiers.
erikdoe Jan 21, 2020
2c41541
Merge branch 'quantifiers'
erikdoe Jan 28, 2020
184064f
Added macro to disable almost all short syntax. Updated change log.
erikdoe Jan 28, 2020
733b510
Cleaned up some details for release.
erikdoe Feb 15, 2020
7fe4125
Updated copyright date in banners.
erikdoe Feb 16, 2020
d7043cc
Preparation for 3.6 release.
erikdoe Feb 16, 2020
2577d0f
Changed name of product dir to macOS.
erikdoe Feb 16, 2020
a8e58d4
Added missing header to podspec.
erikdoe Feb 17, 2020
042fd19
Fix for #385.
erikdoe Mar 4, 2020
185380f
Fix up printf specifiers
dmaclach Mar 10, 2020
5e538d8
Fix up duplicate header copy
dmaclach Mar 10, 2020
8e06c45
Cast mock arguments in OCMVerify* macros
dmaclach Mar 11, 2020
dfd39d1
Catches references to self when not using macros.
dmaclach Mar 24, 2020
4382073
Merge pull request #388 from dmaclach/printf
erikdoe Mar 26, 2020
bbfae7e
Merge pull request #387 from dmaclach/dupe_header
erikdoe Mar 26, 2020
68724d5
Merge pull request #389 from dmaclach/patch-2
erikdoe Mar 26, 2020
195ac33
Merge branch 'returnValue' of git://github.com/dmaclach/ocmock into d…
erikdoe Mar 26, 2020
f44efe3
Small refactoring and some formatting changes.
erikdoe Mar 26, 2020
54d333c
Merge branch 'dmaclach-returnValue'
erikdoe Mar 26, 2020
b59061f
Merge branch 'master' of github.com:erikdoe/ocmock
erikdoe Mar 26, 2020
ab74641
Allow expectation to complete in test
dmaclach Mar 30, 2020
588fca9
Clean up descriptions.
dmaclach Mar 24, 2020
e67e084
Remove unneeded dealloc from OCPartialMockObject
dmaclach Apr 1, 2020
7058176
Merge pull request #393 from dmaclach/description
erikdoe Apr 4, 2020
5bdc6db
Merge pull request #397 from dmaclach/OCPartial
erikdoe Apr 4, 2020
7aa2a13
Merge pull request #395 from dmaclach/FixTest
erikdoe Apr 4, 2020
4414ae3
silence Xcode 11.4 warnings w.r.t. upgrade
Apr 14, 2020
29b8871
Merge pull request #401 from twitterkb/Xcode11.4-update
erikdoe Apr 15, 2020
db0a0b2
Better exception when attempting to mock NSObject method with macro.
dmaclach Apr 13, 2020
f8b20b1
Fixes OCMockObjects when init* methods are stubbed under ARC.
dmaclach Mar 24, 2020
3cbefb7
Merge branch 'better_exception' of git://github.com/dmaclach/ocmock i…
erikdoe May 2, 2020
566611c
Made corresponding change for verify, plus some small refactorings.
erikdoe May 2, 2020
4343dc4
Merge branch 'dmaclach-better_exception'
erikdoe May 2, 2020
7cdf7bf
Merge branch 'initLeak' of git://github.com/dmaclach/ocmock into dmac…
erikdoe May 2, 2020
85fee0b
Moved family classifiers to category and added unit tests.
erikdoe May 2, 2020
d72a8ec
Made some refactorings, cleaned up now unused imports.
erikdoe May 2, 2020
1cab63d
Refactored init method return value logic.
erikdoe May 6, 2020
0e5a5c3
Refactored the tests. No functional changes.
erikdoe May 6, 2020
90693d3
Merge branch 'dmaclach-initLeak'
erikdoe May 6, 2020
521fbc7
Stop retaining class objects in invocations
dmaclach Apr 25, 2020
8af327e
Add exception for mocking class methods after stopMocking called.
dmaclach Apr 13, 2020
51bfd04
Pass exceptions through macros
dmaclach Apr 24, 2020
f023d84
Blacklists `resolveClassMethod:` from having a forwarder set up for it.
dmaclach May 8, 2020
2d83520
Merge pull request #416 from dmaclach/resolve
erikdoe May 11, 2020
5b3407d
Made some small refactorings.
erikdoe May 11, 2020
31c0871
Merge branch 'dmaclach-exception_passer'
erikdoe May 11, 2020
10a7545
Merge branch 'master' of github.com:erikdoe/ocmock
erikdoe May 11, 2020
022c038
Better error message for OCMVerify of some methods on partial mocks.
dmaclach Apr 24, 2020
41c0eb9
Merge branch 'master' into volatile_classes
dmaclach May 19, 2020
c3c5ebe
Add support for noescape blocks.
dmaclach May 14, 2020
7557c71
Merge branch 'allow_categories' of git://github.com/dmaclach/ocmock i…
erikdoe May 24, 2020
dc0bd65
Made some refactorings and added test for "opposite" case.
erikdoe May 24, 2020
e01c789
Only adding hint when stubbing might help.
erikdoe May 24, 2020
50e4103
Merge branch 'dmaclach-allow_categories'
erikdoe May 24, 2020
31d3fcd
Reverted removal of import.
erikdoe May 24, 2020
2e4bcb6
Merge branch 'volatile_classes' of git://github.com/dmaclach/ocmock i…
erikdoe May 24, 2020
38c1c62
Made some refactorings.
erikdoe May 24, 2020
eec655e
Merge branch 'dmaclach-volatile_classes'
erikdoe May 24, 2020
9c2fcbb
Merge branch 'noclass_after_stopmocking' of git://github.com/dmaclach…
erikdoe May 24, 2020
a227883
Made some refactorings.
erikdoe May 24, 2020
f7141a3
Merge branch 'dmaclach-noclass_after_stopmocking'
erikdoe May 24, 2020
892373f
Merge branch 'block_fix' of git://github.com/dmaclach/ocmock into dma…
erikdoe May 24, 2020
30e6dc9
Made some refactorings.
erikdoe May 24, 2020
9b0e314
Merge branch 'dmaclach-block_fix'
erikdoe May 24, 2020
5cf74ba
Added credits for recently merged changes.
erikdoe May 24, 2020
182e653
Update CI to Xcode 11.5
madsolar8582 May 26, 2020
14ec041
update Makefile for simulator changes
madsolar8582 May 26, 2020
4fd7245
Handle using nil as argument for andReturn in ObjC++ code.
dmaclach Apr 16, 2020
58bb623
Use forward declaration in OCMVerifier.h
matrush May 28, 2020
73e4525
Replace retain attributes with other memory management attributes
matrush May 28, 2020
c1733ed
Replace asserts with exceptions.
dmaclach May 30, 2020
901b8e8
Fix warning with `-Wmisleading-indentation`.
dmaclach Jun 1, 2020
5d7d2f8
Merge pull request #423 from madsolar8582/patch-1
erikdoe Jun 4, 2020
43bb099
Merge pull request #426 from matrush/fixHeader
erikdoe Jun 4, 2020
7945e29
Merge pull request #427 from matrush/removeRetain
erikdoe Jun 4, 2020
2e8ecb8
Merge branch 'noAsserts' of git://github.com/dmaclach/ocmock into dma…
erikdoe Jun 4, 2020
993508d
Made some tiny refactorings.
erikdoe Jun 4, 2020
5b575fd
Merge branch 'dmaclach-noAsserts'
erikdoe Jun 4, 2020
bd3aa2e
Merge pull request #433 from dmaclach/views
erikdoe Jun 4, 2020
4987584
Disable invocation and arg actions for rejects.
dmaclach Jun 6, 2020
3e471c2
fix build time warning for duplicate file in Copy Headers phase
Jun 11, 2020
0e25afa
Bumped SDK versions.
erikdoe Jun 22, 2020
4b77b18
Merge branch 'master' of git://github.com/twitterkb/ocmock into twitt…
erikdoe Jun 22, 2020
15754a3
Merge branch 'twitterkb-master'
erikdoe Jun 22, 2020
d5b846b
Merge branch 'disallowInvocationActionsOnRejects' of git://github.com…
erikdoe Jun 22, 2020
e9612c1
Made some refactorings and removed case with incorrect sequence.
erikdoe Jun 22, 2020
e9e61d1
Merge branch 'dmaclach-disallowInvocationActionsOnRejects'
erikdoe Jun 22, 2020
be63480
Throw an exception when the (meta)class for a mock has been changed u…
dmaclach Jun 28, 2020
461c694
Renamed method to avoid clashes.
erikdoe Jul 2, 2020
b466d2e
Merge branch 'realNil' of git://github.com/dmaclach/ocmock into dmacl…
erikdoe Jul 13, 2020
34dc3f8
Fixed file type.
erikdoe Jul 14, 2020
7932a18
Made some refactorings.
erikdoe Jul 14, 2020
b8746e5
Merge branch 'dmaclach-realNil'
erikdoe Jul 14, 2020
c9561d7
Merge branch 'KVO' of git://github.com/dmaclach/ocmock into dmaclach-KVO
erikdoe Jul 14, 2020
882d1f2
Made some small refactorings.
erikdoe Jul 14, 2020
cd4995b
Fixed test.
erikdoe Jul 14, 2020
ab7df66
Merge branch 'dmaclach-KVO'
erikdoe Jul 14, 2020
9b234bd
Disabling an erroneous compiler warning.
erikdoe Jul 14, 2020
4fdb626
Preparation for 3.7 release.
erikdoe Jul 15, 2020
a5dc96c
Removed setting of obsolete diskimage flag.
erikdoe Jul 15, 2020
98c7b09
Fixed architecture check.
erikdoe Jul 15, 2020
a439408
Cleaned up some small issues.
erikdoe Jul 16, 2020
781ed9f
Fix for #444.
erikdoe Jul 16, 2020
1272b08
Removed superfluous assertions.
erikdoe Jul 16, 2020
c4ec0e3
Preparation for 3.7.1 release.
erikdoe Jul 26, 2020
fd536ef
Add support for debugging/logging
dmaclach Jul 29, 2020
64b0856
Add support for `[OCM anyPointer]` to invocation descriptions
dmaclach Jul 29, 2020
7b7c8c4
Retain returnValues
dmaclach Aug 3, 2020
e618aa6
Merge branch 'returnValue' of https://github.com/dmaclach/ocmock into…
erikdoe Aug 10, 2020
3c256be
Simplified comment.
erikdoe Aug 10, 2020
0abeea9
Merge branch 'dmaclach-returnValue'
erikdoe Aug 10, 2020
863d7b3
Merge branch 'invocationDescriptions' of https://github.com/dmaclach/…
erikdoe Aug 10, 2020
0bd6508
Made some small refactorings.
erikdoe Aug 10, 2020
ffeeed2
Merge branch 'dmaclach-invocationDescriptions'
erikdoe Aug 10, 2020
2e1949f
Fix up create family method retain counts in cases other than just an…
dmaclach Jul 20, 2020
51fa79d
Add support for classes blocking mocking.
dmaclach Jun 29, 2020
c87f482
Remove unused code in retainObjectArgumentsExcludingObject
dmaclach Jul 26, 2020
7283328
Add warning message regarding KVO notifications not being sent
dmaclach Jul 17, 2020
d422ffc
Retain objects passed as block arguments.
dmaclach Aug 13, 2020
c601880
Tidied up imports in framework.
erikdoe Aug 21, 2020
0b639ac
Changed import style in main header.
erikdoe Aug 21, 2020
b3d7f80
Removed unneeded plist localisation files.
erikdoe Aug 21, 2020
401afb4
Tidied up imports in tests.
erikdoe Aug 21, 2020
3dde0e4
Added new public header to podspec.
erikdoe Aug 21, 2020
843cfd5
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES_ERROR
Aug 24, 2020
5dc8f3b
Turn off unwanted clang-tidy warnings
dmaclach Sep 9, 2020
ddce68b
Deprecate OCMObserverMockObjects
dmaclach Sep 17, 2020
f9048b0
Fix a stack overflow within -[OCMBoxedReturnValueProvider handleInvoc…
bdash Oct 6, 2020
dac3262
Merge branch 'bdash-fix-stack-overflow'
erikdoe Nov 16, 2020
0c08192
Merge branch 'master' of https://github.com/twitterkb/ocmock into twi…
erikdoe Nov 16, 2020
29faa6e
Merge branch 'twitterkb-master'
erikdoe Nov 16, 2020
9440c16
Updated to XCode 12 and corresponding SDKs.
erikdoe Nov 16, 2020
a57169d
Also updated XCode version for CI system.
erikdoe Nov 16, 2020
5c7adaa
Building frameworks for simulators. Should work on ARM Macs, too.
erikdoe Nov 17, 2020
919a27b
Switched away from deprecated API for atomic int operations.
erikdoe Nov 17, 2020
f2cb735
Block direct instantiation of OCMockObject
dmaclach Nov 18, 2020
42f61e0
Merge branch 'objc-exception' of https://github.com/dmaclach/ocmock i…
erikdoe Nov 28, 2020
2232693
Merge branch 'dmaclach-objc-exception'
erikdoe Nov 28, 2020
fd9bf3b
Merge branch 'block_checkers' of https://github.com/dmaclach/ocmock i…
erikdoe Nov 28, 2020
4add404
Made some small refactorings. Simplified explanation.
erikdoe Nov 28, 2020
190a168
Merge branch 'dmaclach-block_checkers'
erikdoe Nov 28, 2020
09e83b9
Updated change log.
erikdoe Nov 28, 2020
d751940
Merge branch 'ocmockobject_check' of https://github.com/dmaclach/ocmo…
erikdoe Nov 28, 2020
003dc25
Made error messages slightly more consistent.
erikdoe Nov 28, 2020
56230a3
Merge branch 'dmaclach-ocmockobject_check'
erikdoe Nov 28, 2020
ee56cf0
Merge branch 'alloc' of https://github.com/dmaclach/ocmock into dmacl…
erikdoe Nov 28, 2020
596d866
Fixed the logic for retaining/releasing the targets.
erikdoe Nov 29, 2020
9ecebde
Merge branch 'dmaclach-alloc'
erikdoe Nov 29, 2020
32fe837
Add support for .andFulfill(expectation)
dmaclach May 21, 2020
5469373
Removed testing with 32-bit SDK.
erikdoe Nov 29, 2020
1774cde
Merge branch 'expectations' of https://github.com/dmaclach/ocmock int…
erikdoe Dec 4, 2020
f02e431
Minor formatting changes and small type fixes.
erikdoe Dec 4, 2020
ddd38ae
Merge branch 'dmaclach-expectations'
erikdoe Dec 4, 2020
65ca893
Updated change log.
erikdoe Dec 4, 2020
ee79b16
Moved off deprecated API for reporting test failures.
erikdoe Dec 4, 2020
7901f64
Merge branch 'kill_code' of https://github.com/dmaclach/ocmock into d…
erikdoe Dec 4, 2020
b7c8b36
Completely removed return value handling.
erikdoe Dec 4, 2020
7c278e7
Merge branch 'dmaclach-kill_code'
erikdoe Dec 4, 2020
1a79785
Merge branch 'debugger' of https://github.com/dmaclach/ocmock into dm…
erikdoe Dec 6, 2020
1dcaf90
Changed name of debugger macro to andBreak.
erikdoe Dec 6, 2020
f85b269
Merge branch 'dmaclach-debugger'
erikdoe Dec 6, 2020
a009cb2
Merge branch 'class_mock_blocker' of https://github.com/dmaclach/ocmo…
erikdoe Dec 6, 2020
97195f0
Made some refactorings. See #439 for details.
erikdoe Dec 6, 2020
062db19
Merge branch 'dmaclach-class_mock_blocker'
erikdoe Dec 6, 2020
f551980
Updated change log.
erikdoe Dec 6, 2020
bedf2fb
Merge branch 'deprecate_notifications' of https://github.com/dmaclach…
erikdoe Dec 6, 2020
fe547f8
Made some minor changes and updated change log.
erikdoe Dec 6, 2020
f250458
Merge branch 'dmaclach-deprecate_notifications'
erikdoe Dec 6, 2020
705aad4
Merge branch 'kvo' of https://github.com/dmaclach/ocmock into dmaclac…
erikdoe Dec 6, 2020
5d82037
Clarified tests and comments regarding special KVO class handling.
erikdoe Dec 6, 2020
1cab6ab
Merge branch 'dmaclach-kvo'
erikdoe Dec 6, 2020
59c2529
Added function to test for dynamically created subclass.
erikdoe Dec 6, 2020
bf30e69
Refactored dist build to use make.
erikdoe Dec 21, 2020
bdf66b9
Silenced a warning.
erikdoe Dec 21, 2020
e165541
Preparation for 3.8 release.
erikdoe Dec 21, 2020
7438b18
Improved architectures and signatures in build.
erikdoe Dec 23, 2020
88a623b
Restored compatibility with Xcode 11 (#472).
erikdoe Dec 30, 2020
ebddff6
Changed return type to avoid warnings.
erikdoe Dec 30, 2020
949b248
Added workaround to allow building with Carthage.
erikdoe Dec 30, 2020
6064959
Added XCTest dependency to podspec (#471).
erikdoe Dec 30, 2020
2bebc53
Preparation for 3.8.1 release
erikdoe Dec 30, 2020
4a49ebb
Added Carthage built to makefile.
erikdoe Dec 30, 2020
0075423
Fixed social URL.
erikdoe Dec 30, 2020
c81c481
Extended simulator launch timeout even more.
erikdoe Dec 30, 2020
a1b2394
Move to using _objc_msgForward directly instead of obtaining through …
dmaclach Dec 31, 2020
57139aa
Cleaned up most white space issues and many formatting inconsistencies.
erikdoe Jan 7, 2021
bb54565
Fix up minor typo
dmaclach Jan 5, 2021
4abd19a
Updated copyright date in banners.
erikdoe Jan 11, 2021
06e8a9a
Merge pull request #477 from dmaclach/ocmarg_spelling
erikdoe Jan 11, 2021
44207bd
Fixed merge conflict.
erikdoe Jan 11, 2021
6358799
Merge branch 'dmaclach-objc_forward'
erikdoe Jan 11, 2021
6e81bf4
Enforce that you cannot partial mock a proxy.
dmaclach Jan 11, 2021
d981dd6
`byref` sometimes just returns 'R' as encoding.
dmaclach Jan 12, 2021
af1dd8f
Xcode recommends "Don't Code SIgn" for CODE_SIGN_IDENTITY
Jan 22, 2021
013976c
fix for #456: clang-analyzer false positives
Jan 22, 2021
39a8d79
Allow mocks to be created inside OCM Macro calls
dmaclach Jul 26, 2020
db68654
Fix up usage of NSGetSizeAndAlignment
dmaclach Feb 18, 2021
0bbb5c3
Remove unnecessary shadow varaible mock from testBlockConstraintRetai…
matrush Apr 27, 2021
43d267e
Check expected file path as a suffix in OCMockObjectMacroTests
matrush Apr 27, 2021
ce3bbec
Merge branch 'matrush-fixShadowVariable'
erikdoe May 3, 2021
2d09817
Updated to slightly newer version of Hamcrest.
erikdoe May 3, 2021
69fa958
Merge branch 'fixObjectMacroTests' of https://github.com/matrush/ocmo…
erikdoe May 3, 2021
66fe00e
Merge branch 'matrush-fixObjectMacroTests'
erikdoe May 3, 2021
121b553
Merge branch 'Xcode-12.3-accept-suggestions' of https://github.com/tw…
erikdoe May 3, 2021
baa4aab
Merge branch 'twitterkb-Xcode-12.3-accept-suggestions'
erikdoe May 3, 2021
6d58ef8
Cleaned up whitespace.
erikdoe May 3, 2021
dbde4bd
Removed signing check because we're not signing any more.
erikdoe May 3, 2021
bb871ab
Ran check and ignored recommended changes to deployment targets.
erikdoe May 3, 2021
5d7a5af
Merge branch 'argsize' of https://github.com/dmaclach/ocmock into dma…
erikdoe May 3, 2021
fac7b7d
Added unit test for an otherwise uncovered branch.
erikdoe May 3, 2021
336314c
Merge branch 'dmaclach-argsize'
erikdoe May 3, 2021
ee43383
Add a macro to disable XCTest support optionally
matrush May 5, 2021
47cbe3f
Merge branch 'Xcode-clang-false-positives-456' of https://github.com/…
erikdoe May 5, 2021
b3c0ff3
Cleaned up some changes and comments.
erikdoe May 5, 2021
447edd4
Merge branch 'twitterkb-Xcode-clang-false-positives-456'
erikdoe May 5, 2021
6c7c884
Merge branch 'encodings' of https://github.com/dmaclach/ocmock into d…
erikdoe May 5, 2021
9575577
Reduced and simplified the test.
erikdoe May 5, 2021
d3cd881
Merge branch 'dmaclach-encodings'
erikdoe May 5, 2021
9d4f82b
SPM with custom module map
paulb777 Aug 22, 2020
91ecbaa
Remove header links
paulb777 Aug 24, 2020
e88aae3
Public headers instead of umbrella and excludes
paulb777 Aug 24, 2020
1224c98
Xcode 12 is now GHA default
paulb777 May 3, 2021
a032756
Merge branch 'lazy_mocks' of https://github.com/dmaclach/ocmock into …
erikdoe May 5, 2021
adc9fce
Rebase, update Package.swift, and migrate CI to travis
paulb777 May 5, 2021
834ffb3
Made some small refactorings.
erikdoe May 5, 2021
1df2be0
Merge branch 'dmaclach-lazy_mocks'
erikdoe May 5, 2021
44272e0
Merge branch 'partial_proxies' of https://github.com/dmaclach/ocmock …
erikdoe May 5, 2021
41c3a33
Made some refactorings. Removed unrelated test.
erikdoe May 5, 2021
0f7b602
Merge branch 'dmaclach-partial_proxies'
erikdoe May 5, 2021
273f4ea
Use OCMAtLeast() instead of atLeast() in OCMQuantifierTests
matrush Apr 27, 2021
17f5525
Merge branch 'fixQuantifierTests' of https://github.com/matrush/ocmoc…
erikdoe May 11, 2021
988cb9f
Merge branch 'matrush-fixQuantifierTests'
erikdoe May 11, 2021
b5d7b27
Merge branch 'spm3' of https://github.com/firebase/ocmock into fireba…
erikdoe May 11, 2021
7261b39
Added SwiftPM build to CI target. Added ignore for new build dir.
erikdoe May 11, 2021
067af10
Merge branch 'firebase-spm3'
erikdoe May 11, 2021
21cce26
Updated to reflect recent changes.
erikdoe May 11, 2021
7c0eddc
Merge branch 'disableXCTestMacro' of https://github.com/matrush/ocmoc…
erikdoe May 11, 2021
826af40
Renamed XCTest preprocessor define. Using it for the watchOS build.
erikdoe May 11, 2021
09a9504
Merge branch 'matrush-disableXCTestMacro'
erikdoe May 11, 2021
b9c7fb9
Fixed memory management.
erikdoe May 11, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
xcuserdata
*.xcworkspace
.idea
.build
build
Carthage
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
language: objective-c
osx_image: xcode7.3
osx_image: xcode12.3
before_install:
- gem install xcpretty -N --quiet
script: make ci
7 changes: 6 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,12 @@ This project adheres to the [Contributor Covenant 1.2](http://contributor-covena

Please remember that OCMock has been around for 10+ years. Some of the coding conventions used in OCMock may contradict modern guidelines. However, in the interest of keeping the codebase consistent, please respect the conventions used. In particular:

* Opening and closing braces always go on a separate line.
* Use four spaces for indentation.
* Opening and closing braces always go on a separate line (except with blocks).
* No spaces between keywords like `if` and `for` and the following bracket.
* No underscores for instance variables.
* OCMock itself (framework and library) does not use ARC; retains and releases must be sent manually. The unit tests, however, do use ARC.

The repository contains a `.clang-format` file in the actual source directory. This should get you mostly there. Please apply the formatting defined in the config file only to code you add or modify. Please do not apply the formatting to entire files as there are still some inconsistencies in parts of the codebase and certain cases are not formatted correctly by clang-format.


4 changes: 2 additions & 2 deletions Examples/iPhoneExample/Classes/iPhoneExampleAppDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
UINavigationController *navigationController;
}

@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet UINavigationController *navigationController;
@property (nonatomic, strong) IBOutlet UIWindow *window;
@property (nonatomic, strong) IBOutlet UINavigationController *navigationController;

@end

93 changes: 68 additions & 25 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,35 +1,78 @@
# This makefile is mainly intended for use on the CI server (Travis). It
# requires xcpretty to be installed.
# This makefile has the following top-level targets:
# - ci used by Travis for continuous integration
# - dist used to build the binary distribution
#
# Note that the dist target uses git checkout to copy the source into the
# product directory. This means you should make sure that you don't have
# uncommited local changes when building a distribution.

# If you are trying to build a release locally consider using the build.rb
# script in the Tools directory instead.
BUILD_DIR = $(CURDIR)/Build
PRODUCT_DIR = $(BUILD_DIR)/Product
XCODECI = xcodebuild -project "$(CURDIR)/Source/OCMock.xcodeproj" -xcconfig "$(CURDIR)/Source/OCMockCI.xcconfig" -destination-timeout 600
XCODEDIST = xcodebuild -project "$(CURDIR)/Source/OCMock.xcodeproj" -xcconfig "$(CURDIR)/Source/OCMockDist.xcconfig"
SHELL = /bin/bash -e -o pipefail

.PHONY: macos ioslib ios tvos watchos sourcecode product dmg swiftpm carthage

clean:
rm -rf "$(CURDIR)/Build"

BUILD_DIR = OBJROOT="$(CURDIR)/build" SYMROOT="$(CURDIR)/build"
SHELL = /bin/bash -e -o pipefail
IOS32 = -scheme OCMockLib -sdk iphonesimulator -destination 'name=iPhone 5' $(BUILD_DIR)
IOS64 = -scheme OCMockLib -sdk iphonesimulator -destination 'name=iPhone 5s' $(BUILD_DIR)
MACOSX = -scheme OCMock -sdk macosx $(BUILD_DIR)
XCODEBUILD = xcodebuild -project "$(CURDIR)/Source/OCMock.xcodeproj"

ci: clean test
ci: ci-macos ci-ios swiftpm

ci-macos:
@echo "Building macOS framework and running tests..."
$(XCODECI) -scheme OCMock -sdk macosx test | xcpretty -c

ci-ios:
@echo "Building iOS library and running tests..."
$(XCODECI) -scheme OCMockLib -destination 'platform=iOS Simulator,OS=latest,name=iPhone 11' test | xcpretty -c


dist: product sourcecode dmg

macos:
@echo "** Building macOS framework..."
$(XCODEDIST) -scheme OCMock install INSTALL_PATH="/macOS" | xcpretty -c

ioslib:
@echo "** Building iOS library..."
$(XCODEDIST) -target OCMockLib -sdk iphonesimulator install INSTALL_PATH="/iOS library" | xcpretty -c

ios:
@echo "** Building iOS framework..."
$(XCODEDIST) -target "OCMock iOS" -sdk iphonesimulator install INSTALL_PATH="/iOS" | xcpretty -c

tvos:
@echo "** Building tvOS framework..."
$(XCODEDIST) -target "OCMock tvOS" -sdk appletvsimulator install INSTALL_PATH="/tvOS" | xcpretty -c

watchos:
@echo "** Building watchOS framework..."
$(XCODEDIST) -target "OCMock watchOS" -sdk watchsimulator install INSTALL_PATH="/watchOS" | xcpretty -c

sourcecode:
@echo "** Checking out source code..."
mkdir -p "$(PRODUCT_DIR)"
git archive master | tar -x -C "$(PRODUCT_DIR)" Source

product: macos ioslib ios tvos watchos
@echo "** Verifying build products..."
Tools/buildcheck.rb $(PRODUCT_DIR)

dmg:
@echo "** Creating disk image..."
Tools/makedmg.rb $(PRODUCT_DIR) $(BUILD_DIR)

clean:
$(XCODEBUILD) clean
rm -rf "$(CURDIR)/build"

test: test-ios test-macosx
swiftpm:
echo "** Testing Swift Package Manager Distribution"
swift build
swift test

test-ios: test-ios32 test-ios64

test-ios32:
@echo "Running 32-bit iOS tests..."
$(XCODEBUILD) $(IOS32) test | xcpretty -c
carthage:
XCODE_XCCONFIG_FILE="$(CURDIR)/Source/Carthage.xcconfig" carthage build --no-skip-current --project-directory "$(CURDIR)/Source"
XCODE_XCCONFIG_FILE="$(CURDIR)/Source/Carthage.xcconfig" carthage archive OCMock

test-ios64:
@echo "Running 64-bit iOS tests..."
$(XCODEBUILD) $(IOS64) test | xcpretty -c

test-macosx:
@echo "Running OS X tests..."
$(XCODEBUILD) $(MACOSX) test | xcpretty -c
55 changes: 30 additions & 25 deletions OCMock.podspec
Original file line number Diff line number Diff line change
@@ -1,34 +1,39 @@
Pod::Spec.new do |s|
s.name = "OCMock"
s.version = "3.4.1"
s.summary = "Mock objects for Objective-C"
s.description = <<-DESC
s.name = "OCMock"
s.version = "3.8.1"

s.summary = "Mock objects for Objective-C"
s.description = <<-DESC
OCMock is an Objective-C implementation of mock objects. It provides
stubs that return pre-determined values for specific method invocations,
dynamic mocks that can be used to verify interaction patterns, and
partial mocks to overwrite selected methods of existing objects.
DESC

s.homepage = "http://ocmock.org"
s.documentation_url = "http://ocmock.org/reference/"
s.license = { :type => "Apache 2.0", :file => "License.txt" }

s.author = { "Erik Doernenburg" => "erik@doernenburg.com" }
s.social_media_url = "http://twitter.com/erikdoe"

s.source = { :git => "https://github.com/erikdoe/ocmock.git", :tag => "v3.4.1" }
s.source_files = "Source/OCMock/*.{h,m}"
s.homepage = "http://ocmock.org"
s.documentation_url = "http://ocmock.org/reference/"
s.license = { :type => "Apache 2.0", :file => "License.txt" }

s.author = { "Erik Doernenburg" => "erik@doernenburg.com" }
s.social_media_url = "https://twitter.com/erikdoe"

s.source = { :git => "https://github.com/erikdoe/ocmock.git", :tag => "v3.8.1" }
s.source_files = "Source/OCMock/*.{h,m}"

s.requires_arc = false
s.osx.deployment_target = '10.10'
s.ios.deployment_target = '9.0'
s.tvos.deployment_target = '9.0'
s.watchos.deployment_target = '4.0'
s.osx.framework = 'XCTest'
s.ios.framework = 'XCTest'
s.tvos.framework = 'XCTest'

s.requires_arc = false
s.ios.deployment_target = '8.0'
s.osx.deployment_target = '10.6'
s.tvos.deployment_target = '9.0'

s.public_header_files = ["OCMock.h", "OCMockObject.h", "OCMArg.h", "OCMConstraint.h",
"OCMLocation.h", "OCMMacroState.h", "OCMRecorder.h",
"OCMStubRecorder.h", "NSNotificationCenter+OCMAdditions.h",
"OCMFunctions.h"]
.map { |file| "Source/OCMock/" + file }

s.public_header_files = ["OCMock.h", "OCMockObject.h", "OCMArg.h", "OCMConstraint.h",
"OCMLocation.h", "OCMMacroState.h", "OCMRecorder.h",
"OCMStubRecorder.h", "NSNotificationCenter+OCMAdditions.h",
"OCMFunctions.h", "OCMVerifier.h", "OCMQuantifier.h",
"OCMockMacros.h"
]
.map { |file| "Source/OCMock/" + file }
end
63 changes: 63 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
// swift-tools-version:5.3
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription

let package = Package(
name: "OCMock",
defaultLocalization: "en",
products: [
.library(
name: "OCMock",
targets: ["OCMock"]
)
],
targets: [
.target(name: "OCMock",
dependencies: [],
path: "Source",
exclude: [
"Carthage/",
"Changes.txt",
"OCMock/OCMock-Info.plist",
"OCMock/OCMock-Prefix.pch",
"OCMockTests/",
"Cartfile",
"Cartfile.resolved",
"OCMockLibTests/OCMockLibTests-Info.plist",
"OCMockLib/OCMockLib-Prefix.pch",
"OCMockLibTests/OCMockLibTests-Prefix.pch",
"Carthage.xcconfig",
"OCMockDist.xcconfig",
"OCMockCI.xcconfig",
],
publicHeadersPath: ".",
cSettings: [
.headerSearchPath("./"),
.unsafeFlags(["-fno-objc-arc"])
],
cxxSettings: nil,
swiftSettings: nil,
linkerSettings: nil
),
.testTarget(
name: "swift-test",
dependencies: [
"OCMock",
],
path: "SwiftPMTests/swift",
cSettings: [
.headerSearchPath("../"),
]
),
.testTarget(
name: "objc-test",
dependencies: [
"OCMock",
],
path: "SwiftPMTests/objc",
cSettings: [
.headerSearchPath("../"),
]
)
]
)
38 changes: 38 additions & 0 deletions Source/.clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
BasedOnStyle: WebKit
#AlignConsecutiveDeclarations: true (only in instance var declarations)
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: true
AllowShortFunctionsOnASingleLine: Empty
BraceWrapping:
AfterCaseLabel: false
AfterControlStatement: Always
AfterEnum: false
AfterFunction: true
AfterObjCDeclaration: true
AfterStruct: false
AfterUnion: false
BeforeWhile: true
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
BreakBeforeBinaryOperators: None
BreakBeforeBraces: Allman
IncludeCategories:
- Regex: '^<[a-z]*'
Priority: -4
- Regex: '^<NS*'
Priority: -3
- Regex: '^<XC*'
Priority: -2
- Regex: '^"NS*'
Priority: -1
- Regex: '.*'
Priority: 4
IndentCaseLabels: true
MaxEmptyLinesToKeep: 2
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: false
PenaltyBreakAssignment: 50
PenaltyBreakBeforeFirstCallParameter: 50
PointerAlignment: Right
SpaceBeforeParens: Never
1 change: 1 addition & 0 deletions Source/Cartfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github "hamcrest/OCHamcrest" ~> 7.0
1 change: 1 addition & 0 deletions Source/Cartfile.resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github "hamcrest/OCHamcrest" "v7.2.0"
20 changes: 20 additions & 0 deletions Source/Carthage.xcconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// Configuration settings file format documentation can be found at:
// https://help.apple.com/xcode/#/dev745c5c974

// This seems to be necessary now that we link against XCTest, which does
// not include bitcode.

ENABLE_BITCODE = NO

// The following is a workaround for an issue with Carthage and Xcode 12.3.
// https://github.com/Carthage/Carthage/issues/3019#issuecomment-665136323
//
// Unlike the description in the Github issue, there is no shell
// script. You have to make sure that Carthage uses this xcconfig file, e.g.
//
// XCODE_XCCONFIG_FILE=Carthage.xcconfig carthage build --no-skip-current
//
// As far as I understand this workaround only works for Intel dev machines.

EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_simulator__NATIVE_ARCH_64_BIT_x86_64__XCODE_1200 = arm64 arm64e armv7 armv7s armv6 armv8
EXCLUDED_ARCHS = $(inherited) $(EXCLUDED_ARCHS__EFFECTIVE_PLATFORM_SUFFIX_$(EFFECTIVE_PLATFORM_SUFFIX)__NATIVE_ARCH_64_BIT_$(NATIVE_ARCH_64_BIT)__XCODE_$(XCODE_VERSION_MAJOR))
Loading