aboutsummaryrefslogtreecommitdiff
path: root/UnitTesting/GTMNSObject+BindingUnitTesting.m
diff options
context:
space:
mode:
authorGravatar thomasvl@gmail.com <thomasvl@gmail.com@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2009-01-09 20:34:30 +0000
committerGravatar thomasvl@gmail.com <thomasvl@gmail.com@7dc7ac4e-7543-0410-b95c-c1676fc8e2a3>2009-01-09 20:34:30 +0000
commit4fd103b5de98d2f469b982677ea389e7ee7d64b3 (patch)
treed0eb379fdc78996bc2e201515d26c7521d1fc8dc /UnitTesting/GTMNSObject+BindingUnitTesting.m
parent84d1232477f398339e48ea504c45048e9328ef9b (diff)
- turned off _debug framework support in tests since we now capture a lot more
in log validation. - Added GTM_SUPPORT_GC for controlling the inclusion of GC related code. - If you are using GTMUnitTestDevLog, it also tries to capture logs from NSAssert. - Added GTM_FOREACH_OBJECT/GTM_FOREACH_KEY that uses NSEnumerator and objectEnumerator/keyEnumerator on 10.4, but on 10.5+/iPhone uses FastEnumeration. - GTMNSWorkspace+Running gives a variety of ways of determining the attributes of running processes.
Diffstat (limited to 'UnitTesting/GTMNSObject+BindingUnitTesting.m')
-rw-r--r--UnitTesting/GTMNSObject+BindingUnitTesting.m6
1 files changed, 2 insertions, 4 deletions
diff --git a/UnitTesting/GTMNSObject+BindingUnitTesting.m b/UnitTesting/GTMNSObject+BindingUnitTesting.m
index 7a14ad6..d064a47 100644
--- a/UnitTesting/GTMNSObject+BindingUnitTesting.m
+++ b/UnitTesting/GTMNSObject+BindingUnitTesting.m
@@ -31,9 +31,8 @@ BOOL GTMDoExposedBindingsFunctionCorrectly(NSObject *object,
NSArray *bindings = [object exposedBindings];
if ([bindings count]) {
NSArray *bindingsToIgnore = [object gtm_unitTestExposedBindingsToIgnore];
- NSEnumerator *bindingsEnum = [bindings objectEnumerator];
NSString *bindingKey;
- while ((bindingKey = [bindingsEnum nextObject])) {
+ GTM_FOREACH_OBJECT(bindingKey, bindings) {
if (![bindingsToIgnore containsObject:bindingKey]) {
Class theClass = [object valueClassForBinding:bindingKey];
if (!theClass) {
@@ -54,9 +53,8 @@ BOOL GTMDoExposedBindingsFunctionCorrectly(NSObject *object,
} // COV_NF_LINE - compiler bug
NSArray *testValues
= [object gtm_unitTestExposedBindingsTestValues:bindingKey];
- NSEnumerator *testEnum = [testValues objectEnumerator];
GTMBindingUnitTestData *testData;
- while ((testData = [testEnum nextObject])) {
+ GTM_FOREACH_OBJECT(testData, testValues) {
id valueToSet = [testData valueToSet];
[object setValue:valueToSet forKey:bindingKey];
id valueReceived = [object valueForKey:bindingKey];