0
我们升级到Xcode 3.2.4与iOS 4.1 SDK,现在我们的测试失败。 [XCBuildLogCommandInvocationSectionRecorder结束标记] - ::单元测试失败在Xcode 3.2.4,iOS 4.1 SDK使用Hamcrest声明
首先,因为这的处理时指令输出时发生内部错误无法识别的选择发送到实例0x201aa7200然后我们使用由苹果论坛提出的补丁(http://gist.github.com/586296),现在测试失败的第一Hamcrest断言。
NSNumber * c1 = ...
NSNumber * c2 = ...
assertThat(c1, is(c2))
这里的日志:
-[NSCFNumber conformsToProtocol:]: unrecognized selector sent to instance 0x2116890
2010-09-30 22:10:23.153 otest[21063:903] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSCFNumber conformsToProtocol:]: unrecognized selector sent to instance 0x2116890'
*** Call stack at first throw:
(
0 CoreFoundation 0x004e3b99 __exceptionPreprocess + 185
1 libobjc.A.dylib 0x002d840e objc_exception_throw + 47
2 CoreFoundation 0x004e56ab -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
3 CoreFoundation 0x004552b6 ___forwarding___ + 966
4 CoreFoundation 0x00454e72 _CF_forwarding_prep_0 + 50
5 OCHamcrest 0x00ccd17b HC_wrapInMatcher + 52
6 OCHamcrest 0x00ccb4e1 HC_is + 41
7 UnitTests 0x030870c9 -[MyTest testMethod] + 141
8 CoreFoundation 0x004545cd __invoking___ + 29
9 CoreFoundation 0x004544a1 -[NSInvocation invoke] + 145
10 SenTestingKit 0x2010464a -[SenTestCase invokeTest] + 69
11 SenTestingKit 0x20104d1f -[SenTestCase performTest:] + 192
12 SenTestingKit 0x2010444b -[SenTest run] + 88
13 SenTestingKit 0x20106fa7 -[SenTestSuite performTest:] + 115
14 SenTestingKit 0x2010444b -[SenTest run] + 88
15 SenTestingKit 0x20106fa7 -[SenTestSuite performTest:] + 115
16 SenTestingKit 0x2010444b -[SenTest run] + 88
17 SenTestingKit 0x20106871 +[SenTestProbe runTests:] + 174
18 otest 0x000023b3 0x0 + 9139
19 otest 0x000025de 0x0 + 9694
20 otest 0x00002086 0x0 + 8326
21 otest 0x00002035 0x0 + 8245
22 ??? 0x00000003 0x0 + 3
)
terminate called after throwing an instance of 'NSException'
/Developer/Xcode3.2.4/Tools/RunPlatformUnitTests.include: line 415: 21063 Abort trap "${THIN_TEST_RIG}" "${OTHER_TEST_FLAGS}" "${TEST_BUNDLE_PATH}"
/Developer/Xcode3.2.4/Tools/RunPlatformUnitTests.include:451: error: Test rig '/Developer/Xcode3.2.4/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.1.sdk/Developer/usr/bin/otest' exited abnormally with code 134 (it may have crashed).
任何一个之前看到了什么?它在3.1.3 SDK上完美运行。
我刚刚发布了1.0版本,这个版本更容易设置。 – 2010-12-04 21:22:18
谢谢Jon,我会用它。 – Noura 2010-12-08 18:33:45