Freddy
Freddy

Reputation: 2279

Testing Classes in Objective-C

I'm trying to find a way to test my objective-c classes like i test my java classes.

Whenever i build a java class I just drop a main() method at the bottom of my class and tell eclipse to compile/run the class I'm working with. However, in objective-c I'm not allowed to do this. I have been reading around the web and have heard a lot about unit testing, but was trying to find a simple way to just test my code without having to make custom targets each time.

Thanks, Freddy

Upvotes: 0

Views: 312

Answers (2)

Chuck
Chuck

Reputation: 237060

You don't have to make a custom target for every test. You only need one test target per project and you can stick all your unit tests in there.

http://developer.apple.com/tools/unittest.html

Upvotes: 2

kubi
kubi

Reputation: 49354

http://github.com/gabriel/gh-unit

Sure, it does require a custom target, but it only requires one custom target. Once you have everything set up, creating new unit tests are trivially easy.

Upvotes: 0

Related Questions