English 中文(简体)
• 由于垃圾收集器的弃置,Canat公司
原标题:Can t run Cocoa UnitTests because of Garbage Collector disabling

I m trying to add some UnitTests to a bunch of Cocoa Legacy code. I created a Unit Test Bundle, and added all source and frameworks needed, but the build fails with this message:

2010-08-26 16:07:18.074 otest-x86_64[64675:903] The test bundle at 
/Users/giordano/application/build/Release/UnitTest.octest 
could not be loaded because its Objective-C runtime information does not match 
the runtime information required by the test rig.  This is likely because the 
test rig is being run with Objective-C garbage collection disabled, but the 
test bundle requires Objective-C garbage collection.  To enable Objective-C 
garbage collection for the test rig, run it in an environment without the 
OBJC_DISABLE_GC environment variable.

我试图使垃圾收集器能够使用,但出现另一个错误:

2010-08-26 16:38:28.824 otest-x86_64[71383:903] The test bundle at 
/Users/giordano/work/CleanCode/Pomodori.st/desktop/Osx/pomodoro-
buildfix/pomodoro/build/Release/UnitTest.octest could not be loaded 
because an unanticipated error occurred: Error Domain=NSCocoaErrorDomain 
Code=3587 UserInfo=0x20002a640 "The bundle “UnitTest.octest” couldn’t be 
loaded because it is damaged or missing necessary resources."
 (dlopen_preflight(/Users/giordano/application/build/Release/UnitTest.octest/Contents/MacOS/UnitTest): Library not loaded: 
@loader_path/../Frameworks/Sparkle.framework/Versions/A/Sparkle
  Referenced from: 
/Users/giordano/application/build/Release/UnitTest.octest/Contents/MacOS/UnitTest
  Reason: no suitable image found.  Did find:
    /Users/giordano/application/build/Release/UnitTest.octest/Contents/MacOS/../Frameworks/Sparkle.framework/Versions/A/Sparkle: 
GC capability mismatch
    /Users/giordano/application/build/Release/UnitTest.octest/Contents/MacOS/../Frameworks/Sparkle.framework/Versions/A/Sparkle: 
GC capability mismatch)

I wonder if it s possible to force Unit Test to run without Garbage Collection: Any clue?

最佳回答

启动框架需要建立GC。

问题回答

暂无回答




相关问题
run unit tests and coverage in certain python structure

I have some funny noob problem. I try to run unit tests from commandline: H:PROpyEstimator>python src estpython est_power_estimator.py Traceback (most recent call last): File "src est...

How to unit-test an enterprise symfony project?

I´m working on a huge project at my work. We have about 200 database tables, accordingly a huge number of Models, Actions and so on. How should I begin to write tests for this? My biggest problem ...

Code Coverage Tools & Visual Studio 2008 Pro

Just wondering what people are using for code coverage tools when using MS Visual Studio 2008 Pro. We are using the built-in MS test project and unit testing tool (the one that come pre-installed ...

Unit testing. File structure

I have a C++ legacy codebase with 10-15 applications, all sharing several components. While setting up unittests for both shared components and for applications themselves, I was wondering if there ...

Unit Testing .NET 3.5 projects using MStest in VS2010

There s a bug/feature in Visual Studio 2010 where you can t create a unit test project with the 2.0 CLR. https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=483891&wa=...

Unit Test for Exceptions Message

Is there a simple (Attribute-driven) way to have the following test fail on the message of the exception. [TestMethod()] [ExpectedException(typeof(ArgumentException))] public void ExceptionTestTest() ...

热门标签