]> git.wincent.com - WOTest.git/log
WOTest.git
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>
15 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>