WOTest.git
11 years agoXcode project noise master snow-leopard
Wincent Colaiuta [Tue, 2 Nov 2010 07:53:04 +0000 (08:53 +0100)] 
Xcode project noise

Signed-off-by: Wincent Colaiuta <win@wincent.com>
11 years agoUpdated TODO.txt
Wincent Colaiuta [Tue, 2 Nov 2010 07:51:42 +0000 (08:51 +0100)] 
Updated TODO.txt

These changes have been lingering in the work tree for a long, long,
long time.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
11 years agoUpdate copyright year range to include 2010
Wincent Colaiuta [Tue, 2 Nov 2010 07:46:49 +0000 (08:46 +0100)] 
Update copyright year range to include 2010

Signed-off-by: Wincent Colaiuta <win@wincent.com>
11 years agoAdd objc_startCollectorThread() call to runner
Wincent Colaiuta [Tue, 2 Nov 2010 07:46:00 +0000 (08:46 +0100)] 
Add objc_startCollectorThread() call to runner

All Foundation tools need to start the collector thread manually (Cocoa
apps don't need to worry though as this is done automatically for them).

Signed-off-by: Wincent Colaiuta <win@wincent.com>
11 years agoReformat header (cosmetic only)
Wincent Colaiuta [Tue, 2 Nov 2010 07:45:06 +0000 (08:45 +0100)] 
Reformat header (cosmetic only)

Signed-off-by: Wincent Colaiuta <win@wincent.com>
12 years agoUpdate project references to submodule version of buildtools
Wincent Colaiuta [Thu, 2 Jul 2009 17:37:09 +0000 (19:37 +0200)] 
Update project references to submodule version of buildtools

Signed-off-by: Wincent Colaiuta <win@wincent.com>
12 years agoAdd buildtools submodule
Wincent Colaiuta [Thu, 2 Jul 2009 17:34:22 +0000 (19:34 +0200)] 
Add buildtools submodule

Signed-off-by: Wincent Colaiuta <win@wincent.com>
12 years agoXcode project noise
Wincent Colaiuta [Thu, 2 Jul 2009 17:33:51 +0000 (19:33 +0200)] 
Xcode project noise

Signed-off-by: Wincent Colaiuta <win@wincent.com>
13 years agoUpdate copyright range to include 2009
Wincent Colaiuta [Tue, 7 Apr 2009 11:10:28 +0000 (13:10 +0200)] 
Update copyright range to include 2009

Signed-off-by: Wincent Colaiuta <win@wincent.com>
13 years agoImport WOMalloc functions from WODebug
Wincent Colaiuta [Tue, 7 Apr 2009 11:09:25 +0000 (13:09 +0200)] 
Import WOMalloc functions from WODebug

These functions and macros weren't really used in
WODebug, but they could definitely be of use here
in WOTest.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
14 years agoIgnore Xcode 3 index folder
Wincent Colaiuta [Wed, 9 Jan 2008 19:09:02 +0000 (20:09 +0100)] 
Ignore Xcode 3 index folder

Update the .gitignore file to include the index folder created by Xcode
3 in the source root.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
14 years agoRemove stale file reference
Wincent Colaiuta [Wed, 9 Jan 2008 19:08:08 +0000 (20:08 +0100)] 
Remove stale file reference

The project had a reference to the no-longer-used WOEnumerate.h header.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
14 years agoUpdate copyright years
Wincent Colaiuta [Wed, 9 Jan 2008 19:07:49 +0000 (20:07 +0100)] 
Update copyright years

Extend to 2008.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
14 years agoFix last of test-time crashes under 10.5
Wincent Colaiuta [Tue, 27 Nov 2007 22:32:57 +0000 (23:32 +0100)] 
Fix last of test-time crashes under 10.5

Fix another test-time crash that's new under 10.5, this one stemming from
the use of the Object root class. It appears that this class is not
compatible with the new runtime when GC is set to "required", as these
same tests didn't used to crash prior to turning that setting on.

So for now we just skip those tests.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
14 years agoFix test-time crashes caused by 10.5 runtime changes
Wincent Colaiuta [Tue, 27 Nov 2007 22:27:33 +0000 (23:27 +0100)] 
Fix test-time crashes caused by 10.5 runtime changes

The Objective-C 2.0 runtime in Leopard expects more methods to be
implemented in root classes than was the case under Tiger.

This commit adds two such methods to the WOLightweightRoot implementation,
doesNotRecognizeSelector: and methodSignatureForSelector:, thus eliminating
a crash that would derail the test run.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
14 years agoUse public NSMethodSignature API
Wincent Colaiuta [Tue, 30 Oct 2007 20:46:24 +0000 (21:46 +0100)] 
Use public NSMethodSignature API

Use formerly private API, now exposed in Leopard.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
14 years agoRemove private API support code
Wincent Colaiuta [Thu, 27 Sep 2007 19:07:13 +0000 (21:07 +0200)] 
Remove private API support code

The signatureWithObjCTypes: method in NSMethodSignature is at last exposed
in Leopard, so remove the all the support code that was previously used to
(carefully) work with (or around) it and just use the now-official API.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
14 years agoAdd missing call to finalize
Wincent Colaiuta [Sat, 11 Aug 2007 16:01:51 +0000 (18:01 +0200)] 
Add missing call to finalize

The finalize method in the WOMock class was missing a call to super's finalize
method.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
14 years agoCode clean-up for garbage collection
Wincent Colaiuta [Sat, 11 Aug 2007 13:26:18 +0000 (15:26 +0200)] 
Code clean-up for garbage collection

I've made a pass through the codebase eliminating message sends that have
effectively been turned into no-ops by the move to garbage collection (retain,
release, autorelease), as well as replacing "release" messages sent to
autorelease pools with "drain", replacing the alloc/init pattern with the
straightforward autoreleased alternative where possible (for brevity),
removing methods that will now never be meaningfully called (dealloc, release,
retainCount etc), and switching some accessors over to synthesized properties
where this enabled me to get rid of no-op retain, release and autorelease
message sends.

I also performed some minor reformatting (better wrapping and column
alignment) where the already-mentioned changes touch code which would benefit
from such reformatting (improved readability); there are still plenty of
places in the codebase where the wrapping could be tweaked to make better use
of the full 132 columns.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
14 years agoWorkaround Objective-C 2.0 properties bug
Wincent Colaiuta [Sat, 11 Aug 2007 11:42:17 +0000 (13:42 +0200)] 
Workaround Objective-C 2.0 properties bug

It turns out that the public-readonly/private-readwrite property pattern is
not broken after all, and a simple workaround is available (redeclare all the
attributes "in whole" rather than "in part" as the documentation suggests).

This commit applies the new workaround and references the Radar and test case
that correspond to the issue.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
Signed-off-by: Wincent Colaiuta <win@wincent.com>
14 years agoAdd test case for Objective-C 2.0 properties bug
Wincent Colaiuta [Sat, 11 Aug 2007 11:39:50 +0000 (13:39 +0200)] 
Add test case for Objective-C 2.0 properties bug

In a previous commit (f2d45e3) I noted what appears to be a bug in either the
Objective-C 2.0 properties implementation (spurious compiler warnings) or in
its documentation.

I've prepared this test case demonstrating the problem. In the course of doing
so I discovered that the problem has a workaround that is considerably easier
than I originally thought, and the bug doesn't actually make it impossible to
use the public-readonly/private-readwrite property pattern. I will apply the
new workaround in a subsequent commit.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
14 years agoUse anonymous private categories
Wincent Colaiuta [Thu, 9 Aug 2007 20:08:23 +0000 (22:08 +0200)] 
Use anonymous private categories

"Anonymous" private categories (new in Objective-C 2.0) are a better fit for
private methods because they provide an indication to the compiler of what
methods are expected to be implemented, not just those that "might" be
implemented elsewhere (and available at runtime).

Signed-off-by: Wincent Colaiuta <win@wincent.com>
14 years agoConvert WOTest class to use Objective-C 2.0 properties
Wincent Colaiuta [Tue, 31 Jul 2007 12:22:39 +0000 (14:22 +0200)] 
Convert WOTest class to use Objective-C 2.0 properties

This commit converts most of the accessors for the instance variables in the
WOTest class to Objective-C 2.0 properties.

At the same time some unused instance variables were disposed of or marked for
future deprecation.

Note that due to an apparent bug in the compiler I was unable to implement the
public-readonly/private-readwrite pattern as suggested in the documentation,
and so the readonly/readwrite portions are commented out. I will be making a
reduced test case for this and filing a Radar. Watch for a future commit that
adds the Radar number in a comment.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
14 years agoAlignment fixes
Wincent Colaiuta [Tue, 31 Jul 2007 12:19:25 +0000 (14:19 +0200)] 
Alignment fixes

Adjust whitespace to improve alignment (better readability).

Signed-off-by: Wincent Colaiuta <win@wincent.com>
14 years agoUse Fast Enumeration
Wincent Colaiuta [Mon, 30 Jul 2007 17:52:38 +0000 (19:52 +0200)] 
Use Fast Enumeration

Switch to Objective-C 2.0 Fast Enumeration.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
14 years agoBump version number for Leopard development
Wincent Colaiuta [Mon, 30 Jul 2007 11:59:33 +0000 (13:59 +0200)] 
Bump version number for Leopard development

Bump version to 1.99-pre in anticipation of the final Leopard release which
will be 2.0.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
14 years agoRemove redundant build settings
Wincent Colaiuta [Sat, 28 Jul 2007 19:28:18 +0000 (21:28 +0200)] 
Remove redundant build settings

Prune redundant build settings from aggregate targets, leaving only the
PRODUCT_NAME in place (needed by Xcode for dependency analysis).

Signed-off-by: Wincent Colaiuta <win@wincent.com>
14 years agoUpdate Xcode project bundle format
Wincent Colaiuta [Sat, 28 Jul 2007 14:48:13 +0000 (16:48 +0200)] 
Update Xcode project bundle format

Use the latest Xcode project bundle format (for Xcode 3.0).

Signed-off-by: Wincent Colaiuta <win@wincent.com>
14 years agoBetter handling when growlnotify is not installed
Wincent Colaiuta [Fri, 27 Jul 2007 15:46:40 +0000 (17:46 +0200)] 
Better handling when growlnotify is not installed

Previouly when growlnotify was not installed env would issue an ugly error
message to the standard error.

This commit redirects standard error to /dev/null so as to suppress this
output and instead checks the exit status of the env tool. When growlnotify
cannot be found in the current PATH a note (not an error or warning) is
printed to the console. Other failure cases issue either an error or a
warning, depending on their severity.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
14 years agoGate problematic mock object test
Wincent Colaiuta [Wed, 25 Jul 2007 08:11:03 +0000 (10:11 +0200)] 
Gate problematic mock object test

The handling of unrecognized selectors appears to have changed in Leopard in
ways that cause one of the mock object tests to fail. Specifically, an
NSInvalidArgumentException is raised and it appears that the -[NSProxy
doesNotRecognizeSelector:] method is being called; setting breakpoints
indicates that the -forward:: method on the WOMock class is no longer being
invoked.

So I am temporarily gating off this test so that we can get error-free test
runs, pending further investigation. I plan to rework much of the mock/stub
API in any case based on better understanding obtained through my experiences
with RSpec (my use of the terms "mock" and "stub" is incorrect, based on my
first contact with those terms in the OCMock framework); at a minimum, I plan
to rename WOStub and its subclasses to better reflect what it actually does
(it is a message recorder and should probably be called as such). I may also
later add WOMock subclasses that really are stubs (non-verifying mocks).

Signed-off-by: Wincent Colaiuta <win@wincent.com>
14 years agoRemove unit test made redundant by garbage collection
Wincent Colaiuta [Wed, 25 Jul 2007 07:26:01 +0000 (09:26 +0200)] 
Remove unit test made redundant by garbage collection

One of the unit tests expected an exception to be raised when working with
objects that don't respond to the retain and release methods, but in a garbage
collected world these messages become no-ops (and in fact I believe that the
compiler literally optimizes them away to nothing).

As such, no exception was being raised and there is no way to "fix" either the
test or the tested implementation: it's simply that the test no longer makes
sense in the context of garbage collection. This commit removes the
now-redundant test.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
14 years agoAllow pointer-to-pointer comparisons
Wincent Colaiuta [Tue, 24 Jul 2007 17:49:05 +0000 (19:49 +0200)] 
Allow pointer-to-pointer comparisons

Found another case in which comparing nil to nil was leading to a failing
test; ultimately the +[NSValue WOTest_compare:] method was being called where
both objects were encoded with type "pointer-to-void".

This commit adds a special case for such comparisons: truly equal pointers are
considered to be NSOrderedSame; all others fall through to the default path
and an exception is raised.

This is a conservative approach because in reality the only kind of pointer
comparison which makes sense in practice is an equality test, not an ordering
test.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
14 years agoAvoid NSGetSizeAndAlignment bug
Wincent Colaiuta [Tue, 24 Jul 2007 17:25:12 +0000 (19:25 +0200)] 
Avoid NSGetSizeAndAlignment bug

Leopard has a bug in the NSGetSizeAndAlignment() function which prevents it
from handling structs which have bitfields in them. This in turn breaks the
+[NSValue valueWithBytes:objCType:] method when used with structs containing
bitfields.

So this commit #ifdefs out the tests which fail as a result of this bug. A
simplified testcase demonstrating the problem has be en added to the "other"
subdirectory. A Radar has been filed (<rdar://problem/5357040>); currently
awaiting on a fix from Apple.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
14 years agoWhitespace cleanup
Wincent Colaiuta [Mon, 23 Jul 2007 20:10:00 +0000 (22:10 +0200)] 
Whitespace cleanup

Extensive whitespace cleanup of entire codebase (over 9,300 lines in the diff)
cleaning up mixed tabs and spaces (now uses spaces consistently) and trailing
whitespace at the end of lines.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
14 years agoFix object-to-pointer comparisons on Leopard
Wincent Colaiuta [Mon, 23 Jul 2007 19:42:09 +0000 (21:42 +0200)] 
Fix object-to-pointer comparisons on Leopard

The behaviour of the @encode directive has changed on Leopard and this breaks
a number of the comparisons that previously worked in Tiger. For example,
comparisons between object pointers and nil, or even between nil and nil,
were broken.

This commit adds some special cases for these types of comparisons which
now perform simple pointer equality tests instead of failing. I also removed
one test which failed on Tiger (when nil was encoded as a numeric scalar) but
no longer fails on Leopard.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
14 years agoRemove Subversion build number
Wincent Colaiuta [Tue, 17 Jul 2007 16:35:36 +0000 (18:35 +0200)] 
Remove Subversion build number

Now that this code is stored in a Git repository, remove the build-number embedding
procedure which got the SVK/Subversion revision number and embedded it in each
build.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
14 years agoIgnore temporary files
Wincent Colaiuta [Tue, 17 Jul 2007 16:33:45 +0000 (18:33 +0200)] 
Ignore temporary files

Ignore ".bak" and ".temp" files created by the Wincent Build Tools during builds.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
14 years agoUpdate ignore file for Xcode 3 mode files
Wincent Colaiuta [Tue, 17 Jul 2007 16:22:26 +0000 (18:22 +0200)] 
Update ignore file for Xcode 3 mode files

Xcode 3 mode files have a new extension (mode1v3), so update the ignore file accordingly.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
14 years agoIgnore user-specific files in Xcode project bundle
Wincent Colaiuta [Mon, 16 Jul 2007 13:24:13 +0000 (15:24 +0200)] 
Ignore user-specific files in Xcode project bundle

Ignore all pbxuser files (except default.pbxuser) and all mode1 files.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
14 years agoUse international-friendly dates in source files
Wincent Colaiuta [Sun, 15 Jul 2007 10:35:01 +0000 (12:35 +0200)] 
Use international-friendly dates in source files

To avoid possible missunderstandings caused by ambiguous interpretations of
dates (which might appear to be in either US or some kind of European format)
switch to more verbose, explicit dates.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
14 years agoRemove embedded svn:keywords
Wincent Colaiuta [Sun, 15 Jul 2007 10:26:43 +0000 (12:26 +0200)] 
Remove embedded svn:keywords

Remove all embedded $Id$ strings as these are a Subversion-specific feature and we're moving to Git.

Signed-off-by: Wincent Colaiuta <win@wincent.com>
14 years agoInitial import r208
Wincent Colaiuta [Sat, 14 Jul 2007 01:20:20 +0000 (03:20 +0200)] 
Initial import

Based on the current tip of the trunk (r208) in the old Subversion repository.

Signed-off-by: Wincent Colaiuta <win@wincent.com>