Skip to content

Commit

Permalink
Added ivars to test classes so that tests can run for MacOS 32-bit.
Browse files Browse the repository at this point in the history
  • Loading branch information
groue committed Aug 4, 2012
1 parent 1c8ccf7 commit b5ff56d
Show file tree
Hide file tree
Showing 9 changed files with 59 additions and 17 deletions.
2 changes: 2 additions & 0 deletions src/GRMustache.xcodeproj/project.pbxproj
Expand Up @@ -1335,6 +1335,7 @@
56DEC268152631040031E8DC /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
COMBINE_HIDPI_IMAGES = YES;
FRAMEWORK_SEARCH_PATHS = "$(DEVELOPER_LIBRARY_DIR)/Frameworks";
GCC_PRECOMPILE_PREFIX_HEADER = YES;
Expand All @@ -1348,6 +1349,7 @@
56DEC269152631040031E8DC /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
COMBINE_HIDPI_IMAGES = YES;
FRAMEWORK_SEARCH_PATHS = "$(DEVELOPER_LIBRARY_DIR)/Frameworks";
GCC_PRECOMPILE_PREFIX_HEADER = YES;
Expand Down
Expand Up @@ -26,7 +26,11 @@
#import "GRMustacheContext_private.h"
#import <CoreData/CoreData.h>

@interface GRPreventNSUndefinedKeyExceptionAttackTest : GRMustachePrivateAPITest
@interface GRPreventNSUndefinedKeyExceptionAttackTest : GRMustachePrivateAPITest {
NSManagedObjectModel *_managedObjectModel;
NSPersistentStoreCoordinator *_persistentStoreCoordinator;
NSManagedObjectContext *_managedObjectContext;
}
@end

@interface GRPreventNSUndefinedKeyExceptionAttackTest()
Expand Down
9 changes: 6 additions & 3 deletions src/tests/Public/v4.0/GRBooleanTest.m
Expand Up @@ -26,7 +26,10 @@
@interface GRBooleanTest : GRMustachePublicAPITest
@end

@interface GRBooleanTestSupport: NSObject
@interface GRBooleanTestSupport: NSObject {
BOOL _customGetterBOOLProperty;
bool _customGetterboolProperty;
}
@property (readonly) bool boolFalseProperty;
@property (readonly) bool boolTrueProperty;
@property (readonly) BOOL BOOLFalseProperty;
Expand All @@ -42,8 +45,8 @@ @interface GRBooleanTestSupport: NSObject
@end

@implementation GRBooleanTestSupport
@synthesize customGetterBOOLProperty;
@synthesize customGetterboolProperty;
@synthesize customGetterBOOLProperty=_customGetterBOOLProperty;
@synthesize customGetterboolProperty=_customGetterboolProperty;
- (bool)boolFalseProperty { return NO; }
- (bool)boolTrueProperty { return YES; }
- (BOOL)BOOLFalseProperty { return NO; }
Expand Down
14 changes: 11 additions & 3 deletions src/tests/Public/v4.0/GRMustacheHelperTest.m
Expand Up @@ -26,7 +26,9 @@
@interface GRMustacheHelperTest : GRMustachePublicAPITest
@end

@interface GRMustacheStringHelper : NSObject<GRMustacheHelper>
@interface GRMustacheStringHelper : NSObject<GRMustacheHelper> {
NSString *_string;
}
@property (nonatomic, copy) NSString *string;
@end

Expand All @@ -43,7 +45,11 @@ - (NSString *)renderSection:(GRMustacheSection *)section
}
@end

@interface GRMustacheRecorderHelper : NSObject<GRMustacheHelper>
@interface GRMustacheRecorderHelper : NSObject<GRMustacheHelper> {
NSUInteger _invocationCount;
NSString *_lastInnerTemplateString;
NSString *_lastRenderedContent;
}
@property (nonatomic) NSUInteger invocationCount;
@property (nonatomic, retain) NSString *lastInnerTemplateString;
@property (nonatomic, retain) NSString *lastRenderedContent;
Expand All @@ -68,7 +74,9 @@ - (NSString *)renderSection:(GRMustacheSection *)section
}
@end

@interface GRMustacheTemplateHelper : NSObject<GRMustacheHelper>
@interface GRMustacheTemplateHelper : NSObject<GRMustacheHelper> {
NSString *_templateString;
}
@property (nonatomic, copy) NSString *templateString;
@end

Expand Down
17 changes: 14 additions & 3 deletions src/tests/Public/v4.0/GRMustacheTemplateDelegateTest.m
Expand Up @@ -26,15 +26,26 @@
@interface GRMustacheTemplateDelegateTest : GRMustachePublicAPITest
@end

@interface GRMustacheTemplateDelegateAssistant : NSObject
@interface GRMustacheTemplateDelegateAssistant : NSObject {
NSString *_stringProperty;
}
@property (nonatomic, retain) NSString *stringProperty;
@end

@implementation GRMustacheTemplateDelegateAssistant
@synthesize stringProperty;
@synthesize stringProperty=_stringProperty;
@end

@interface GRMustacheTemplateRecorder : NSObject<GRMustacheTemplateDelegate>
@interface GRMustacheTemplateRecorder : NSObject<GRMustacheTemplateDelegate> {
GRMustacheInvocation *_lastInvocation;
NSUInteger _templateWillRenderCount;
NSUInteger _templateDidRenderCount;
NSUInteger _willRenderReturnValueOfInvocationCount;
NSUInteger _didRenderReturnValueOfInvocationCount;
NSUInteger _nilReturnValueCount;
NSString *_lastUsedValue;
NSString *_lastUsedKey;
}
@property (nonatomic, retain) GRMustacheInvocation *lastInvocation;
@property (nonatomic) NSUInteger templateWillRenderCount;
@property (nonatomic) NSUInteger templateDidRenderCount;
Expand Down
6 changes: 4 additions & 2 deletions src/tests/Public/v4.0/GRMustacheTemplateFromMethodsTest.m
Expand Up @@ -27,12 +27,14 @@
@interface GRMustacheTemplateFromMethodsTest : GRMustachePublicAPITest
@end

@interface GRMustacheTemplateFromMethodsTestSupport: NSObject
@interface GRMustacheTemplateFromMethodsTestSupport: NSObject {
NSString *_stringProperty;
}
@property (nonatomic, retain) NSString *stringProperty;
@end

@implementation GRMustacheTemplateFromMethodsTestSupport
@synthesize stringProperty;
@synthesize stringProperty=_stringProperty;
@end

@interface GRMustacheTemplateFromMethodsTest()
Expand Down
9 changes: 6 additions & 3 deletions src/tests/Public/v4.0/GRMustacheTemplateRenderMethodsTest.m
Expand Up @@ -27,14 +27,17 @@
@interface GRMustacheTemplateRenderMethodsTest : GRMustachePublicAPITest
@end

@interface GRMustacheTemplateRenderMethodsTestSupport: NSObject
@interface GRMustacheTemplateRenderMethodsTestSupport: NSObject {
NSString *_stringProperty;
BOOL _BOOLProperty;
}
@property (nonatomic, retain) NSString *stringProperty;
@property (nonatomic) BOOL BOOLProperty;
@end

@implementation GRMustacheTemplateRenderMethodsTestSupport
@synthesize stringProperty;
@synthesize BOOLProperty;
@synthesize stringProperty=_stringProperty;
@synthesize BOOLProperty=_BOOLProperty;
@end

@interface GRMustacheTemplateRenderMethodsTest()
Expand Down
Expand Up @@ -26,7 +26,10 @@
@interface GRMustacheTemplateRepositoryDataSourceTest : GRMustachePublicAPITest
@end

@interface GRMustacheTemplateRepositoryTestDataSource : NSObject<GRMustacheTemplateRepositoryDataSource>
@interface GRMustacheTemplateRepositoryTestDataSource : NSObject<GRMustacheTemplateRepositoryDataSource> {
NSUInteger _templateIDForNameCount;
NSUInteger _templateStringForTemplateIDCount;
}
@property (nonatomic) NSUInteger templateIDForNameCount;
@property (nonatomic) NSUInteger templateStringForTemplateIDCount;
@end
Expand Down
8 changes: 7 additions & 1 deletion src/tests/Public/v4.1/GRMustacheTemplateDelegate_v4_1_Test.m
Expand Up @@ -26,7 +26,13 @@
@interface GRMustacheTemplateDelegate_v4_1_Test : GRMustachePublicAPITest
@end

@interface GRMustacheTemplateRecorder_v4_1 : NSObject<GRMustacheTemplateDelegate>
@interface GRMustacheTemplateRecorder_v4_1 : NSObject<GRMustacheTemplateDelegate> {
NSUInteger _willRenderReturnValueOfInvocationCount;
NSUInteger _didRenderReturnValueOfInvocationCount;
NSUInteger _willInterpretReturnValueOfInvocationAsCount;
NSUInteger _didInterpretReturnValueOfInvocationAsCount;
GRMustacheInterpretation _lastInterpretation;
}
@property (nonatomic) NSUInteger willRenderReturnValueOfInvocationCount;
@property (nonatomic) NSUInteger didRenderReturnValueOfInvocationCount;
@property (nonatomic) NSUInteger willInterpretReturnValueOfInvocationAsCount;
Expand Down

0 comments on commit b5ff56d

Please sign in to comment.