Every repository with this icon (
Every repository with this icon (
tree b5c0f1382d4bb4f786a268dc4d00ff2e478e74eb
parent abcaa4469e01d696b81c97ecec76fb1276e0a230
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Fri Apr 03 11:39:36 -0700 2009 | |
| |
Classes/ | Tue Apr 21 06:22:05 -0700 2009 | |
| |
CocoaLearningTests.xcodeproj/ | Fri Apr 03 11:39:36 -0700 2009 | |
| |
CocoaLearningTests_Prefix.pch | Fri Apr 03 11:39:36 -0700 2009 | |
| |
English.lproj/ | Fri Apr 03 11:39:36 -0700 2009 | |
| |
Info.plist | Fri Apr 03 11:39:36 -0700 2009 | |
| |
README.md | Tue Apr 21 06:22:05 -0700 2009 | |
| |
Rakefile | Fri Apr 03 11:39:36 -0700 2009 | |
| |
Tests-Info.plist | Fri Apr 03 11:39:36 -0700 2009 | |
| |
Tests/ | Fri Dec 11 14:51:41 -0800 2009 | |
| |
main.m | Sat Aug 29 10:33:00 -0700 2009 | |
| |
version.plist | Fri Apr 03 11:39:36 -0700 2009 |
Cocoa Learning Tests
An evolving collection of unit tests I've been writing as I learn Objective-C and Cocoa. It's a work in progress I started years ago. These tests are the safe place I return to when I get stuck, or when I need to better understand methods or APIs I intend to use in production code. I used a similar learning style when I learned Ruby, as described in this blog post.
The goal isn't to create a comprehensive test suite for Objective-C or Cocoa. I'm not trying to verify whether they work as advertised. Rather, I'm writing these tests to learn how things actually work. It's learning through exploration. Once nice side effect is winding up with an executable repository of knowledge; the test suite grows each time I learn something new.
If you're new to Objective-C, I hope you learn something interesting by reading through these tests. But you'll likely learn a lot more by writing tests to poke and prod language features you want to use. So please, by all means, fork these tests and make them your own!
About the Tests
This Xcode project makes use of the SenTest testing framework included in Xcode. You might want to start by having a look at AssertionsTests.m. It shows how all the common assertion macros work. In some of the tests I have duplicated initialization code. I'm ok with that.
To run the tests in Xcode, select the "Tests" target and build it. To run the tests from the command line, run "rake".
Author
Mike Clark, mike@clarkware.com, Clarkware Consulting







