mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-04-24 04:46:01 +08:00
Break out reused functions for object mapping introspection into RKObjectUtilities
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#import "RKObjectMappingOperationDataSource.h"
|
||||
#import "RKRelationshipMapping.h"
|
||||
#import "RKErrors.h"
|
||||
#import "RKObjectUtilities.h"
|
||||
|
||||
// Error Constants
|
||||
NSString * const RKMappingTestErrorDomain = @"org.restkit.RKMappingTest.ErrorDomain";
|
||||
@@ -31,8 +32,6 @@ NSString * const RKMappingTestExpectationErrorKey = @"RKMappingTestExpectationEr
|
||||
NSString * const RKMappingTestValueErrorKey = @"RKMappingTestValueErrorKey";
|
||||
NSString * const RKMappingTestVerificationFailureException = @"RKMappingTestVerificationFailureException";
|
||||
|
||||
BOOL RKValueIsEqualToValue(id sourceValue, id destinationValue);
|
||||
|
||||
///-----------------------------------------------------------------------------
|
||||
///-----------------------------------------------------------------------------
|
||||
|
||||
@@ -217,7 +216,7 @@ BOOL RKValueIsEqualToValue(id sourceValue, id destinationValue);
|
||||
}
|
||||
} else if (expectation.value) {
|
||||
// Use RestKit comparison magic to match values
|
||||
success = RKValueIsEqualToValue(event.value, expectation.value);
|
||||
success = RKObjectIsEqualToObject(event.value, expectation.value);
|
||||
|
||||
if (! success) {
|
||||
NSString *description = [NSString stringWithFormat:@"mapped to unexpected %@ value '%@'", [event.value class], event.value];
|
||||
|
||||
Reference in New Issue
Block a user