응용 프로그램 테스트 (장치에서)를 실행할 때 OCUnit 테스트 스위트에 문제가 있습니다. 때로는 OCUnit 클래스에서 발생하는 것처럼 보이는 까다로운 오류가 발생합니다. 필자는 테스트 스위트에 추가 된 파일을 살펴보고자했지만 내 머리를 감당할 수는 없습니다.장치에서 OCUnit 응용 프로그램 테스트 스위트를 실행할 때 가끔 오류가 발생했습니다.
나는 애플의 문서를 다음과 같은 목표 (및 들여 쓰기 의존성)의 결과로, 내 테스트 목표를 설정할 때 다른 튜토리얼을 검토 한 결과 :
의 MyApp에게
LogicTests LogicTests
을 ApplicationTests MyApp
MyAppTesting ApplicationTests
마지막 (MyAppTesting)은 테스트 스위트를 시작하기 위해 장치에서 실행 한 것입니다.
그리고 언급 한 바와 같이, 테스트가 콘솔에서 나에게 다음과 같은 출력을 던지는 때때로 시작되지
:2010-11-17 12:02:48.537 VCCTesting[12018:307] *** Assertion failure in -[SenTestClassEnumerator init], /SourceCache/OCUnit/OCUnit-1685/SourceCode/SenTestingKit/SenTestClassEnumerator.m:137
2010-11-17 12:02:48.556 VCCTesting[12018:307] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'objc_getClassList returned more classes than it should have.'
*** Call stack at first throw:
(
0 CoreFoundation 0x30897ed3 __exceptionPreprocess + 114
1 libobjc.A.dylib 0x3002f811 objc_exception_throw + 24
2 CoreFoundation 0x30897d15 +[NSException raise:format:arguments:] + 68
3 Foundation 0x349f932f -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 62
4 SenTestingKit 0x20107c29 -[SenTestClassEnumerator init] + 292
5 SenTestingKit 0x201079fd +[SenTestClassEnumerator classEnumerator] + 24
6 SenTestingKit 0x2010777d +[NSObject(SenTestRuntimeUtilities) senAllSubclasses] + 92
7 SenTestingKit 0x201067b5 +[SenTestSuite updateCache] + 28
8 SenTestingKit 0x20106753 +[SenTestSuite suiteForBundleCache] + 54
9 SenTestingKit 0x201065db +[SenTestSuite structuredTests] + 14
10 SenTestingKit 0x201065a1 +[SenTestSuite allTests] + 40
11 SenTestingKit 0x20106573 +[SenTestSuite defaultTestSuite] + 14
12 SenTestingKit 0x201057a3 +[SenTestProbe specifiedTestSuite] + 106
13 SenTestingKit 0x20105d83 +[SenTestProbe runTests:] + 94
14 Foundation 0x349c7e8d __NSFireDelayedPerform + 368
15 CoreFoundation 0x3084e7fb __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 14
16 CoreFoundation 0x3084e2ad __CFRunLoopDoTimer + 860
17 CoreFoundation 0x3081f7a5 __CFRunLoopRun + 1088
18 CoreFoundation 0x3081f277 CFRunLoopRunSpecific + 230
19 CoreFoundation 0x3081f17f CFRunLoopRunInMode + 58
20 GraphicsServices 0x31e445f3 GSEventRunModal + 114
21 GraphicsServices 0x31e4469f GSEventRun + 62
22 UIKit 0x31e51123 -[UIApplication _run] + 402
23 UIKit 0x31e4f12f UIApplicationMain + 670
24 VCCTesting 0x000234ff main + 70
25 VCCTesting 0x00002538 start + 40
)
terminate called after throwing an instance of 'NSException'
사람이 잘못 될 수 있는지 알고 있나요? 어떤 도움
, 감사합니다, Kristofer
P.S. 나는 이것을 App Dev forums에 올렸지 만, 아직 어떤 행운이 없었습니다. https://devforums.apple.com/message/333890
그냥 어떻게 든 이걸 쳐. 나를 깨끗하게하고 다시 시도해보십시오. – canhazbits