File tree Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ OCMock 3.3 (unreleased)
5
5
6
6
* Made the use of mock objects thread safe. You still have to setup the mocks
7
7
and verify them from a main thread (Ian Anderson)
8
+ * Added modern syntax for reject (Piotr Tobolski)
8
9
9
10
10
11
OCMock 3.2.2 (2016-01-20)
@@ -19,7 +20,6 @@ OCMock 3.2.1 (2016-01-13)
19
20
* Disposing dynamically generated subclasses after use (David Stites)
20
21
* Build script now signs frameworks in releases. The signing identity can
21
22
be changed in the script.
22
- * Added modern syntax for reject (Piotr Tobolski)
23
23
24
24
25
25
OCMock 3.2 (2015-10-03)
Original file line number Diff line number Diff line change @@ -64,7 +64,9 @@ + (void)beginRejectMacro
64
64
{
65
65
OCMExpectationRecorder *recorder = [[[OCMExpectationRecorder alloc ] init ] autorelease ];
66
66
[recorder never ];
67
- globalState = [[[OCMMacroState alloc ] initWithRecorder: recorder] autorelease ];
67
+ OCMMacroState *macroState = [[OCMMacroState alloc ] initWithRecorder: recorder];
68
+ [NSThread currentThread ].threadDictionary [OCMGlobalStateKey] = macroState;
69
+ [macroState release ];
68
70
}
69
71
70
72
+ (OCMStubRecorder *)endRejectMacro
Original file line number Diff line number Diff line change 70
70
({ \
71
71
_OCMSilenceWarnings ( \
72
72
[OCMMacroState beginRejectMacro ]; \
73
- invocation; \
74
- [OCMMacroState endRejectMacro ]; \
73
+ OCMStubRecorder *recorder = nil ; \
74
+ @try { \
75
+ invocation; \
76
+ }@finally { \
77
+ recorder = [OCMMacroState endRejectMacro ]; \
78
+ } \
79
+ recorder; \
75
80
); \
76
81
})
77
82
You can’t perform that action at this time.
0 commit comments