Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

ARC support in tests.

  • Loading branch information...
commit a82a84550860240ede55e3251da5e2d918de9728 1 parent 311f53e
John Blanco authored
View
2  InnerBand.xcodeproj/project.pbxproj
@@ -90,7 +90,7 @@
FFCC37C81216D25100AAF3BF /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AACBBE490F95108600F1A2B1 /* Foundation.framework */; };
FFCC37CA1216D25100AAF3BF /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FFCC37C91216D25100AAF3BF /* UIKit.framework */; };
FFCC37DF1216D4E000AAF3BF /* libInnerBand.a in Frameworks */ = {isa = PBXBuildFile; fileRef = D2AAC07E0554694100DB518D /* libInnerBand.a */; };
- FFF569361216E4A3007F800F /* GHUnitIPhoneTestMain.m in Sources */ = {isa = PBXBuildFile; fileRef = FFF569321216E4A3007F800F /* GHUnitIPhoneTestMain.m */; };
+ FFF569361216E4A3007F800F /* GHUnitIPhoneTestMain.m in Sources */ = {isa = PBXBuildFile; fileRef = FFF569321216E4A3007F800F /* GHUnitIPhoneTestMain.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
View
14 Tests/MessageTests.m
@@ -59,8 +59,7 @@ - (void)setUp {
}
- (void)tearDown {
- [widget release];
-}
+}
- (void)testListener {
// add listener
@@ -97,16 +96,11 @@ - (void)testMultipleListeners {
}
- (void)testGlobalMessage {
- // another widget
- Widget *widget2 = [[Widget alloc] init];
-
// add listener to this other widget
[IBMessageCenter addMessageListener:ALPHA_MSG source:nil target:self action:@selector(methodToFire)];
// fire global message on original widget!
[widget fireGlobalAlpha];
-
- [widget2 release];
}
- (void)testListenerFiredMultipleTimes {
@@ -193,12 +187,12 @@ - (void)testStringAppenderMessage {
[IBMessageCenter addMessageListener:@"APPEND" source:widget target:self action:@selector(methodToVerifyStringAppender:)];
// dispatch test of nil + ALPHA = ALPHA
- alphaMessage = [[[StringAppenderMessage alloc] initWithName:@"APPEND" string:@"ALPHA" userInfo:[NSDictionary dictionaryWithObject:@"ALPHA" forKey:@"actual"]] autorelease];
+ alphaMessage = [[StringAppenderMessage alloc] initWithName:@"APPEND" string:@"ALPHA" userInfo:[NSDictionary dictionaryWithObject:@"ALPHA" forKey:@"actual"]];
[IBMessageCenter sendMessage:alphaMessage forSource:widget];
// dispatch test of nil + ALPHA + BETA = ALPHABETA
- alphaMessage = [[[StringAppenderMessage alloc] initWithName:nil string:@"ALPHA" userInfo:nil] autorelease];
- betaMessage = [[[StringAppenderMessage alloc] initWithName:nil string:@"BETA" userInfo:nil] autorelease];
+ alphaMessage = [[StringAppenderMessage alloc] initWithName:nil string:@"ALPHA" userInfo:nil];
+ betaMessage = [[StringAppenderMessage alloc] initWithName:nil string:@"BETA" userInfo:nil];
seqMessage = [IBSequencedMessage messageWithName:@"APPEND" userInfo:[NSDictionary dictionaryWithObject:@"ALPHABETA" forKey:@"actual"] sequence:[NSArray arrayWithObjects:alphaMessage, betaMessage, nil]];
[IBMessageCenter sendMessage:seqMessage forSource:widget];
View
6 Tests/StringAppenderMessage.m
@@ -32,12 +32,6 @@ - (id)initWithName:(NSString *)name string:(NSString *)stringToAppend userInfo:(
return self;
}
-- (void)dealloc {
- [_stringToAppend release];
- [_convertedString release];
- [super dealloc];
-}
-
#pragma mark -
- (void)inputData:(NSData *)input {
View
4 Tests/Widget.m
@@ -23,10 +23,6 @@
@implementation Widget
-- (void)dealloc {
- [super dealloc];
-}
-
- (void)fireAlpha {
// dispatch
[IBMessageCenter sendMessageNamed:ALPHA_MSG forSource:self];
Please sign in to comment.
Something went wrong with that request. Please try again.