Skip to content

3.2.0 Exception tests crash #267

Closed
Closed
@szweier

Description

@szweier

The new release seems to have broken tests using expectAction.

I've upgraded to Nimble 3.2.0 with Quick 0.9.1 and inserted a test from the example code (though actual exception tests crash as well). This is failing both locally and on our CI server.

See Example Here

Using Cocoapods

Test:

NSException *exception = [NSException exceptionWithName:NSInternalInconsistencyException
                                                 reason:@"Not enough fish in the sea."
                                               userInfo:nil];
expectAction(^{ [exception raise]; }).to(raiseException());

Trace:

: failed: caught "NSInternalInconsistencyException", "Not enough fish in the sea."
(
    0   CoreFoundation                      0x00000001038a9e65 __exceptionPreprocess + 165
    1   libobjc.A.dylib                     0x0000000103322deb objc_exception_throw + 48
    2   CoreFoundation                      0x00000001038a9aa9 -[NSException raise] + 9
    3   components_library_tests            0x0000000112d2858a __34-[PCTopTabViewControllerSpec spec]_block_invoke_246 + 58
    4   Nimble                              0x0000000112d51e6b __NMB_expectAction_block_invoke + 59
    5   Nimble                              0x0000000112d6d1e3 _TTRXFdCb__aGSQCSo8NSObject__XFo__oGSQS___ + 19
    6   Nimble                              0x0000000112daac6e _TFFC6Nimble14NMBExpectationgP33_A381296429BD45C81DCD9AB1BCB94DD511expectValueGVS_11ExpectationCSo8NSObject_U_FT_GSqS2__ + 78
    7   Nimble                              0x0000000112daacb7 _TTRXFo__oGSqCSo8NSObject_zoPSs9ErrorType__XFo__iGSqS__zoPS0___ + 39
    8   Nimble                              0x0000000112daa971 _TPA__TTRXFo__oGSqCSo8NSObject_zoPSs9ErrorType__XFo__iGSqS__zoPS0___ + 81
    9   Nimble                              0x0000000112d99eb1 _TFF6Nimble15memoizedClosureurFFzT_q_FzSbq_U_FzSbQ_ + 705
    10  Nimble                              0x0000000112d9915c _TPA__TFF6Nimble15memoizedClosureurFFzT_q_FzSbq_U_FzSbQ_ + 156
    11  Nimble                              0x0000000112d9991b _TFV6Nimble10Expression8evaluateurfGS0_q__FzT_GSqq__ + 155
    12  Nimble                              0x0000000112daaa3f _TFFV6Nimble18ObjCMatcherWrapper7matchesFS0_FTGVS_10ExpressionCSo8NSObject_14failureMessageCS_14FailureMessage_SbU_FT_GSQS2__ + 191
    13  Nimble                              0x0000000112da7714 _TPA__TFFV6Nimble18ObjCMatcherWrapper7matchesFS0_FTGVS_10ExpressionCSo8NSObject_14failureMessageCS_14FailureMessage_SbU_FT_GSQS2__ + 132
    14  Nimble                              0x0000000112daaad7 _TTRXFo__oGSQCSo8NSObject__XFdCb__aGSQS___ + 39
    15  Nimble                              0x0000000112d6d1e3 _TTRXFdCb__aGSQCSo8NSObject__XFo__oGSQS___ + 19
    16  Nimble                              0x0000000112db7bba _TFFC6Nimble28NMBObjCRaiseExceptionMatcher7matchesFS0_FTFT_GSQCSo8NSObject_14failureMessageCS_14FailureMessage8locationCS_14SourceLocation_SbU_FT_GSqP__ + 74
    17  Nimble                              0x0000000112db5489 _TPA__TFFC6Nimble28NMBObjCRaiseExceptionMatcher7matchesFS0_FTFT_GSQCSo8NSObject_14failureMessageCS_14FailureMessage8locationCS_14SourceLocation_SbU_FT_GSqP__ + 73
    18  Nimble                              0x0000000112d99eb1 _TFF6Nimble15memoizedClosureurFFzT_q_FzSbq_U_FzSbQ_ + 705
    19  Nimble                              0x0000000112d9915c _TPA__TFF6Nimble15memoizedClosureurFFzT_q_FzSbq_U_FzSbQ_ + 156
    20  Nimble                              0x0000000112d9991b _TFV6Nimble10Expression8evaluateurfGS0_q__FzT_GSqq__ + 155
    21  Nimble                              0x0000000112db7727 _TFFF6Nimble14raiseExceptionFT5namedGSqSS_6reasonGSqSS_8userInfoGSqCSo12NSDictionary_7closureGSqFCSo11NSExceptionT___GVS_11MatcherFuncP__U_FTGVS_10ExpressionP__CS_14FailureMessage_SbU0_FT_T_ + 215
    22  Nimble                              0x0000000112db6f84 _TPA__TFFF6Nimble14raiseExceptionFT5namedGSqSS_6reasonGSqSS_8userInfoGSqCSo12NSDictionary_7closureGSqFCSo11NSExceptionT___GVS_11MatcherFuncP__U_FTGVS_10ExpressionP__CS_14FailureMessage_SbU0_FT_T_ + 132
    23  Nimble                              0x0000000112d96706 _TFC6Nimble16ExceptionCapture8tryBlockfS0_FFT_T_T_ + 70
    24  Nimble                              0x0000000112db72eb _TFF6Nimble14raiseExceptionFT5namedGSqSS_6reasonGSqSS_8userInfoGSqCSo12NSDictionary_7closureGSqFCSo11NSExceptionT___GVS_11MatcherFuncP__U_FTGVS_10ExpressionP__CS_14FailureMessage_Sb + 859
    25  Nimble                              0x0000000112db1262 _TPA__TFF6Nimble14raiseExceptionFT5namedGSqSS_6reasonGSqSS_8userInfoGSqCSo12NSDictionary_7closureGSqFCSo11NSExceptionT___GVS_11MatcherFuncP__U_FTGVS_10ExpressionP__CS_14FailureMessage_Sb + 354
    26  Nimble                              0x0000000112da20f6 _TFV6Nimble11MatcherFunc7matchesurfGS0_q__FzTGVS_10Expressionq__14failureMessageCS_14FailureMessage_Sb + 342
    27  Nimble                              0x0000000112db532f _TFC6Nimble28NMBObjCRaiseExceptionMatcher7matchesfS0_FTFT_GSQCSo8NSObject_14failureMessageCS_14FailureMessage8locationCS_14SourceLocation_Sb + 1007
    28  Nimble                              0x0000000112db5539 _TToFC6Nimble28NMBObjCRaiseExceptionMatcher7matchesfS0_FTFT_GSQCSo8NSObject_14failureMessageCS_14FailureMessage8locationCS_14SourceLocation_Sb + 153
    29  Nimble                              0x0000000112da75c3 _TFV6Nimble18ObjCMatcherWrapper7matchesfS0_FTGVS_10ExpressionCSo8NSObject_14failureMessageCS_14FailureMessage_Sb + 387
    30  Nimble                              0x0000000112da7b32 _TTWV6Nimble18ObjCMatcherWrapperS_7MatcherS_FS1_7matchesuRq_S1__fq_FzTGVS_10Expressionqq_S1_9ValueType_14failureMessageCS_14FailureMessage_Sb + 130
    31  Nimble                              0x0000000112d96c76 _TF6Nimble17expressionMatchesu0_Rq0_S_7Matcherzq_qq0_S0_9ValueType_FTGVS_10Expressionq__7matcherq0_2toSS11descriptionGSqSS__TSbCS_14FailureMessage_ + 726
    32  Nimble                              0x0000000112d97fca _TFV6Nimble11Expectation2tou__Rqd__S_7Matcherzq_qqd__S1_9ValueType_fGS0_q__FTqd__11descriptionGSqSS__T_ + 586
    33  Nimble                              0x0000000112daaf68 _TFFC6Nimble14NMBExpectationg2toFPS_10NMBMatcher_T_U_FPS1__T_ + 376
    34  Nimble                              0x0000000112daade8 _TTRXFo_oP6Nimble10NMBMatcher__dT__XFdCb_dPS0___dT__ + 56
    35  components_library_tests            0x0000000112d284ee __34-[PCTopTabViewControllerSpec spec]_block_invoke40 + 334
    36  Quick                               0x0000000112e94133 _TTRXFdCb__dT__XFo__dT__ + 19
    37  Quick                               0x0000000112e97227 _TTRXFo__dT__XFdCb__dT__ + 39
    38  Quick                               0x0000000112e94133 _TTRXFdCb__dT__XFo__dT__ + 19
    39  Quick                               0x0000000112e98d6f _TFC5Quick7Example3runfS0_FT_T_ + 1471
    40  Quick                               0x0000000112e993a2 _TToFC5Quick7Example3runfS0_FT_T_ + 34
    41  Quick                               0x0000000112e914b3 __60+[QuickSpec addInstanceMethodForExample:classSelectorNames:]_block_invoke + 115
    42  CoreFoundation                      0x00000001037981cc __invoking___ + 140
    43  CoreFoundation                      0x000000010379801e -[NSInvocation invoke] + 286
    44  XCTest                              0x000000010ea40080 __24-[XCTestCase invokeTest]_block_invoke_2 + 159
    45  XCTest                              0x000000010ea73b14 -[XCTestContext performInScope:] + 184
    46  XCTest                              0x000000010ea3ffd0 -[XCTestCase invokeTest] + 169
    47  XCTest                              0x000000010ea4046b -[XCTestCase performTest:] + 443
    48  XCTest                              0x000000010ea3e131 -[XCTestSuite performTest:] + 377
    49  XCTest                              0x000000010ea3e131 -[XCTestSuite performTest:] + 377
    50  XCTest                              0x000000010ea3e131 -[XCTestSuite performTest:] + 377
    51  XCTest                              0x000000010ea2b181 __25-[XCTestDriver _runSuite]_block_invoke + 51
    52  XCTest                              0x000000010ea4bb5b -[XCTestObservationCenter _observeTestExecutionForBlock:] + 615
    53  XCTest                              0x000000010ea2b0cd -[XCTestDriver _runSuite] + 408
    54  XCTest                              0x000000010ea2be2c -[XCTestDriver _checkForTestManager] + 263
    55  XCTest                              0x000000010ea74e99 _XCTestMain + 628
    56  CoreFoundation                      0x00000001037d5a1c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
    57  CoreFoundation                      0x00000001037cb6a5 __CFRunLoopDoBlocks + 341
    58  CoreFoundation                      0x00000001037cae02 __CFRunLoopRun + 850
    59  CoreFoundation                      0x00000001037ca828 CFRunLoopRunSpecific + 488
    60  GraphicsServices                    0x0000000107de0ad2 GSEventRunModal + 161
    61  UIKit                               0x0000000103c56610 UIApplicationMain + 171
    62  components                          0x0000000102c88dc4 main + 132
    63  libdyld.dylib                       0x00000001066b392d start + 1
)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions