Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CPlusTest in Xcode 2.3



On May 23, 2006, at 3:59 PM, Aaron Montgomery wrote:

I upgraded to Xcode 2.3 this morning and now my CPlusTest Unit Testing target has broken (it had been working earlier today under Xcode 2.2). It will work if I have a single test invocation. If I have more than one, it crashes when I try to quit the application. The crash occurs when the destructor for the second test invocation is called (this appears to happen in the destructor of TestCase after my destructor has exited). I didn't see anything in the release notes that looked like it should be causing this problem.

In your TestCase subclasses, are you overriding setUp() and tearDown () to handle creating and destroying the state of your tests? Or are you doing it in the constructor and destructor of your test case subclasses?


State used by a test -- the test's fixture -- should be created in setUp and cleaned up in tearDown. It shouldn't be conflated with memory management in the test's constructor and destructor.

Anyone else seeing this? I'm willing to post the project if someone wants to poke at it. It isn't very large, it is designed to be part of a tutorial on Unit Testing and gcov usage.

If the above doesn't clear up your issue, please file a bug at <http://bugreport.apple.com/>.


  -- Chris

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/xcode-users/email@hidden

This email sent to email@hidden
References: 
 >Re: CPlusTest in Xcode 2.3 (From: Aaron Montgomery <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.