//
//  main.m
//  RetainCycleWarning
//
//  Created by u on 2015-04-04.
//  Copyright (c) 2015 yes. All rights reserved.
//

#import <Foundation/Foundation.h>
@import XCTest;


@interface Foo : NSObject

typedef void (^SuccessBlock)(CGFloat value);

- (void)setValue:(CGFloat)value
         success:(SuccessBlock)success;
- (void)getValueWithSuccessBlock:(SuccessBlock)success;

@end

@implementation Foo

- (void)setValue:(CGFloat)value
          success:(SuccessBlock)success {
}

- (void)getValueWithSuccessBlock:(SuccessBlock)success {
}

@end



@interface mainTests : XCTestCase

// used in multiple tests
@property (nonatomic, strong) Foo *foo;

@end

@implementation mainTests

- (void)setUp {
    [super setUp];
    self.foo = [Foo new];
}

- (void)tearDown {
    self.foo = nil;
    [super tearDown];
}

- (void)testFoo {
    [self.foo getValueWithSuccessBlock:^(CGFloat value) {
        XCTFail(@"success");
    }];

    [self.foo setValue:1.0
               success:^(CGFloat value) {
                   XCTFail(@"success");
               }];
}

@end



int main(int argc, const char * argv[]) {
    @autoreleasepool {
        // insert code here...
        NSLog(@"Hello, World!");
    }
    return 0;
}
