Skip to content

Instantly share code, notes, and snippets.

@bgerstle
Created April 12, 2015 22:02
Show Gist options
  • Save bgerstle/99819e4e85a265cda58a to your computer and use it in GitHub Desktop.
Save bgerstle/99819e4e85a265cda58a to your computer and use it in GitHub Desktop.
Stack trace with failed assertion due to calling `-[XCTestCase measureBlock]` inside a spec.
2015-04-12 18:01:37.224 xctest[36363:1321742] *** Assertion failure in -[HomeFriesTests.AppleHashSpec measureMetrics:automaticallyStartMeasuring:forBlock:], /SourceCache/XCTest_Sim/XCTest-7503/XCTestFramework/Classes/XCTestCase.m:1022
<unknown>:0: error: -[HomeFriesTests.AppleHashSpec a_hashable_person__should_have_a_performant_hash_function] : failed: caught "NSInternalInconsistencyException", "-numberOfTestIterationsForTestWithSelector: returned 0 for -[HomeFriesTests.AppleHashSpec (null)]. -numberOfTestIterationsForTestWithSelector: must return 1 for tests that call -measure...Block: APIs."
(
0 CoreFoundation 0x000000010c124c65 __exceptionPreprocess + 165
1 libobjc.A.dylib 0x000000010bdbdbb7 objc_exception_throw + 45
2 CoreFoundation 0x000000010c124aca +[NSException raise:format:arguments:] + 106
3 Foundation 0x000000010b9d298f -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 195
4 XCTest 0x000000010f9a41a0 -[XCTestCase measureMetrics:automaticallyStartMeasuring:forBlock:] + 1481
5 HomeFriesTests 0x000000010d983411 _TFFZFC14HomeFriesTests22SharedHashableExamples9configureFMS0_FGSQC5Quick13Configuration_T_U0_FFT_CSo12NSDictionaryT_U2_FT_T_ + 449
6 Quick 0x000000010fb4da86 _TFC5Quick7Example3runfS0_FT_T_ + 710
7 Quick 0x000000010fb4df14 _TToFC5Quick7Example3runfS0_FT_T_ + 36
8 Quick 0x000000010fb46f9b __41+[QuickSpec addInstanceMethodForExample:]_block_invoke + 75
9 CoreFoundation 0x000000010c01adec __invoking___ + 140
10 CoreFoundation 0x000000010c01ac42 -[NSInvocation invoke] + 290
11 XCTest 0x000000010f9a212a -[XCTestCase invokeTest] + 253
12 XCTest 0x000000010f9a232b -[XCTestCase performTest:] + 150
13 XCTest 0x000000010f9abbe5 -[XCTest run] + 260
14 XCTest 0x000000010f9a103b -[XCTestSuite performTest:] + 379
15 XCTest 0x000000010f9abbe5 -[XCTest run] + 260
16 XCTest 0x000000010f9a103b -[XCTestSuite performTest:] + 379
17 XCTest 0x000000010f9abbe5 -[XCTest run] + 260
18 XCTest 0x000000010f9a103b -[XCTestSuite performTest:] + 379
19 XCTest 0x000000010f9abbe5 -[XCTest run] + 260
20 XCTest 0x000000010f99e0d9 __25-[XCTestDriver _runSuite]_block_invoke + 56
21 XCTest 0x000000010f9a8e8d -[XCTestObservationCenter _observeTestExecutionForBlock:] + 162
22 XCTest 0x000000010f99e010 -[XCTestDriver _runSuite] + 269
23 XCTest 0x000000010f99ea3d -[XCTestDriver _checkForTestManager] + 234
24 XCTest 0x000000010f9aead0 +[XCTestProbe runTests:] + 182
25 xctest 0x000000010b8a31a6 xctest + 4518
26 xctest 0x000000010b8a3419 xctest + 5145
27 xctest 0x000000010b8a2e23 xctest + 3619
28 libdyld.dylib 0x000000010d3f0145 start + 1
29 ??? 0x000000000000000c 0x0 + 12
)
Test Case '-[HomeFriesTests.AppleHashSpec a_hashable_person__should_have_a_performant_hash_function]' failed (6.027 seconds).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment