├── External ├── Cedar-iOS.framework │ ├── Versions │ │ ├── Current │ │ └── A │ │ │ ├── Headers │ │ │ ├── Cedar.h │ │ │ ├── CedarDoubles.h │ │ │ ├── ComparatorsBase.h │ │ │ ├── Cedar-iOS.h │ │ │ ├── CDRColorizedReporter.h │ │ │ ├── CedarComparators.h │ │ │ ├── CedarStringifiers.h │ │ │ ├── CDRExampleReporterViewController.h │ │ │ ├── CDRExampleReporter.h │ │ │ ├── CDRFunctions.h │ │ │ ├── CDRExampleParent.h │ │ │ ├── CDRExampleDetailsViewController.h │ │ │ ├── CDRSpy.h │ │ │ ├── CedarMatchers.h │ │ │ ├── SpecHelper.h │ │ │ ├── CDRSpecFailure.h │ │ │ ├── BeEmpty.h │ │ │ ├── CedarApplicationDelegate.h │ │ │ ├── BeTruthy.h │ │ │ ├── ShouldSyntax.h │ │ │ ├── CDRSharedExampleGroupPool.h │ │ │ ├── StringifiersBase.h │ │ │ ├── CDRExampleBase.h │ │ │ ├── Contain.h │ │ │ ├── BeNil.h │ │ │ ├── CDRSpec.h │ │ │ ├── StringifiersContainer.h │ │ │ ├── Base.h │ │ │ ├── BeSameInstanceAs.h │ │ │ ├── Argument.h │ │ │ ├── BeGreaterThan.h │ │ │ ├── BeLessThan.h │ │ │ ├── BeLTE.h │ │ │ ├── BeGTE.h │ │ │ ├── CompareEqual.h │ │ │ ├── BeInstanceOf.h │ │ │ ├── Equal.h │ │ │ ├── CompareGreaterThan.h │ │ │ ├── BeCloseTo.h │ │ │ ├── RaiseException.h │ │ │ ├── ComparatorsContainer.h │ │ │ ├── ActualValue.h │ │ │ └── HaveReceived.h │ │ │ └── Cedar-iOS │ ├── Headers │ ├── Cedar-iOS │ └── Resources ├── OCMock-iPhone.framework │ ├── Versions │ │ ├── Current │ │ └── A │ │ │ ├── OCMock-iPhone │ │ │ ├── Headers │ │ │ ├── OCMock.h │ │ │ ├── NSNotificationCenter+OCMAdditions.h │ │ │ ├── OCMArg.h │ │ │ ├── OCMockRecorder.h │ │ │ ├── OCMockObject.h │ │ │ └── OCMConstraint.h │ │ │ └── Resources │ │ │ └── License.txt │ ├── Headers │ ├── Resources │ └── OCMock-iPhone └── Expecta │ ├── libExpecta-ios-universal.a │ ├── EXPMatchers+toBeFalsy.h │ ├── EXPMatchers+toBeTruthy.h │ ├── EXPMatchers+toBeLessThan.h │ ├── EXPMatchers+toBeGreaterThan.h │ ├── EXPMatchers+toBeIdenticalTo.h │ ├── EXPMatchers+toBeNil.h │ ├── EXPMatcherHelpers.h │ ├── EXPMatchers+toBeLessThanOrEqualTo.h │ ├── EXPMatchers+toBeKindOf.h │ ├── NSObject+Expecta.h │ ├── EXPMatchers+toBeGreaterThanOrEqualTo.h │ ├── EXPMatchers+toBeSubclassOf.h │ ├── NSValue+Expecta.h │ ├── EXPMatchers+toEqual.h │ ├── EXPMatchers+toBeInstanceOf.h │ ├── EXPMatchers+toContain.h │ ├── EXPMatchers+toBeInTheRangeOf.h │ ├── EXPUnsupportedObject.h │ ├── EXPMatchers.h │ ├── Expecta.h │ ├── LICENSE │ ├── EXPExpect.h │ ├── ExpectaSupport.h │ └── README.md ├── UISpecs ├── en.lproj │ └── InfoPlist.strings ├── Helpers │ ├── FakeCopyingArray.h │ └── FakeCopyingArray.m ├── UISpecs-Prefix.pch ├── main.m ├── UISpecs-Info.plist └── Classes │ └── ASViewController │ └── ASViewControllerSpec.m ├── ASViewControllerExample ├── en.lproj │ └── InfoPlist.strings ├── AppDelegate.h ├── Classes │ ├── ASEColoredViewController.h │ ├── ASFlipViewController.h │ ├── ASViewController │ │ ├── ASViewController.h │ │ └── ASViewController.m │ ├── ASEColoredViewController.m │ └── ASFlipViewController.m ├── ASViewControllerExample-Prefix.pch ├── main.m ├── ASViewControllerExample-Info.plist └── AppDelegate.m ├── .gitignore ├── ASViewControllerExample.xcodeproj ├── project.xcworkspace │ └── contents.xcworkspacedata ├── xcuserdata │ └── lukewar.xcuserdatad │ │ └── xcschemes │ │ ├── ASViewControllerExample.xcscheme │ │ └── UISpecs.xcscheme └── project.pbxproj ├── README.md ├── ASViewController.podspec └── MIT.LICENSE /External/Cedar-iOS.framework/Versions/Current: -------------------------------------------------------------------------------- 1 | A -------------------------------------------------------------------------------- /External/OCMock-iPhone.framework/Versions/Current: -------------------------------------------------------------------------------- 1 | A -------------------------------------------------------------------------------- /External/Cedar-iOS.framework/Headers: -------------------------------------------------------------------------------- 1 | Versions/Current/Headers -------------------------------------------------------------------------------- /External/Cedar-iOS.framework/Cedar-iOS: -------------------------------------------------------------------------------- 1 | Versions/Current/Cedar-iOS -------------------------------------------------------------------------------- /External/Cedar-iOS.framework/Resources: -------------------------------------------------------------------------------- 1 | Versions/Current/Resources -------------------------------------------------------------------------------- /External/OCMock-iPhone.framework/Headers: -------------------------------------------------------------------------------- 1 | Versions/Current/Headers -------------------------------------------------------------------------------- /External/OCMock-iPhone.framework/Resources: -------------------------------------------------------------------------------- 1 | Versions/Current/Resources -------------------------------------------------------------------------------- /External/OCMock-iPhone.framework/OCMock-iPhone: -------------------------------------------------------------------------------- 1 | Versions/Current/OCMock-iPhone -------------------------------------------------------------------------------- /External/Cedar-iOS.framework/Versions/A/Headers/Cedar.h: -------------------------------------------------------------------------------- 1 | #import "CDRFunctions.h" 2 | -------------------------------------------------------------------------------- /UISpecs/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /ASViewControllerExample/en.lproj/InfoPlist.strings: -------------------------------------------------------------------------------- 1 | /* Localized versions of Info.plist keys */ 2 | 3 | -------------------------------------------------------------------------------- /External/Cedar-iOS.framework/Versions/A/Headers/CedarDoubles.h: -------------------------------------------------------------------------------- 1 | #import "CDRSpy.h" 2 | #import "HaveReceived.h" 3 | -------------------------------------------------------------------------------- /External/Cedar-iOS.framework/Versions/A/Headers/ComparatorsBase.h: -------------------------------------------------------------------------------- 1 | #import "CompareEqual.h" 2 | #import "CompareGreaterThan.h" 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ASViewControllerExample.xcodeproj/xcuserdata/lukewar.xcuserdatad 2 | ASViewControllerExample.xcodeproj/project.xcworkspace/xcuserdata 3 | -------------------------------------------------------------------------------- /External/Expecta/libExpecta-ios-universal.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lyric/ASViewController/master/External/Expecta/libExpecta-ios-universal.a -------------------------------------------------------------------------------- /External/Cedar-iOS.framework/Versions/A/Cedar-iOS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lyric/ASViewController/master/External/Cedar-iOS.framework/Versions/A/Cedar-iOS -------------------------------------------------------------------------------- /External/Cedar-iOS.framework/Versions/A/Headers/Cedar-iOS.h: -------------------------------------------------------------------------------- 1 | #import "Cedar.h" 2 | #import "CedarApplicationDelegate.h" 3 | #import "CDRExampleReporterViewController.h" 4 | -------------------------------------------------------------------------------- /External/OCMock-iPhone.framework/Versions/A/OCMock-iPhone: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lyric/ASViewController/master/External/OCMock-iPhone.framework/Versions/A/OCMock-iPhone -------------------------------------------------------------------------------- /External/Cedar-iOS.framework/Versions/A/Headers/CDRColorizedReporter.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CDRDefaultReporter.h" 3 | 4 | @interface CDRColorizedReporter : CDRDefaultReporter 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /External/Cedar-iOS.framework/Versions/A/Headers/CedarComparators.h: -------------------------------------------------------------------------------- 1 | #import "ComparatorsBase.h" 2 | #import "ComparatorsContainer.h" 3 | 4 | #ifdef CEDAR_CUSTOM_COMPARATORS 5 | #import CEDAR_CUSTOM_COMPARATORS 6 | #endif 7 | -------------------------------------------------------------------------------- /External/Cedar-iOS.framework/Versions/A/Headers/CedarStringifiers.h: -------------------------------------------------------------------------------- 1 | #import "StringifiersBase.h" 2 | #import "StringifiersContainer.h" 3 | 4 | #ifdef CEDAR_CUSTOM_STRINGIFIERS 5 | #import CEDAR_CUSTOM_STRINGIFIERS 6 | #endif 7 | -------------------------------------------------------------------------------- /External/Expecta/EXPMatchers+toBeFalsy.h: -------------------------------------------------------------------------------- 1 | // Expecta - EXPMatchers+toBeFalsy.h 2 | // Copyright (c) 2011 Peter Jihoon Kim 3 | // Licensed under the MIT License. 4 | 5 | #import "Expecta.h" 6 | 7 | EXPMatcherInterface(toBeFalsy, (void)); 8 | -------------------------------------------------------------------------------- /External/Expecta/EXPMatchers+toBeTruthy.h: -------------------------------------------------------------------------------- 1 | // Expecta - EXPMatchers+toBeTruthy.h 2 | // Copyright (c) 2011 Peter Jihoon Kim 3 | // Licensed under the MIT License. 4 | 5 | #import "Expecta.h" 6 | 7 | EXPMatcherInterface(toBeTruthy, (void)); 8 | -------------------------------------------------------------------------------- /External/Expecta/EXPMatchers+toBeLessThan.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(_toBeLessThan, (id expected)); 4 | EXPMatcherInterface(toBeLessThan, (id expected)); 5 | 6 | #define toBeLessThan(expected) _toBeLessThan(EXPObjectify((expected))) -------------------------------------------------------------------------------- /External/Cedar-iOS.framework/Versions/A/Headers/CDRExampleReporterViewController.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CDRExampleReporter.h" 3 | 4 | @interface CDRExampleReporterViewController : UINavigationController { 5 | } 6 | 7 | @end 8 | -------------------------------------------------------------------------------- /External/Expecta/EXPMatchers+toBeGreaterThan.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(_toBeGreaterThan, (id expected)); 4 | EXPMatcherInterface(toBeGreaterThan, (id expected)); 5 | 6 | #define toBeGreaterThan(expected) _toBeGreaterThan(EXPObjectify((expected))) -------------------------------------------------------------------------------- /External/Expecta/EXPMatchers+toBeIdenticalTo.h: -------------------------------------------------------------------------------- 1 | // Expecta - EXPMatchers+toBeIdenticalTo.h 2 | // Copyright (c) 2011 Peter Jihoon Kim 3 | // Licensed under the MIT License. 4 | 5 | #import "Expecta.h" 6 | 7 | EXPMatcherInterface(toBeIdenticalTo, (void *expected)); 8 | -------------------------------------------------------------------------------- /ASViewControllerExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /UISpecs/Helpers/FakeCopyingArray.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Lukasz Warchol on 4/25/12. 3 | // 4 | 5 | 6 | #import 7 | 8 | 9 | @interface FakeCopyingArray : NSArray 10 | @property(nonatomic, retain) NSArray *persistentFakeCopy; 11 | @end 12 | -------------------------------------------------------------------------------- /External/Expecta/EXPMatchers+toBeNil.h: -------------------------------------------------------------------------------- 1 | // Expecta - EXPMatchers+toBeNil.h 2 | // Copyright (c) 2011 Peter Jihoon Kim 3 | // Licensed under the MIT License. 4 | 5 | #import "Expecta.h" 6 | 7 | EXPMatcherInterface(toBeNil, (void)); 8 | 9 | #define toBeNull toBeNil 10 | -------------------------------------------------------------------------------- /External/Cedar-iOS.framework/Versions/A/Headers/CDRExampleReporter.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @protocol CDRExampleReporter 4 | 5 | - (void)runWillStartWithGroups:(NSArray *)groups; 6 | - (void)runDidComplete; 7 | - (int)result; 8 | 9 | @end 10 | -------------------------------------------------------------------------------- /External/Expecta/EXPMatcherHelpers.h: -------------------------------------------------------------------------------- 1 | // Expecta - EXPMatcherHelpers.h 2 | // Copyright (c) 2011 Peter Jihoon Kim 3 | // Licensed under the MIT License. 4 | 5 | #import 6 | 7 | BOOL EXPIsValuePointer(NSValue *value); 8 | BOOL EXPIsNumberFloat(NSNumber *number); 9 | -------------------------------------------------------------------------------- /External/Expecta/EXPMatchers+toBeLessThanOrEqualTo.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(_toBeLessThanOrEqualTo, (id expected)); 4 | EXPMatcherInterface(toBeLessThanOrEqualTo, (id expected)); 5 | 6 | #define toBeLessThanOrEqualTo(expected) _toBeLessThanOrEqualTo(EXPObjectify((expected))) -------------------------------------------------------------------------------- /External/Expecta/EXPMatchers+toBeKindOf.h: -------------------------------------------------------------------------------- 1 | // Expecta - EXPMatchers+toBeKindOf.h 2 | // Copyright (c) 2011 Peter Jihoon Kim 3 | // Licensed under the MIT License. 4 | 5 | #import "Expecta.h" 6 | 7 | EXPMatcherInterface(toBeKindOf, (Class expected)); 8 | 9 | #define toBeAKindOf toBeKindOf 10 | -------------------------------------------------------------------------------- /External/Expecta/NSObject+Expecta.h: -------------------------------------------------------------------------------- 1 | // Expecta - NSObject+Expecta.h 2 | // Copyright (c) 2011 Peter Jihoon Kim 3 | // Licensed under the MIT License. 4 | 5 | #import 6 | 7 | @interface NSObject (Expecta) 8 | - (void)failWithException:(NSException *)exception; 9 | @end 10 | -------------------------------------------------------------------------------- /External/Expecta/EXPMatchers+toBeGreaterThanOrEqualTo.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(_toBeGreaterThanOrEqualTo, (id expected)); 4 | EXPMatcherInterface(toBeGreaterThanOrEqualTo, (id expected)); 5 | 6 | #define toBeGreaterThanOrEqualTo(expected) _toBeGreaterThanOrEqualTo(EXPObjectify((expected))) -------------------------------------------------------------------------------- /External/Expecta/EXPMatchers+toBeSubclassOf.h: -------------------------------------------------------------------------------- 1 | // Expecta - EXPMatchers+toBeSubclassOf.h 2 | // Copyright (c) 2011 Peter Jihoon Kim 3 | // Licensed under the MIT License. 4 | 5 | #import "Expecta.h" 6 | 7 | EXPMatcherInterface(toBeSubclassOf, (Class expected)); 8 | 9 | #define toBeASubclassOf toBeSubclassOf 10 | -------------------------------------------------------------------------------- /External/Cedar-iOS.framework/Versions/A/Headers/CDRFunctions.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NSArray *CDRReportersFromEnv(const char*defaultReporterClassName); 4 | 5 | int runSpecs(); 6 | int runAllSpecs() __attribute__((deprecated)); 7 | int runSpecsWithCustomExampleReporters(NSArray *reporters); 8 | NSArray *specClassesToRun(); 9 | -------------------------------------------------------------------------------- /External/Cedar-iOS.framework/Versions/A/Headers/CDRExampleParent.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @protocol CDRExampleParent 4 | 5 | - (BOOL)shouldRun; 6 | 7 | - (void)setUp; 8 | - (void)tearDown; 9 | 10 | @optional 11 | - (BOOL)hasFullText; 12 | - (NSString *)fullText; 13 | - (NSMutableArray *)fullTextInPieces; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /External/Expecta/NSValue+Expecta.h: -------------------------------------------------------------------------------- 1 | // Expecta - NSValue+Expecta.h 2 | // Copyright (c) 2011 Peter Jihoon Kim 3 | // Licensed under the MIT License. 4 | 5 | #import 6 | 7 | @interface NSValue (Expecta) 8 | 9 | - (const char *)_EXP_objCType; 10 | - (void)set_EXP_objCType:(const char *)_EXP_objCType; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /External/Expecta/EXPMatchers+toEqual.h: -------------------------------------------------------------------------------- 1 | // Expecta - EXPMatchers+toEqual.h 2 | // Copyright (c) 2011 Peter Jihoon Kim 3 | // Licensed under the MIT License. 4 | 5 | #import "Expecta.h" 6 | 7 | EXPMatcherInterface(_toEqual, (id expected)); 8 | EXPMatcherInterface(toEqual, (id expected)); // to aid code completion 9 | #define toEqual(expected) _toEqual(EXPObjectify((expected))) 10 | -------------------------------------------------------------------------------- /External/Expecta/EXPMatchers+toBeInstanceOf.h: -------------------------------------------------------------------------------- 1 | // Expecta - EXPMatchers+toBeInstanceOf.h 2 | // Copyright (c) 2011 Peter Jihoon Kim 3 | // Licensed under the MIT License. 4 | 5 | #import "Expecta.h" 6 | 7 | EXPMatcherInterface(toBeInstanceOf, (Class expected)); 8 | 9 | #define toBeAnInstanceOf toBeInstanceOf 10 | #define toBeMemberOf toBeInstanceOf 11 | #define toBeAMemberOf toBeInstanceOf 12 | -------------------------------------------------------------------------------- /External/Expecta/EXPMatchers+toContain.h: -------------------------------------------------------------------------------- 1 | // Expecta - EXPMatchers+toContain.h 2 | // Copyright (c) 2011 Peter Jihoon Kim 3 | // Licensed under the MIT License. 4 | 5 | #import "Expecta.h" 6 | 7 | EXPMatcherInterface(_toContain, (id expected)); 8 | EXPMatcherInterface(toContain, (id expected)); // to aid code completion 9 | #define toContain(expected) _toContain(EXPObjectify((expected))) 10 | -------------------------------------------------------------------------------- /ASViewControllerExample/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // ASViewControllerExample 4 | // 5 | // Created by Lukasz Warchol on 4/30/12. 6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /External/Expecta/EXPMatchers+toBeInTheRangeOf.h: -------------------------------------------------------------------------------- 1 | #import "Expecta.h" 2 | 3 | EXPMatcherInterface(_toBeInTheRangeOf, (id expectedLowerBound, id expectedUpperBound)); 4 | EXPMatcherInterface(toBeInTheRangeOf, (id expectedLowerBound, id expectedUpperBound)); 5 | 6 | #define toBeInTheRangeOf(expectedLowerBound, expectedUpperBound) _toBeInTheRangeOf(EXPObjectify((expectedLowerBound)), EXPObjectify((expectedUpperBound))) -------------------------------------------------------------------------------- /External/Expecta/EXPUnsupportedObject.h: -------------------------------------------------------------------------------- 1 | // Expecta - EXPUnsupportedObject.h 2 | // Copyright (c) 2011 Peter Jihoon Kim 3 | // Licensed under the MIT License. 4 | 5 | #import 6 | 7 | @interface EXPUnsupportedObject : NSObject { 8 | NSString *_type; 9 | } 10 | 11 | @property (nonatomic, retain) NSString *type; 12 | 13 | - (id)initWithType:(NSString *)type; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /UISpecs/UISpecs-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'UISpecs' target in the 'UISpecs' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_3_0 8 | #warning "This project uses features only available in iOS SDK 3.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /ASViewControllerExample/Classes/ASEColoredViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASEColoredViewController.h 3 | // ASViewControllerExample 4 | // 5 | // Created by Lukasz Warchol on 5/1/12. 6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "ASViewController.h" 10 | 11 | @interface ASEColoredViewController : ASViewController 12 | @property(retain) UIColor* viewColor; 13 | @end 14 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ASViewController 2 | ================= 3 | 4 | Ever wanted to have subviewcontrollers managment when supporting pre ios 5 system versions. 5 | Now with ASViewController you can build your can do it. Even you don't need subviewControllers 6 | to be subclasses of ASViewController, it can be standard UIViewController. 7 | 8 | Working on iOS 4.0 and above. 9 | 10 | When running on iOS 5, system methods are used. -------------------------------------------------------------------------------- /External/Cedar-iOS.framework/Versions/A/Headers/CDRExampleDetailsViewController.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class CDRExampleBase; 4 | 5 | @interface CDRExampleDetailsViewController : UIViewController 6 | 7 | @property (nonatomic, assign) UINavigationBar *navigationBar; 8 | @property (nonatomic, assign) UILabel *fullTextLabel, *messageLabel; 9 | 10 | - (id)initWithExample:(CDRExampleBase *)example; 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /ASViewControllerExample/ASViewControllerExample-Prefix.pch: -------------------------------------------------------------------------------- 1 | // 2 | // Prefix header for all source files of the 'ASViewControllerExample' target in the 'ASViewControllerExample' project 3 | // 4 | 5 | #import 6 | 7 | #ifndef __IPHONE_3_0 8 | #warning "This project uses features only available in iOS SDK 3.0 and later." 9 | #endif 10 | 11 | #ifdef __OBJC__ 12 | #import 13 | #import 14 | #endif 15 | -------------------------------------------------------------------------------- /ASViewControllerExample/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // ASViewControllerExample 4 | // 5 | // Created by Lukasz Warchol on 4/30/12. 6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | #import "AppDelegate.h" 12 | 13 | int main(int argc, char *argv[]) 14 | { 15 | @autoreleasepool { 16 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /External/OCMock-iPhone.framework/Versions/A/Headers/OCMock.h: -------------------------------------------------------------------------------- 1 | //--------------------------------------------------------------------------------------- 2 | // $Id$ 3 | // Copyright (c) 2004-2008 by Mulle Kybernetik. See License file for details. 4 | //--------------------------------------------------------------------------------------- 5 | 6 | #import "OCMockObject.h" 7 | #import "OCMockRecorder.h" 8 | #import "OCMConstraint.h" 9 | #import "OCMArg.h" 10 | #import "NSNotificationCenter+OCMAdditions.h" 11 | -------------------------------------------------------------------------------- /UISpecs/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // UISpecs 4 | // 5 | // Created by Lukasz Warchol on 4/30/12. 6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import 10 | #import 11 | 12 | int main(int argc, char *argv[]) { 13 | NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; 14 | 15 | int retVal = UIApplicationMain(argc, argv, nil, @"CedarApplicationDelegate"); 16 | [pool release]; 17 | return retVal; 18 | } 19 | -------------------------------------------------------------------------------- /External/Cedar-iOS.framework/Versions/A/Headers/CDRSpy.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface CDRSpy : NSProxy 4 | 5 | + (void)interceptMessagesForInstance:(id)instance; 6 | 7 | - (NSArray *)sent_messages; 8 | 9 | @end 10 | 11 | namespace Cedar { namespace Doubles { 12 | inline void CDR_spy_on(id instance) { 13 | [CDRSpy interceptMessagesForInstance:instance]; 14 | } 15 | }} 16 | 17 | #ifndef CEDAR_DOUBLES_COMPATIBILITY_MODE 18 | #define spy_on(x) CDR_spy_on((x)) 19 | #endif 20 | -------------------------------------------------------------------------------- /External/Cedar-iOS.framework/Versions/A/Headers/CedarMatchers.h: -------------------------------------------------------------------------------- 1 | // Base 2 | #import "Equal.h" 3 | #import "BeTruthy.h" 4 | #import "BeNil.h" 5 | #import "BeCloseTo.h" 6 | #import "BeSameInstanceAs.h" 7 | #import "BeInstanceOf.h" 8 | #import "BeGreaterThan.h" 9 | #import "BeGTE.h" 10 | #import "BeLessThan.h" 11 | #import "BeLTE.h" 12 | #import "RaiseException.h" 13 | 14 | // Container 15 | #import "BeEmpty.h" 16 | #import "Contain.h" 17 | 18 | #ifdef CEDAR_CUSTOM_MATCHERS 19 | #import CEDAR_CUSTOM_MATCHERS 20 | #endif 21 | -------------------------------------------------------------------------------- /ASViewController.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "ASViewController" 3 | s.summary = "View controllers." 4 | s.homepage = "https://github.com/lukasz-warchol/ASViewController" 5 | s.version = "1.1" 6 | s.license = { :type => 'MIT', :file => 'MIT.LICENSE' } 7 | s.author = { "Lukasz Warchol" => "l@taptera.com" } 8 | s.source = { :git => "git@github.com:Taptera/ASViewController.git", :commit => "v#{s.version}" } 9 | s.platform = :ios 10 | 11 | s.source_files = 'ASViewControllerExample/Classes/**/*.{h,m}' 12 | end 13 | -------------------------------------------------------------------------------- /UISpecs/Helpers/FakeCopyingArray.m: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Lukasz Warchol on 4/25/12. 3 | // 4 | 5 | 6 | #import "FakeCopyingArray.h" 7 | 8 | 9 | @implementation FakeCopyingArray 10 | @synthesize persistentFakeCopy = _persistentFakeCopy; 11 | 12 | 13 | + (id)array { 14 | FakeCopyingArray *array = [[[self alloc] init] autorelease]; 15 | array.persistentFakeCopy = [NSArray array]; 16 | return array; 17 | } 18 | 19 | - (id)copy { 20 | return [self.persistentFakeCopy retain]; 21 | } 22 | 23 | - (void)dealloc { 24 | [_persistentFakeCopy release]; 25 | [super dealloc]; 26 | } 27 | 28 | 29 | @end 30 | -------------------------------------------------------------------------------- /External/Cedar-iOS.framework/Versions/A/Headers/SpecHelper.h: -------------------------------------------------------------------------------- 1 | #import "CDRSpec.h" 2 | #import "CDRSharedExampleGroupPool.h" 3 | #import "CDRExampleParent.h" 4 | 5 | @interface SpecHelper : NSObject { 6 | NSMutableDictionary *sharedExampleContext_, *sharedExampleGroups_; 7 | NSArray *globalBeforeEachClasses_, *globalAfterEachClasses_; 8 | BOOL shouldOnlyRunFocused_; 9 | } 10 | 11 | @property (nonatomic, retain, readonly) NSMutableDictionary *sharedExampleContext; 12 | @property (nonatomic, retain) NSArray *globalBeforeEachClasses, *globalAfterEachClasses; 13 | 14 | @property (nonatomic, assign) BOOL shouldOnlyRunFocused; 15 | 16 | + (SpecHelper *)specHelper; 17 | 18 | @end 19 | -------------------------------------------------------------------------------- /External/OCMock-iPhone.framework/Versions/A/Headers/NSNotificationCenter+OCMAdditions.h: -------------------------------------------------------------------------------- 1 | //--------------------------------------------------------------------------------------- 2 | // $Id: NSNotificationCenter+OCMAdditions.h 57 2010-07-19 06:14:27Z erik $ 3 | // Copyright (c) 2009 by Mulle Kybernetik. See License file for details. 4 | //--------------------------------------------------------------------------------------- 5 | 6 | #import 7 | 8 | @class OCMockObserver; 9 | 10 | 11 | @interface NSNotificationCenter(OCMAdditions) 12 | 13 | - (void)addMockObserver:(OCMockObserver *)notificationObserver name:(NSString *)notificationName object:(id)notificationSender; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /External/Expecta/EXPMatchers.h: -------------------------------------------------------------------------------- 1 | // Expecta - EXPMatchers.h 2 | // Copyright (c) 2011 Peter Jihoon Kim 3 | // Licensed under the MIT License. 4 | 5 | #import "EXPMatchers+toBeNil.h" 6 | #import "EXPMatchers+toEqual.h" 7 | #import "EXPMatchers+toBeInstanceOf.h" 8 | #import "EXPMatchers+toBeKindOf.h" 9 | #import "EXPMatchers+toBeSubclassOf.h" 10 | #import "EXPMatchers+toBeTruthy.h" 11 | #import "EXPMatchers+toBeFalsy.h" 12 | #import "EXPMatchers+toContain.h" 13 | #import "EXPMatchers+toBeIdenticalTo.h" 14 | #import "EXPMatchers+toBeGreaterThan.h" 15 | #import "EXPMatchers+toBeGreaterThanOrEqualTo.h" 16 | #import "EXPMatchers+toBeLessThan.h" 17 | #import "EXPMatchers+toBeLessThanOrEqualTo.h" 18 | #import "EXPMatchers+toBeInTheRangeOf.h" 19 | -------------------------------------------------------------------------------- /ASViewControllerExample/Classes/ASFlipViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ASFlipViewController.h 3 | // ASViewControllerExample 4 | // 5 | // Created by Lukasz Warchol on 5/1/12. 6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "ASViewController.h" 10 | 11 | @interface ASFlipViewController : ASViewController 12 | @property (nonatomic, assign) UIViewController* currentViewController; 13 | @property (nonatomic, assign) NSUInteger currentIndex; 14 | 15 | @property (nonatomic, copy) NSArray* viewControllers; 16 | 17 | - (void) switchToViewControllerAtIndex:(NSUInteger)index animated:(BOOL)animated; 18 | - (void) switchToViewController:(UIViewController*)controller animated:(BOOL)animated; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /ASViewControllerExample/Classes/ASViewController/ASViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Lukasz Warchol on 11/21/11. 3 | // 4 | 5 | #import 6 | 7 | @interface ASViewController : UIViewController 8 | 9 | // This is called only pre iOS 5. With this callback user can determine weather 10 | // view controller lifecycle callback (like viewWillAppear: or willRotateToInterfaceOrientation:duration:) 11 | // should be forwarded to child view controller. 12 | // Default implementation of this method tries to determine that basing on weather this child view controller's 13 | // view is visible from parent view controller's view. View hierarchy is revised. 14 | - (BOOL)shouldForwardCallbackToChildViewController:(UIViewController *)childViewController; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /External/Cedar-iOS.framework/Versions/A/Headers/CDRSpecFailure.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface CDRSpecFailure : NSException { 4 | NSString *fileName_; 5 | int lineNumber_; 6 | } 7 | 8 | @property (nonatomic, retain, readonly) NSString *fileName; 9 | @property (nonatomic, assign, readonly) int lineNumber; 10 | 11 | + (id)specFailureWithReason:(NSString *)reason; 12 | + (id)specFailureWithReason:(NSString *)reason fileName:(NSString *)fileName lineNumber:(int)lineNumber; 13 | + (id)specFailureWithRaisedObject:(NSObject *)object; 14 | 15 | - (id)initWithReason:(NSString *)reason; 16 | - (id)initWithReason:(NSString *)reason fileName:(NSString *)fileName lineNumber:(int)lineNumber; 17 | - (id)initWithRaisedObject:(NSObject *)object; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /ASViewControllerExample/Classes/ASEColoredViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ASEColoredViewController.m 3 | // ASViewControllerExample 4 | // 5 | // Created by Lukasz Warchol on 5/1/12. 6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "ASEColoredViewController.h" 10 | 11 | @interface ASEColoredViewController () 12 | 13 | @end 14 | 15 | @implementation ASEColoredViewController 16 | @synthesize viewColor = _viewColor; 17 | 18 | - (void)dealloc 19 | { 20 | [_viewColor release]; 21 | [super dealloc]; 22 | } 23 | 24 | - (void)viewDidLoad 25 | { 26 | [super viewDidLoad]; 27 | self.view.backgroundColor = self.viewColor; 28 | } 29 | 30 | - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 31 | { 32 | return (interfaceOrientation == UIInterfaceOrientationPortrait); 33 | } 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /External/Cedar-iOS.framework/Versions/A/Headers/BeEmpty.h: -------------------------------------------------------------------------------- 1 | #import "Base.h" 2 | 3 | namespace Cedar { namespace Matchers { 4 | class BeEmpty : public Base<> { 5 | private: 6 | BeEmpty & operator=(const BeEmpty &); 7 | 8 | public: 9 | inline BeEmpty() : Base<>() {} 10 | inline ~BeEmpty() {} 11 | // Allow default copy ctor. 12 | 13 | inline const BeEmpty & operator()() const { return *this; } 14 | 15 | template 16 | bool matches(const U &) const; 17 | 18 | protected: 19 | inline /*virtual*/ NSString * failure_message_end() const { return @"be empty"; } 20 | }; 21 | 22 | static const BeEmpty be_empty = BeEmpty(); 23 | 24 | #pragma mark Generic 25 | template 26 | bool BeEmpty::matches(const U & actualValue) const { 27 | return Comparators::compare_empty(actualValue); 28 | } 29 | }} 30 | -------------------------------------------------------------------------------- /External/Cedar-iOS.framework/Versions/A/Headers/CedarApplicationDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | int runSpecsWithinUIApplication(); 4 | void exitWithStatusFromUIApplication(int status); 5 | 6 | @class CDRExampleReporterViewController; 7 | 8 | // In some cases CDRIPhoneOTestRunner needs to spin up an instance of Cedar app. 9 | // It appears that SenTestingKit fails to start up the test when CedarApplicationDelegate 10 | // is used. Solution is to use a subclass of UIApplicaton. 11 | @interface CedarApplication : UIApplication { 12 | UIWindow *window_; 13 | CDRExampleReporterViewController *viewController_; 14 | } 15 | @end 16 | 17 | // Needed for backwards compatibility with existing projects using CedarApplicationDelegate 18 | @interface CedarApplicationDelegate : NSObject { 19 | UIWindow *window_; 20 | CDRExampleReporterViewController *viewController_; 21 | } 22 | @end 23 | -------------------------------------------------------------------------------- /External/Cedar-iOS.framework/Versions/A/Headers/BeTruthy.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Base.h" 3 | 4 | namespace Cedar { namespace Matchers { 5 | class BeTruthy : public Base<> { 6 | private: 7 | BeTruthy & operator=(const BeTruthy &); 8 | 9 | public: 10 | inline BeTruthy() : Base<>() {} 11 | inline ~BeTruthy() {} 12 | // Allow default copy ctor. 13 | 14 | inline const BeTruthy & operator()() const { return *this; } 15 | 16 | template 17 | bool matches(const U &) const; 18 | 19 | protected: 20 | inline /*virtual*/ NSString * failure_message_end() const { return @"evaluate to true"; } 21 | }; 22 | 23 | static const BeTruthy be_truthy = BeTruthy(); 24 | 25 | #pragma mark Generic 26 | template 27 | bool BeTruthy::matches(const U & actualValue) const { 28 | return !!actualValue; 29 | } 30 | 31 | }} 32 | -------------------------------------------------------------------------------- /External/Expecta/Expecta.h: -------------------------------------------------------------------------------- 1 | // Expecta - Expecta.h 2 | // Copyright (c) 2011 Peter Jihoon Kim 3 | // Licensed under the MIT License. 4 | 5 | #import 6 | #import "ExpectaSupport.h" 7 | 8 | #define EXPObjectify(value) _EXPObjectify(@encode(__typeof__((value))), (value)) 9 | 10 | #define EXP_expect(actual) _EXP_expect(self, __LINE__, __FILE__, ^id{ return EXPObjectify((actual)); }) 11 | 12 | #define EXPMatcherInterface(matcherName, matcherArguments) _EXPMatcherInterface(matcherName, matcherArguments) 13 | #define EXPMatcherImplementationBegin(matcherName, matcherArguments) _EXPMatcherImplementationBegin(matcherName, matcherArguments) 14 | #define EXPMatcherImplementationEnd _EXPMatcherImplementationEnd 15 | 16 | #import "EXPMatchers.h" 17 | 18 | #ifdef EXP_SHORTHAND 19 | # define expect(actual) EXP_expect((actual)) 20 | #endif 21 | 22 | @interface Expecta : NSObject 23 | 24 | + (NSTimeInterval)asynchronousTestTimeout; 25 | + (void)setAsynchronousTestTimeout:(NSTimeInterval)timeout; 26 | 27 | @end 28 | -------------------------------------------------------------------------------- /External/OCMock-iPhone.framework/Versions/A/Resources/License.txt: -------------------------------------------------------------------------------- 1 | 2 | Copyright (c) 2004-2010 by Mulle Kybernetik. All rights reserved. 3 | 4 | Permission to use, copy, modify and distribute this software and its documentation 5 | is hereby granted, provided that both the copyright notice and this permission 6 | notice appear in all copies of the software, derivative works or modified versions, 7 | and any portions thereof, and that both notices appear in supporting documentation, 8 | and that credit is given to Mulle Kybernetik in all documents and publicity 9 | pertaining to direct or indirect use of this code or its derivatives. 10 | 11 | THIS IS EXPERIMENTAL SOFTWARE AND IT IS KNOWN TO HAVE BUGS, SOME OF WHICH MAY HAVE 12 | SERIOUS CONSEQUENCES. THE COPYRIGHT HOLDER ALLOWS FREE USE OF THIS SOFTWARE IN ITS 13 | "AS IS" CONDITION. THE COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY OF ANY KIND FOR ANY 14 | DAMAGES WHATSOEVER RESULTING DIRECTLY OR INDIRECTLY FROM THE USE OF THIS SOFTWARE 15 | OR OF ANY DERIVATIVE WORK. -------------------------------------------------------------------------------- /External/OCMock-iPhone.framework/Versions/A/Headers/OCMArg.h: -------------------------------------------------------------------------------- 1 | //--------------------------------------------------------------------------------------- 2 | // $Id: OCMArg.h 65 2010-07-28 01:49:42Z erik $ 3 | // Copyright (c) 2009-2010 by Mulle Kybernetik. See License file for details. 4 | //--------------------------------------------------------------------------------------- 5 | 6 | #import 7 | 8 | @interface OCMArg : NSObject 9 | 10 | // constraining arguments 11 | 12 | + (id)any; 13 | + (void *)anyPointer; 14 | + (id)isNil; 15 | + (id)isNotNil; 16 | + (id)isNotEqual:(id)value; 17 | + (id)checkWithSelector:(SEL)selector onObject:(id)anObject; 18 | #if NS_BLOCKS_AVAILABLE 19 | + (id)checkWithBlock:(BOOL (^)(id))block; 20 | #endif 21 | 22 | // manipulating arguments 23 | 24 | + (id *)setTo:(id)value; 25 | 26 | // internal use only 27 | 28 | + (id)resolveSpecialValues:(NSValue *)value; 29 | 30 | @end 31 | 32 | #define OCMOCK_ANY [OCMArg any] 33 | #define OCMOCK_VALUE(variable) [NSValue value:&variable withObjCType:@encode(__typeof__(variable))] 34 | -------------------------------------------------------------------------------- /External/Cedar-iOS.framework/Versions/A/Headers/ShouldSyntax.h: -------------------------------------------------------------------------------- 1 | #import "ActualValue.h" 2 | 3 | namespace Cedar { namespace Matchers { 4 | 5 | struct ActualValueMarker { 6 | const char *fileName; 7 | int lineNumber; 8 | }; 9 | 10 | template 11 | const ActualValue operator,(const T & actualValue, const ActualValueMarker & marker) { 12 | return ActualValue(marker.fileName, marker.lineNumber, actualValue); 13 | } 14 | 15 | template 16 | const ActualValueMatchProxy operator,(const ActualValue & actualValue, bool negate) { 17 | return negate ? actualValue.to_not : actualValue.to; 18 | } 19 | 20 | template 21 | void operator,(const ActualValueMatchProxy & matchProxy, const MatcherType & matcher) { 22 | matchProxy(matcher); 23 | } 24 | 25 | }} 26 | 27 | #ifndef CEDAR_MATCHERS_DISALLOW_SHOULD 28 | #define should ,(ActualValueMarker){__FILE__, __LINE__},false, 29 | #define should_not ,(ActualValueMarker){__FILE__, __LINE__},true, 30 | #endif 31 | -------------------------------------------------------------------------------- /MIT.LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012 Lukasz Warchol 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining 4 | a copy of this software and associated documentation files (the 5 | "Software"), to deal in the Software without restriction, including 6 | without limitation the rights to use, copy, modify, merge, publish, 7 | distribute, sublicense, and/or sell copies of the Software, and to 8 | permit persons to whom the Software is furnished to do so, subject to 9 | the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be 12 | included in all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /External/Expecta/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2011 Peter Jihoon Kim 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in 11 | all copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /External/OCMock-iPhone.framework/Versions/A/Headers/OCMockRecorder.h: -------------------------------------------------------------------------------- 1 | //--------------------------------------------------------------------------------------- 2 | // $Id: OCMockRecorder.h 68 2010-08-20 13:20:52Z erik $ 3 | // Copyright (c) 2004-2010 by Mulle Kybernetik. See License file for details. 4 | //--------------------------------------------------------------------------------------- 5 | 6 | #import 7 | 8 | @interface OCMockRecorder : NSProxy 9 | { 10 | id signatureResolver; 11 | NSInvocation *recordedInvocation; 12 | NSMutableArray *invocationHandlers; 13 | } 14 | 15 | - (id)initWithSignatureResolver:(id)anObject; 16 | 17 | - (BOOL)matchesInvocation:(NSInvocation *)anInvocation; 18 | - (void)releaseInvocation; 19 | 20 | - (id)andReturn:(id)anObject; 21 | - (id)andReturnValue:(NSValue *)aValue; 22 | - (id)andThrow:(NSException *)anException; 23 | - (id)andPost:(NSNotification *)aNotification; 24 | - (id)andCall:(SEL)selector onObject:(id)anObject; 25 | #if NS_BLOCKS_AVAILABLE 26 | - (id)andDo:(void (^)(NSInvocation *))block; 27 | #endif 28 | - (id)andForwardToRealObject; 29 | 30 | - (NSArray *)invocationHandlers; 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /External/Cedar-iOS.framework/Versions/A/Headers/CDRSharedExampleGroupPool.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @protocol CDRSharedExampleGroupPool 4 | @end 5 | 6 | typedef void (^CDRSharedExampleGroupBlock)(NSDictionary *); 7 | 8 | #ifdef __cplusplus 9 | extern "C" { 10 | #endif 11 | void sharedExamplesFor(NSString *, CDRSharedExampleGroupBlock); 12 | void itShouldBehaveLike(NSString *); 13 | #ifdef __cplusplus 14 | } 15 | #endif 16 | 17 | @interface CDRSharedExampleGroupPool : NSObject 18 | @end 19 | 20 | @interface CDRSharedExampleGroupPool (SharedExampleGroupDeclaration) 21 | - (void)declareSharedExampleGroups; 22 | @end 23 | 24 | #define SHARED_EXAMPLE_GROUPS_BEGIN(name) \ 25 | @interface SharedExampleGroupPoolFor##name : CDRSharedExampleGroupPool \ 26 | @end \ 27 | @implementation SharedExampleGroupPoolFor##name \ 28 | - (void)declareSharedExampleGroups { 29 | 30 | #define SHARED_EXAMPLE_GROUPS_END \ 31 | } \ 32 | @end 33 | -------------------------------------------------------------------------------- /External/Cedar-iOS.framework/Versions/A/Headers/StringifiersBase.h: -------------------------------------------------------------------------------- 1 | #import 2 | #include 3 | 4 | namespace Cedar { namespace Matchers { namespace Stringifiers { 5 | template 6 | NSString * string_for(const U & value) { 7 | if (0 == strncmp(@encode(U), "@", 1)) { 8 | NSValue *valueId = [NSValue value:&value withObjCType:@encode(id)]; 9 | return [[valueId nonretainedObjectValue] description]; 10 | } else { 11 | std::stringstream temp; 12 | temp << value; 13 | return [NSString stringWithCString:temp.str().c_str() encoding:NSUTF8StringEncoding]; 14 | } 15 | } 16 | 17 | inline NSString * string_for(const char value) { 18 | return string_for(static_cast(value)); 19 | } 20 | 21 | inline NSString * string_for(const Class & value) { 22 | return NSStringFromClass(value); 23 | } 24 | 25 | inline NSString * string_for(const BOOL value) { 26 | return value ? @"YES" : @"NO"; 27 | } 28 | 29 | inline NSString * string_for(NSNumber * const value) { 30 | return string_for([value floatValue]); 31 | } 32 | }}} 33 | -------------------------------------------------------------------------------- /External/Cedar-iOS.framework/Versions/A/Headers/CDRExampleBase.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CDRExampleParent.h" 3 | 4 | @protocol CDRExampleReporter; 5 | 6 | typedef void (^CDRSpecBlock)(void); 7 | 8 | enum CDRExampleState { 9 | CDRExampleStateIncomplete = 0x00, 10 | CDRExampleStateSkipped = 0x01, 11 | CDRExampleStatePassed = 0x03, 12 | CDRExampleStatePending = 0x07, 13 | CDRExampleStateFailed = 0x0F, 14 | CDRExampleStateError = 0x1F 15 | }; 16 | typedef enum CDRExampleState CDRExampleState; 17 | 18 | @interface CDRExampleBase : NSObject { 19 | NSString *text_; 20 | id parent_; 21 | BOOL focused_; 22 | } 23 | 24 | @property (nonatomic, readonly) NSString *text; 25 | @property (nonatomic, assign) id parent; 26 | @property (nonatomic, assign, getter=isFocused) BOOL focused; 27 | 28 | - (id)initWithText:(NSString *)text; 29 | 30 | - (void)run; 31 | - (BOOL)shouldRun; 32 | 33 | - (BOOL)hasChildren; 34 | - (BOOL)hasFocusedExamples; 35 | 36 | - (NSString *)message; 37 | - (NSString *)fullText; 38 | - (NSMutableArray *)fullTextInPieces; 39 | @end 40 | 41 | @interface CDRExampleBase (RunReporting) 42 | - (CDRExampleState)state; 43 | - (float)progress; 44 | @end 45 | -------------------------------------------------------------------------------- /External/OCMock-iPhone.framework/Versions/A/Headers/OCMockObject.h: -------------------------------------------------------------------------------- 1 | //--------------------------------------------------------------------------------------- 2 | // $Id: OCMockObject.h 69 2010-08-20 16:05:58Z erik $ 3 | // Copyright (c) 2004-2008 by Mulle Kybernetik. See License file for details. 4 | //--------------------------------------------------------------------------------------- 5 | 6 | #import 7 | 8 | @interface OCMockObject : NSProxy 9 | { 10 | BOOL isNice; 11 | BOOL expectationOrderMatters; 12 | NSMutableArray *recorders; 13 | NSMutableArray *expectations; 14 | NSMutableArray *rejections; 15 | NSMutableArray *exceptions; 16 | } 17 | 18 | + (id)mockForClass:(Class)aClass; 19 | + (id)mockForProtocol:(Protocol *)aProtocol; 20 | + (id)partialMockForObject:(NSObject *)anObject; 21 | 22 | + (id)niceMockForClass:(Class)aClass; 23 | + (id)niceMockForProtocol:(Protocol *)aProtocol; 24 | 25 | + (id)observerMock; 26 | 27 | - (id)init; 28 | 29 | - (void)setExpectationOrderMatters:(BOOL)flag; 30 | 31 | - (id)stub; 32 | - (id)expect; 33 | - (id)reject; 34 | 35 | - (void)verify; 36 | 37 | // internal use only 38 | 39 | - (id)getNewRecorder; 40 | - (BOOL)handleInvocation:(NSInvocation *)anInvocation; 41 | - (void)handleUnRecordedInvocation:(NSInvocation *)anInvocation; 42 | 43 | @end 44 | -------------------------------------------------------------------------------- /External/Cedar-iOS.framework/Versions/A/Headers/Contain.h: -------------------------------------------------------------------------------- 1 | #import "Base.h" 2 | 3 | namespace Cedar { namespace Matchers { 4 | template 5 | class Contain : public Base<> { 6 | private: 7 | Contain & operator=(const Contain &); 8 | 9 | public: 10 | explicit Contain(const T & element); 11 | ~Contain(); 12 | // Allow default copy ctor. 13 | 14 | template 15 | bool matches(const U &) const; 16 | 17 | protected: 18 | virtual NSString * failure_message_end() const; 19 | 20 | private: 21 | const T & element_; 22 | }; 23 | 24 | template 25 | inline Contain contain(const T & element) { 26 | return Contain(element); 27 | } 28 | 29 | template 30 | inline Contain::Contain(const T & element) 31 | : Base<>(), element_(element) { 32 | } 33 | 34 | template 35 | Contain::~Contain() { 36 | } 37 | 38 | template 39 | inline /*virtual*/ NSString * Contain::failure_message_end() const { 40 | return [NSString stringWithFormat:@"contain <%@>", Stringifiers::string_for(element_)]; 41 | } 42 | 43 | #pragma mark Generic 44 | template template 45 | bool Contain::matches(const U & actualValue) const { 46 | return Comparators::compare_contains(actualValue, element_); 47 | } 48 | }} 49 | -------------------------------------------------------------------------------- /UISpecs/UISpecs-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | pl.way-out.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /ASViewControllerExample/ASViewControllerExample-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | ${PRODUCT_NAME} 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | pl.way-out.${PRODUCT_NAME:rfc1034identifier} 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | ${PRODUCT_NAME} 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | 1.0 25 | LSRequiresIPhoneOS 26 | 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /External/Expecta/EXPExpect.h: -------------------------------------------------------------------------------- 1 | // Expecta - EXPExpect.h 2 | // Copyright (c) 2011 Peter Jihoon Kim 3 | // Licensed under the MIT License. 4 | 5 | #import 6 | 7 | typedef id (^EXPIdBlock)(); 8 | typedef BOOL (^EXPBoolBlock)(); 9 | typedef NSString *(^EXPStringBlock)(); 10 | 11 | @interface EXPExpect : NSObject { 12 | EXPIdBlock _actualBlock; 13 | id _testCase; 14 | int _lineNumber; 15 | char *_fileName; 16 | BOOL _negative; 17 | BOOL _asynchronous; 18 | 19 | EXPBoolBlock _prerequisiteBlock; 20 | EXPBoolBlock _matchBlock; 21 | EXPStringBlock _failureMessageForToBlock; 22 | EXPStringBlock _failureMessageForNotToBlock; 23 | } 24 | 25 | @property(nonatomic, copy) EXPIdBlock actualBlock; 26 | @property(nonatomic, readonly) id actual; 27 | @property(nonatomic, assign) id testCase; 28 | @property(nonatomic) int lineNumber; 29 | @property(nonatomic) char *fileName; 30 | @property(nonatomic) BOOL negative; 31 | @property(nonatomic) BOOL asynchronous; 32 | 33 | @property(nonatomic, readonly) EXPExpect *Not; 34 | @property(nonatomic, readonly) EXPExpect *isGoing; 35 | @property(nonatomic, readonly) EXPExpect *isNotGoing; 36 | 37 | @property(nonatomic, copy) EXPBoolBlock prerequisiteBlock; 38 | @property(nonatomic, copy) EXPBoolBlock matchBlock; 39 | @property(nonatomic, copy) EXPStringBlock failureMessageForToBlock; 40 | @property(nonatomic, copy) EXPStringBlock failureMessageForNotToBlock; 41 | 42 | - (id)initWithActualBlock:(id)actualBlock testCase:(id)testCase lineNumber:(int)lineNumber fileName:(char *)fileName; 43 | + (EXPExpect *)expectWithActualBlock:(id)actualBlock testCase:(id)testCase lineNumber:(int)lineNumber fileName:(char *)fileName; 44 | 45 | - (void)applyMatcher:(NSObject **)actual; 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /External/OCMock-iPhone.framework/Versions/A/Headers/OCMConstraint.h: -------------------------------------------------------------------------------- 1 | //--------------------------------------------------------------------------------------- 2 | // $Id: OCMConstraint.h 57 2010-07-19 06:14:27Z erik $ 3 | // Copyright (c) 2007-2010 by Mulle Kybernetik. See License file for details. 4 | //--------------------------------------------------------------------------------------- 5 | 6 | #import 7 | 8 | 9 | @interface OCMConstraint : NSObject 10 | 11 | + (id)constraint; 12 | - (BOOL)evaluate:(id)value; 13 | 14 | // if you are looking for any, isNil, etc, they have moved to OCMArg 15 | 16 | // try to use [OCMArg checkWith...] instead of the constraintWith... methods below 17 | 18 | + (id)constraintWithSelector:(SEL)aSelector onObject:(id)anObject; 19 | + (id)constraintWithSelector:(SEL)aSelector onObject:(id)anObject withValue:(id)aValue; 20 | 21 | 22 | @end 23 | 24 | @interface OCMAnyConstraint : OCMConstraint 25 | @end 26 | 27 | @interface OCMIsNilConstraint : OCMConstraint 28 | @end 29 | 30 | @interface OCMIsNotNilConstraint : OCMConstraint 31 | @end 32 | 33 | @interface OCMIsNotEqualConstraint : OCMConstraint 34 | { 35 | @public 36 | id testValue; 37 | } 38 | 39 | @end 40 | 41 | @interface OCMInvocationConstraint : OCMConstraint 42 | { 43 | @public 44 | NSInvocation *invocation; 45 | } 46 | 47 | @end 48 | 49 | #if NS_BLOCKS_AVAILABLE 50 | 51 | @interface OCMBlockConstraint : OCMConstraint 52 | { 53 | BOOL (^block)(id); 54 | } 55 | 56 | - (id)initWithConstraintBlock:(BOOL (^)(id))block; 57 | 58 | @end 59 | 60 | #endif 61 | 62 | 63 | #define CONSTRAINT(aSelector) [OCMConstraint constraintWithSelector:aSelector onObject:self] 64 | #define CONSTRAINTV(aSelector, aValue) [OCMConstraint constraintWithSelector:aSelector onObject:self withValue:(aValue)] 65 | -------------------------------------------------------------------------------- /External/Cedar-iOS.framework/Versions/A/Headers/BeNil.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Base.h" 3 | #import "CDRSpecFailure.h" 4 | 5 | #include 6 | 7 | namespace Cedar { namespace Matchers { 8 | struct BeNilMessageBuilder { 9 | template 10 | static NSString * string_for_actual_value(const U & value) { 11 | throw std::logic_error("Should never generate a failure message for a nil comparison to non-pointer type."); 12 | } 13 | 14 | template 15 | static NSString * string_for_actual_value(U * const & value) { 16 | return value ? [NSString stringWithFormat:@"%p", value] : @"nil"; 17 | } 18 | }; 19 | 20 | class BeNil : public Base { 21 | private: 22 | BeNil & operator=(const BeNil &); 23 | 24 | public: 25 | inline BeNil() : Base() {} 26 | inline ~BeNil() {} 27 | // Allow default copy ctor. 28 | 29 | inline const BeNil & operator()() const { return *this; } 30 | 31 | template 32 | bool matches(const U &) const; 33 | 34 | template 35 | bool matches(U * const &) const; 36 | 37 | protected: 38 | inline /*virtual*/ NSString * failure_message_end() const { return @"be nil"; } 39 | }; 40 | 41 | static const BeNil be_nil = BeNil(); 42 | 43 | #pragma mark Generic 44 | template 45 | bool BeNil::matches(const U & actualValue) const { 46 | [[CDRSpecFailure specFailureWithReason:@"Attempt to compare non-pointer type to nil"] raise]; 47 | return NO; 48 | } 49 | 50 | template 51 | bool BeNil::matches(U * const & actualValue) const { 52 | return !actualValue; 53 | } 54 | 55 | }} 56 | -------------------------------------------------------------------------------- /External/Cedar-iOS.framework/Versions/A/Headers/CDRSpec.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CDRExampleBase.h" 3 | 4 | @protocol CDRExampleReporter; 5 | @class CDRExampleGroup, CDRExample, SpecHelper; 6 | 7 | @protocol CDRSpec 8 | @end 9 | 10 | extern const CDRSpecBlock PENDING; 11 | 12 | #ifdef __cplusplus 13 | extern "C" { 14 | #endif 15 | void beforeEach(CDRSpecBlock); 16 | void afterEach(CDRSpecBlock); 17 | 18 | CDRExampleGroup * describe(NSString *, CDRSpecBlock); 19 | CDRExampleGroup * context(NSString *, CDRSpecBlock); 20 | CDRExample * it(NSString *, CDRSpecBlock); 21 | 22 | CDRExampleGroup * xcontext(NSString *, CDRSpecBlock); 23 | CDRExampleGroup * xdescribe(NSString *, CDRSpecBlock); 24 | CDRExample * xit(NSString *, CDRSpecBlock); 25 | 26 | CDRExampleGroup * fdescribe(NSString *, CDRSpecBlock); 27 | CDRExampleGroup * fcontext(NSString *, CDRSpecBlock); 28 | CDRExample * fit(NSString *, CDRSpecBlock); 29 | 30 | void fail(NSString *); 31 | #ifdef __cplusplus 32 | } 33 | 34 | #import "ActualValue.h" 35 | #import "ShouldSyntax.h" 36 | #import "CedarComparators.h" 37 | #import "CedarMatchers.h" 38 | #import "CedarDoubles.h" 39 | 40 | #endif // __cplusplus 41 | 42 | @interface CDRSpec : NSObject { 43 | CDRExampleGroup *rootGroup_; 44 | CDRExampleGroup *currentGroup_; 45 | } 46 | 47 | @property (nonatomic, retain) CDRExampleGroup *currentGroup, *rootGroup; 48 | - (void)defineBehaviors; 49 | @end 50 | 51 | @interface CDRSpec (SpecDeclaration) 52 | - (void)declareBehaviors; 53 | @end 54 | 55 | #define SPEC_BEGIN(name) \ 56 | @interface name : CDRSpec \ 57 | @end \ 58 | @implementation name \ 59 | - (void)declareBehaviors { 60 | 61 | #define SPEC_END \ 62 | } \ 63 | @end 64 | -------------------------------------------------------------------------------- /External/Cedar-iOS.framework/Versions/A/Headers/StringifiersContainer.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import 4 | 5 | namespace Cedar { namespace Matchers { namespace Stringifiers { 6 | namespace { 7 | template 8 | NSString * comma_and_newline_delimited_list(const Container & container) { 9 | NSMutableString *result = [NSMutableString string]; 10 | bool first = true; 11 | for (typename Container::const_iterator it = container.begin(); it != container.end(); ++it, first = false) { 12 | if (!first) { 13 | [result appendString:@","]; 14 | } 15 | [result appendString:[NSString stringWithFormat:@"\n %@", string_for(*it)]]; 16 | } 17 | return result; 18 | } 19 | } 20 | 21 | template 22 | NSString * string_for(const typename std::vector & container) { 23 | return [NSString stringWithFormat:@"(%@\n)", comma_and_newline_delimited_list(container)]; 24 | } 25 | 26 | template 27 | NSString * string_for(const typename std::map & container) { 28 | NSMutableString *result = [NSMutableString stringWithString:@"{"]; 29 | 30 | for (typename std::map::const_iterator it = container.begin(); it != container.end(); ++it) { 31 | [result appendString:[NSString stringWithFormat:@"\n %@ = %@;", string_for(it->first), string_for(it->second)]]; 32 | } 33 | [result appendString:@"\n}"]; 34 | return result; 35 | } 36 | 37 | template 38 | NSString * string_for(const typename std::set & container) { 39 | return [NSString stringWithFormat:@"{(%@\n)}", comma_and_newline_delimited_list(container)]; 40 | } 41 | }}} 42 | -------------------------------------------------------------------------------- /External/Cedar-iOS.framework/Versions/A/Headers/Base.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | #import "CedarStringifiers.h" 5 | 6 | namespace Cedar { namespace Matchers { 7 | struct BaseMessageBuilder { 8 | template 9 | static NSString * string_for_actual_value(const U & value) { 10 | return Stringifiers::string_for(value); 11 | } 12 | }; 13 | 14 | /** 15 | * Basic functionality for all matchers. Meant to be used as a convenience base class for 16 | * matcher classes. 17 | */ 18 | template 19 | class Base { 20 | private: 21 | Base & operator=(const Base &); 22 | 23 | public: 24 | Base(); 25 | virtual ~Base() = 0; 26 | // Allow default copy ctor. 27 | 28 | template 29 | NSString * failure_message_for(const U &) const; 30 | template 31 | NSString * negative_failure_message_for(const U &) const; 32 | 33 | protected: 34 | virtual NSString * failure_message_end() const = 0; 35 | }; 36 | 37 | template 38 | Base::Base() {} 39 | template 40 | Base::~Base() {} 41 | 42 | template template 43 | NSString * Base::failure_message_for(const U & value) const { 44 | return [NSString stringWithFormat:@"Expected <%@> to %@", MessageBuilder_::string_for_actual_value(value), this->failure_message_end()]; 45 | } 46 | 47 | template template 48 | NSString * Base::negative_failure_message_for(const U & value) const { 49 | return [NSString stringWithFormat:@"Expected <%@> to not %@", MessageBuilder_::string_for_actual_value(value), this->failure_message_end()]; 50 | } 51 | }} 52 | -------------------------------------------------------------------------------- /External/Cedar-iOS.framework/Versions/A/Headers/BeSameInstanceAs.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Base.h" 3 | 4 | namespace Cedar { namespace Matchers { 5 | template 6 | class BeSameInstanceAs : public Base<> { 7 | private: 8 | BeSameInstanceAs & operator=(const BeSameInstanceAs &); 9 | 10 | public: 11 | explicit BeSameInstanceAs(T * const expectedValue); 12 | ~BeSameInstanceAs(); 13 | // Allow default copy ctor. 14 | 15 | template 16 | bool matches(const U &) const; 17 | 18 | template 19 | bool matches(U * const &) const; 20 | 21 | protected: 22 | virtual NSString * failure_message_end() const; 23 | 24 | private: 25 | const T * expectedValue_; 26 | }; 27 | 28 | template 29 | BeSameInstanceAs be_same_instance_as(T * const expectedValue) { 30 | return BeSameInstanceAs(expectedValue); 31 | } 32 | 33 | template 34 | BeSameInstanceAs::BeSameInstanceAs(T * const expectedValue) 35 | : Base<>(), expectedValue_(expectedValue) { 36 | } 37 | 38 | template 39 | BeSameInstanceAs::~BeSameInstanceAs() { 40 | } 41 | 42 | template 43 | /*virtual*/ NSString * BeSameInstanceAs::failure_message_end() const { 44 | return [NSString stringWithFormat:@"be same instance as <%p>", expectedValue_]; 45 | } 46 | 47 | #pragma mark Generic 48 | template template 49 | bool BeSameInstanceAs::matches(const U & actualValue) const { 50 | [[CDRSpecFailure specFailureWithReason:@"Attempt to compare non-pointer type for sameness."] raise]; 51 | return NO; 52 | } 53 | 54 | template template 55 | bool BeSameInstanceAs::matches(U * const & actualValue) const { 56 | return actualValue == expectedValue_; 57 | } 58 | 59 | }} 60 | -------------------------------------------------------------------------------- /External/Cedar-iOS.framework/Versions/A/Headers/Argument.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CompareEqual.h" 3 | #import "CedarStringifiers.h" 4 | #import "CedarComparators.h" 5 | 6 | namespace Cedar { namespace Doubles { 7 | 8 | class Argument { 9 | public: 10 | virtual ~Argument() = 0; 11 | 12 | virtual const char * value_encoding() const = 0; 13 | virtual NSString * value_string() const = 0; 14 | 15 | virtual bool matches_bytes(void * expectedArgumentBytes) const = 0; 16 | }; 17 | 18 | inline /* virtual */ Argument::~Argument() {} 19 | 20 | template 21 | class TypedArgument : public Argument { 22 | private: 23 | TypedArgument & operator=(const TypedArgument &); 24 | 25 | public: 26 | explicit TypedArgument(const T &); 27 | virtual ~TypedArgument(); 28 | // Allow default copy ctor. 29 | 30 | virtual const char * value_encoding() const; 31 | virtual NSString * value_string() const; 32 | 33 | virtual bool matches_bytes(void * expectedArgumentBytes) const; 34 | 35 | private: 36 | const T & value_; 37 | }; 38 | 39 | 40 | template 41 | TypedArgument::TypedArgument(const T & value) : Argument(), value_(value) {} 42 | 43 | template 44 | /* virtual */ TypedArgument::~TypedArgument() {} 45 | 46 | template 47 | /* virtual */ const char * TypedArgument::value_encoding() const { 48 | return @encode(T); 49 | } 50 | 51 | template 52 | /* virtual */ NSString * TypedArgument::value_string() const { 53 | return Matchers::Stringifiers::string_for(value_); 54 | } 55 | 56 | template 57 | /* virtual */ bool TypedArgument::matches_bytes(void * expectedArgumentBytes) const { 58 | return Matchers::Comparators::compare_equal(value_, *(static_cast(expectedArgumentBytes))); 59 | } 60 | }} 61 | -------------------------------------------------------------------------------- /External/Cedar-iOS.framework/Versions/A/Headers/BeGreaterThan.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Base.h" 3 | 4 | namespace Cedar { namespace Matchers { 5 | 6 | template 7 | class BeGreaterThan : public Base<> { 8 | private: 9 | BeGreaterThan & operator=(const BeGreaterThan &); 10 | 11 | public: 12 | explicit BeGreaterThan(const T & expectedValue); 13 | ~BeGreaterThan(); 14 | // Allow default copy ctor. 15 | 16 | template 17 | bool matches(const U &) const; 18 | 19 | protected: 20 | virtual NSString * failure_message_end() const; 21 | 22 | private: 23 | const T & expectedValue_; 24 | }; 25 | 26 | template 27 | BeGreaterThan be_greater_than(const T & expectedValue) { 28 | return BeGreaterThan(expectedValue); 29 | } 30 | 31 | template 32 | BeGreaterThan::BeGreaterThan(const T & expectedValue) 33 | : Base<>(), expectedValue_(expectedValue) { 34 | } 35 | 36 | template 37 | BeGreaterThan::~BeGreaterThan() { 38 | } 39 | 40 | template 41 | /*virtual*/ NSString * BeGreaterThan::failure_message_end() const { 42 | return [NSString stringWithFormat:@"be greater than <%@>", Stringifiers::string_for(expectedValue_)]; 43 | } 44 | 45 | template template 46 | bool BeGreaterThan::matches(const U & actualValue) const { 47 | return Comparators::compare_greater_than(actualValue, expectedValue_); 48 | } 49 | 50 | #pragma mark operators 51 | template 52 | bool operator>(const ActualValue & actualValue, const U & expectedValue) { 53 | return actualValue.to > expectedValue; 54 | } 55 | 56 | template 57 | bool operator>(const ActualValueMatchProxy & actualValueMatchProxy, const U & expectedValue) { 58 | actualValueMatchProxy(be_greater_than(expectedValue)); 59 | return true; 60 | } 61 | }} 62 | -------------------------------------------------------------------------------- /External/Cedar-iOS.framework/Versions/A/Headers/BeLessThan.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Base.h" 3 | 4 | namespace Cedar { namespace Matchers { 5 | 6 | template 7 | class BeLessThan : public Base<> { 8 | private: 9 | BeLessThan & operator=(const BeLessThan &); 10 | 11 | public: 12 | explicit BeLessThan(const T & expectedValue); 13 | ~BeLessThan(); 14 | // Allow default copy ctor. 15 | 16 | template 17 | bool matches(const U &) const; 18 | 19 | protected: 20 | virtual NSString * failure_message_end() const; 21 | 22 | private: 23 | const T & expectedValue_; 24 | }; 25 | 26 | template 27 | BeLessThan be_less_than(const T & expectedValue) { 28 | return BeLessThan(expectedValue); 29 | } 30 | 31 | template 32 | BeLessThan::BeLessThan(const T & expectedValue) 33 | : Base<>(), expectedValue_(expectedValue) { 34 | } 35 | 36 | template 37 | BeLessThan::~BeLessThan() { 38 | } 39 | 40 | template 41 | /*virtual*/ NSString * BeLessThan::failure_message_end() const { 42 | return [NSString stringWithFormat:@"be less than <%@>", Stringifiers::string_for(expectedValue_)]; 43 | } 44 | 45 | template template 46 | bool BeLessThan::matches(const U & actualValue) const { 47 | return !Comparators::compare_greater_than(actualValue, expectedValue_) && !Comparators::compare_equal(actualValue, expectedValue_); 48 | } 49 | 50 | #pragma mark operators 51 | template 52 | bool operator<(const ActualValue & actualValue, const U & expectedValue) { 53 | return actualValue.to < expectedValue; 54 | } 55 | 56 | template 57 | bool operator<(const ActualValueMatchProxy & actualValueMatchProxy, const U & expectedValue) { 58 | actualValueMatchProxy(be_less_than(expectedValue)); 59 | return true; 60 | } 61 | }} 62 | -------------------------------------------------------------------------------- /External/Cedar-iOS.framework/Versions/A/Headers/BeLTE.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Base.h" 3 | 4 | namespace Cedar { namespace Matchers { 5 | 6 | template 7 | class BeLTE : public Base<> { 8 | private: 9 | BeLTE & operator=(const BeLTE &); 10 | 11 | public: 12 | explicit BeLTE(const T & expectedValue); 13 | ~BeLTE(); 14 | // Allow default copy ctor. 15 | 16 | template 17 | bool matches(const U &) const; 18 | 19 | protected: 20 | virtual NSString * failure_message_end() const; 21 | 22 | private: 23 | const T & expectedValue_; 24 | }; 25 | 26 | template 27 | BeLTE be_lte(const T & expectedValue) { 28 | return BeLTE(expectedValue); 29 | } 30 | 31 | template 32 | BeLTE be_less_than_or_equal_to(const T & expectedValue) { 33 | return be_lte(expectedValue); 34 | } 35 | 36 | template 37 | BeLTE::BeLTE(const T & expectedValue) 38 | : Base<>(), expectedValue_(expectedValue) { 39 | } 40 | 41 | template 42 | BeLTE::~BeLTE() { 43 | } 44 | 45 | template 46 | /*virtual*/ NSString * BeLTE::failure_message_end() const { 47 | return [NSString stringWithFormat:@"be less than or equal to <%@>", Stringifiers::string_for(expectedValue_)]; 48 | } 49 | 50 | template template 51 | bool BeLTE::matches(const U & actualValue) const { 52 | return !Comparators::compare_greater_than(actualValue, expectedValue_); 53 | } 54 | 55 | #pragma mark operators 56 | template 57 | bool operator<=(const ActualValue & actualValue, const U & expectedValue) { 58 | return actualValue.to <= expectedValue; 59 | } 60 | 61 | template 62 | bool operator<=(const ActualValueMatchProxy & actualValueMatchProxy, const U & expectedValue) { 63 | actualValueMatchProxy(be_lte(expectedValue)); 64 | return true; 65 | } 66 | }} 67 | -------------------------------------------------------------------------------- /External/Cedar-iOS.framework/Versions/A/Headers/BeGTE.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Base.h" 3 | 4 | namespace Cedar { namespace Matchers { 5 | 6 | template 7 | class BeGTE : public Base<> { 8 | private: 9 | BeGTE & operator=(const BeGTE &); 10 | 11 | public: 12 | explicit BeGTE(const T & expectedValue); 13 | ~BeGTE(); 14 | // Allow default copy ctor. 15 | 16 | template 17 | bool matches(const U &) const; 18 | 19 | protected: 20 | virtual NSString * failure_message_end() const; 21 | 22 | private: 23 | const T & expectedValue_; 24 | }; 25 | 26 | template 27 | BeGTE be_gte(const T & expectedValue) { 28 | return BeGTE(expectedValue); 29 | } 30 | 31 | template 32 | BeGTE be_greater_than_or_equal_to(const T & expectedValue) { 33 | return be_gte(expectedValue); 34 | } 35 | 36 | template 37 | BeGTE::BeGTE(const T & expectedValue) 38 | : Base<>(), expectedValue_(expectedValue) { 39 | } 40 | 41 | template 42 | BeGTE::~BeGTE() { 43 | } 44 | 45 | template 46 | /*virtual*/ NSString * BeGTE::failure_message_end() const { 47 | return [NSString stringWithFormat:@"be greater than or equal to <%@>", Stringifiers::string_for(expectedValue_)]; 48 | } 49 | 50 | template template 51 | bool BeGTE::matches(const U & actualValue) const { 52 | return Comparators::compare_greater_than(actualValue, expectedValue_) || Comparators::compare_equal(actualValue, expectedValue_); 53 | } 54 | 55 | #pragma mark operators 56 | template 57 | bool operator>=(const ActualValue & actualValue, const U & expectedValue) { 58 | return actualValue.to >= expectedValue; 59 | } 60 | 61 | template 62 | bool operator>=(const ActualValueMatchProxy & actualValueMatchProxy, const U & expectedValue) { 63 | actualValueMatchProxy(be_gte(expectedValue)); 64 | return true; 65 | } 66 | }} 67 | -------------------------------------------------------------------------------- /External/Cedar-iOS.framework/Versions/A/Headers/CompareEqual.h: -------------------------------------------------------------------------------- 1 | namespace Cedar { namespace Matchers { namespace Comparators { 2 | 3 | #pragma mark Generic 4 | template 5 | bool compare_equal(const T & actualValue, const U & expectedValue) { 6 | if (strcmp(@encode(T), "@") == 0 && strcmp(@encode(U), "@") == 0) { 7 | NSValue *actualValueId = [NSValue value:&actualValue withObjCType:@encode(id)]; 8 | NSValue *expectedValueId = [NSValue value:&expectedValue withObjCType:@encode(id)]; 9 | return [[actualValueId nonretainedObjectValue] isEqual:[expectedValueId nonretainedObjectValue]]; 10 | } else { 11 | return actualValue == expectedValue; 12 | } 13 | } 14 | 15 | #pragma mark NSNumber 16 | inline bool compare_equal(NSNumber * const actualValue, NSNumber * const expectedValue) { 17 | return [actualValue isEqualToNumber:expectedValue]; 18 | } 19 | 20 | inline bool compare_equal(NSNumber * const actualValue, const id expectedValue) { 21 | return [expectedValue isEqual:actualValue]; 22 | } 23 | 24 | inline bool compare_equal(NSNumber * const actualValue, NSObject * const expectedValue) { 25 | return compare_equal(actualValue, static_cast(expectedValue)); 26 | } 27 | 28 | inline bool compare_equal(NSNumber * const actualValue, NSValue * const expectedValue) { 29 | return compare_equal(actualValue, static_cast(expectedValue)); 30 | } 31 | 32 | inline bool compare_equal(const id actualValue, NSNumber * const expectedValue) { 33 | return compare_equal(expectedValue, actualValue); 34 | } 35 | 36 | inline bool compare_equal(NSObject * const actualValue, NSNumber * const expectedValue) { 37 | return compare_equal(expectedValue, actualValue); 38 | } 39 | 40 | template 41 | bool compare_equal(NSNumber * const actualValue, const U & expectedValue) { 42 | return [actualValue floatValue] == expectedValue; 43 | } 44 | 45 | template 46 | bool compare_equal(const T & actualValue, NSNumber * const expectedValue) { 47 | return compare_equal(expectedValue, actualValue); 48 | } 49 | 50 | }}} 51 | -------------------------------------------------------------------------------- /External/Cedar-iOS.framework/Versions/A/Headers/BeInstanceOf.h: -------------------------------------------------------------------------------- 1 | #import "Base.h" 2 | 3 | namespace Cedar { namespace Matchers { 4 | struct BeInstanceOfMessageBuilder { 5 | template 6 | static NSString * string_for_actual_value(const U & value) { 7 | return [NSString stringWithFormat:@"%@ (%@)", value, [value class]]; 8 | } 9 | }; 10 | 11 | class BeInstanceOf : public Base { 12 | private: 13 | BeInstanceOf & operator=(const BeInstanceOf &); 14 | 15 | public: 16 | explicit BeInstanceOf(const Class expectedValue); 17 | ~BeInstanceOf(); 18 | // Allow default copy ctor. 19 | 20 | template 21 | bool matches(const U &) const; 22 | 23 | BeInstanceOf & or_any_subclass(); 24 | 25 | protected: 26 | virtual NSString * failure_message_end() const; 27 | 28 | private: 29 | const Class expectedClass_; 30 | bool includeSubclasses_; 31 | }; 32 | 33 | inline BeInstanceOf be_instance_of(const Class expectedValue) { 34 | return BeInstanceOf(expectedValue); 35 | } 36 | 37 | inline BeInstanceOf::BeInstanceOf(const Class expectedClass) 38 | : Base(), expectedClass_(expectedClass), includeSubclasses_(false) {} 39 | 40 | inline BeInstanceOf::~BeInstanceOf() {} 41 | 42 | inline BeInstanceOf & BeInstanceOf::or_any_subclass() { 43 | includeSubclasses_ = true; 44 | return *this; 45 | } 46 | 47 | inline /*virtual*/ NSString * BeInstanceOf::failure_message_end() const { 48 | NSMutableString *messageEnd = [NSMutableString stringWithFormat:@"be an instance of class <%@>", expectedClass_]; 49 | if (includeSubclasses_) { 50 | [messageEnd appendString:@", or any of its subclasses"]; 51 | } 52 | return messageEnd; 53 | } 54 | 55 | #pragma mark Generic 56 | template 57 | bool BeInstanceOf::matches(const U & actualValue) const { 58 | if (includeSubclasses_) { 59 | return [actualValue isKindOfClass:expectedClass_]; 60 | } else { 61 | return [actualValue isMemberOfClass:expectedClass_]; 62 | } 63 | } 64 | }} 65 | -------------------------------------------------------------------------------- /External/Expecta/ExpectaSupport.h: -------------------------------------------------------------------------------- 1 | // Expecta - ExpectaSupport.h 2 | // Copyright (c) 2011 Peter Jihoon Kim 3 | // Licensed under the MIT License. 4 | 5 | #import "EXPExpect.h" 6 | 7 | id _EXPObjectify(char *type, ...); 8 | EXPExpect *_EXP_expect(id testCase, int lineNumber, char *fileName, EXPIdBlock actualBlock); 9 | 10 | void EXPFail(id testCase, int lineNumber, char *fileName, NSString *message); 11 | NSString *EXPDescribeObject(id obj); 12 | 13 | void EXP_prerequisite(EXPBoolBlock block); 14 | void EXP_match(EXPBoolBlock block); 15 | void EXP_failureMessageForTo(EXPStringBlock block); 16 | void EXP_failureMessageForNotTo(EXPStringBlock block); 17 | 18 | // workaround for the categories bug: http://developer.apple.com/library/mac/#qa/qa1490/_index.html 19 | #define EXPFixCategoriesBug(name) \ 20 | @interface EXPFixCategoriesBug##name; @end \ 21 | @implementation EXPFixCategoriesBug##name; @end 22 | 23 | #define _EXPMatcherInterface(matcherName, matcherArguments) \ 24 | @interface EXPExpect (matcherName##Matcher) \ 25 | @property (nonatomic, readonly) void(^ matcherName) matcherArguments; \ 26 | @end 27 | 28 | #define _EXPMatcherImplementationBegin(matcherName, matcherArguments) \ 29 | EXPFixCategoriesBug(EXPMatcher##matcherName##Matcher); \ 30 | @implementation EXPExpect (matcherName##Matcher) \ 31 | @dynamic matcherName;\ 32 | - (void(^) matcherArguments) matcherName { \ 33 | [[[NSThread currentThread] threadDictionary] setObject:self forKey:@"currentMatcher"]; \ 34 | __block id actual = self.actual; \ 35 | __block void (^prerequisite)(EXPBoolBlock block) = ^(EXPBoolBlock block) { EXP_prerequisite(block); }; \ 36 | __block void (^match)(EXPBoolBlock block) = ^(EXPBoolBlock block) { EXP_match(block); }; \ 37 | __block void (^failureMessageForTo)(EXPStringBlock block) = ^(EXPStringBlock block) { EXP_failureMessageForTo(block); }; \ 38 | __block void (^failureMessageForNotTo)(EXPStringBlock block) = ^(EXPStringBlock block) { EXP_failureMessageForNotTo(block); }; \ 39 | prerequisite(nil); match(nil); failureMessageForTo(nil); failureMessageForNotTo(nil); \ 40 | void (^matcherBlock) matcherArguments = ^ matcherArguments { \ 41 | { 42 | 43 | #define _EXPMatcherImplementationEnd \ 44 | } \ 45 | [self applyMatcher:&actual]; \ 46 | }; \ 47 | return [[matcherBlock copy] autorelease]; \ 48 | } \ 49 | @end 50 | -------------------------------------------------------------------------------- /External/Cedar-iOS.framework/Versions/A/Headers/Equal.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Base.h" 3 | 4 | namespace Cedar { namespace Matchers { 5 | 6 | template 7 | class Equal : public Base<> { 8 | private: 9 | Equal & operator=(const Equal &); 10 | 11 | public: 12 | explicit Equal(const T & expectedValue); 13 | ~Equal(); 14 | // Allow default copy ctor. 15 | 16 | template 17 | bool matches(const U &) const; 18 | 19 | protected: 20 | virtual NSString * failure_message_end() const; 21 | 22 | private: 23 | const T & expectedValue_; 24 | }; 25 | 26 | template 27 | Equal equal(const T & expectedValue) { 28 | return Equal(expectedValue); 29 | } 30 | 31 | template 32 | Equal::Equal(const T & expectedValue) 33 | : Base<>(), expectedValue_(expectedValue) { 34 | } 35 | 36 | template 37 | Equal::~Equal() { 38 | } 39 | 40 | template 41 | /*virtual*/ NSString * Equal::failure_message_end() const { 42 | return [NSString stringWithFormat:@"equal <%@>", Stringifiers::string_for(expectedValue_)]; 43 | } 44 | 45 | template template 46 | bool Equal::matches(const U & actualValue) const { 47 | return Comparators::compare_equal(actualValue, expectedValue_); 48 | } 49 | 50 | #pragma mark equality operators 51 | template 52 | bool operator==(const ActualValue & actualValue, const U & expectedValue) { 53 | return actualValue.to == expectedValue; 54 | } 55 | 56 | template 57 | bool operator==(const ActualValueMatchProxy & actualValueMatchProxy, const U & expectedValue) { 58 | actualValueMatchProxy(equal(expectedValue)); 59 | return true; 60 | } 61 | 62 | template 63 | bool operator!=(const ActualValue & actualValue, const U & expectedValue) { 64 | return actualValue.to != expectedValue; 65 | } 66 | 67 | template 68 | bool operator!=(const ActualValueMatchProxy & actualValueMatchProxy, const U & expectedValue) { 69 | actualValueMatchProxy.negate()(equal(expectedValue)); 70 | return true; 71 | } 72 | }} 73 | -------------------------------------------------------------------------------- /External/Cedar-iOS.framework/Versions/A/Headers/CompareGreaterThan.h: -------------------------------------------------------------------------------- 1 | namespace Cedar { namespace Matchers { namespace Comparators { 2 | 3 | #pragma mark Generic 4 | template 5 | bool compare_greater_than(const T & actualValue, const U & expectedValue) { 6 | return actualValue > expectedValue; 7 | } 8 | 9 | #pragma mark NSNumber 10 | inline bool compare_greater_than(NSNumber * const actualValue, NSNumber * const expectedValue) { 11 | return NSOrderedDescending == [actualValue compare:expectedValue]; 12 | } 13 | 14 | template 15 | bool compare_greater_than(NSNumber * const actualValue, const U & expectedValue) { 16 | return [actualValue floatValue] > expectedValue; 17 | } 18 | 19 | inline bool compare_greater_than(NSNumber * const actualValue, const id expectedValue) { 20 | if ([expectedValue respondsToSelector:@selector(floatValue)]) { 21 | return compare_greater_than(actualValue, [expectedValue floatValue]); 22 | } 23 | return false; 24 | } 25 | 26 | inline bool compare_greater_than(NSNumber * const actualValue, NSObject * const expectedValue) { 27 | return compare_greater_than(actualValue, static_cast(expectedValue)); 28 | } 29 | 30 | inline bool compare_greater_than(NSNumber * const actualValue, NSValue * const expectedValue) { 31 | return compare_greater_than(actualValue, static_cast(expectedValue)); 32 | } 33 | 34 | template 35 | bool compare_greater_than(const T & actualValue, NSNumber * const expectedValue) { 36 | return actualValue > [expectedValue floatValue]; 37 | } 38 | 39 | inline bool compare_greater_than(const id actualValue, NSNumber * const expectedValue) { 40 | if ([actualValue respondsToSelector:@selector(floatValue)]) { 41 | return compare_greater_than([actualValue floatValue], expectedValue); 42 | } 43 | return false; 44 | } 45 | 46 | inline bool compare_greater_than(NSObject * const actualValue, NSNumber * const expectedValue) { 47 | return compare_greater_than(static_cast(actualValue), expectedValue); 48 | } 49 | 50 | inline bool compare_greater_than(NSValue * const actualValue, NSNumber * const expectedValue) { 51 | return compare_greater_than(static_cast(actualValue), expectedValue); 52 | } 53 | 54 | }}} 55 | -------------------------------------------------------------------------------- /External/Cedar-iOS.framework/Versions/A/Headers/BeCloseTo.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Base.h" 3 | 4 | namespace Cedar { namespace Matchers { 5 | template 6 | class BeCloseTo : public Base<> { 7 | private: 8 | BeCloseTo & operator=(const BeCloseTo &); 9 | 10 | public: 11 | explicit BeCloseTo(const T & expectedValue); 12 | ~BeCloseTo(); 13 | // Allow default copy ctor. 14 | 15 | BeCloseTo & within(float threshold); 16 | 17 | template 18 | bool matches(const U &) const; 19 | bool matches(NSNumber * const &) const; 20 | 21 | protected: 22 | virtual NSString * failure_message_end() const; 23 | 24 | private: 25 | template 26 | bool subtractable_types_match(const U &, const V &) const; 27 | 28 | private: 29 | const T & expectedValue_; 30 | float threshold_; 31 | }; 32 | 33 | template 34 | BeCloseTo be_close_to(const T & expectedValue) { 35 | return BeCloseTo(expectedValue); 36 | } 37 | 38 | template 39 | BeCloseTo::BeCloseTo(const T & expectedValue) 40 | : Base<>(), expectedValue_(expectedValue), threshold_(0.01) { 41 | } 42 | 43 | template 44 | BeCloseTo::~BeCloseTo() { 45 | } 46 | 47 | template 48 | BeCloseTo & BeCloseTo::within(float threshold) { 49 | threshold_ = threshold; 50 | return *this; 51 | } 52 | 53 | template 54 | /*virtual*/ NSString * BeCloseTo::failure_message_end() const { 55 | return [NSString stringWithFormat:@"be close to <%@> (within %@)", Stringifiers::string_for(expectedValue_), Stringifiers::string_for(threshold_)]; 56 | } 57 | 58 | template template 59 | bool BeCloseTo::subtractable_types_match(const U & actualValue, const V & expectedValue) const { 60 | return actualValue > expectedValue - threshold_ && actualValue < expectedValue + threshold_; 61 | } 62 | 63 | #pragma mark Generic 64 | template template 65 | bool BeCloseTo::matches(const U & actualValue) const { 66 | return this->subtractable_types_match(actualValue, expectedValue_); 67 | } 68 | 69 | #pragma mark NSNumber 70 | template 71 | bool BeCloseTo::matches(NSNumber * const & actualValue) const { 72 | return this->matches([actualValue floatValue]); 73 | } 74 | 75 | template<> template 76 | bool BeCloseTo::matches(const U & actualValue) const { 77 | return this->subtractable_types_match(actualValue, [expectedValue_ floatValue]); 78 | } 79 | }} 80 | -------------------------------------------------------------------------------- /External/Cedar-iOS.framework/Versions/A/Headers/RaiseException.h: -------------------------------------------------------------------------------- 1 | #import "Base.h" 2 | 3 | namespace Cedar { namespace Matchers { 4 | class RaiseException : public Base<> { 5 | typedef void (^empty_block_t)(); 6 | 7 | private: 8 | RaiseException & operator=(const RaiseException &); 9 | 10 | public: 11 | explicit RaiseException(Class = nil, bool = false); 12 | ~RaiseException(); 13 | // Allow default copy ctor. 14 | 15 | RaiseException & operator()(Class = nil); 16 | RaiseException operator()(Class = nil) const; 17 | 18 | RaiseException & or_subclass(); 19 | RaiseException or_subclass() const; 20 | 21 | bool matches(empty_block_t) const; 22 | 23 | protected: 24 | virtual NSString * failure_message_end() const; 25 | 26 | private: 27 | const Class expectedExceptionClass_; 28 | bool allowSubclasses_; 29 | }; 30 | 31 | RaiseException raise() __attribute__((deprecated)); // Please use raise_exception 32 | inline RaiseException raise() { 33 | return RaiseException(); 34 | } 35 | 36 | static const RaiseException raise_exception = RaiseException(); 37 | 38 | inline RaiseException::RaiseException(Class expectedExceptionClass /*= nil*/, bool allowSubclasses /*= false */) 39 | : Base<>(), expectedExceptionClass_(expectedExceptionClass), allowSubclasses_(allowSubclasses) { 40 | } 41 | 42 | inline RaiseException::~RaiseException() { 43 | } 44 | 45 | inline RaiseException & RaiseException::operator()(Class expectedExceptionClass /*= nil*/) { 46 | return *this; 47 | } 48 | 49 | inline RaiseException RaiseException::operator()(Class expectedExceptionClass /*= nil*/) const { 50 | return RaiseException(expectedExceptionClass); 51 | } 52 | 53 | inline RaiseException & RaiseException::or_subclass() { 54 | allowSubclasses_ = true; 55 | return *this; 56 | } 57 | 58 | inline RaiseException RaiseException::or_subclass() const { 59 | return RaiseException(expectedExceptionClass_, true); 60 | } 61 | 62 | inline bool RaiseException::matches(empty_block_t block) const { 63 | @try { 64 | block(); 65 | } 66 | @catch (NSException *exception) { 67 | return !expectedExceptionClass_ || (allowSubclasses_ ? [exception isKindOfClass:expectedExceptionClass_] : [exception isMemberOfClass:expectedExceptionClass_]); 68 | } 69 | return false; 70 | } 71 | 72 | /*virtual*/ inline NSString * RaiseException::failure_message_end() const { 73 | NSMutableString *message = [NSMutableString stringWithFormat:@"raise an exception"]; 74 | if (expectedExceptionClass_) { 75 | [message appendString:@" of class"]; 76 | if (allowSubclasses_) { 77 | [message appendString:@", or subclass of class,"]; 78 | } 79 | [message appendFormat:@" <%@>", NSStringFromClass(expectedExceptionClass_)]; 80 | } 81 | return message; 82 | } 83 | }} 84 | -------------------------------------------------------------------------------- /External/Cedar-iOS.framework/Versions/A/Headers/ComparatorsContainer.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import 4 | #import 5 | 6 | // Container 7 | namespace Cedar { namespace Matchers { namespace Comparators { 8 | #pragma mark compare_empty 9 | template 10 | bool compare_empty(const T & container) { 11 | return 0 == [container count]; 12 | } 13 | 14 | template 15 | bool compare_empty(const typename std::vector & container) { 16 | return container.empty(); 17 | } 18 | 19 | template 20 | bool compare_empty(const typename std::map & container) { 21 | return container.empty(); 22 | } 23 | 24 | template 25 | bool compare_empty(const typename std::set & container) { 26 | return container.empty(); 27 | } 28 | 29 | #pragma mark compare_contains 30 | template 31 | bool compare_contains(const T & container, const U & element) { 32 | return [container containsObject:element]; 33 | } 34 | 35 | template 36 | bool compare_contains(NSString * const container, const U & element) { 37 | NSRange range = [container rangeOfString:element]; 38 | return container && range.location != NSNotFound; 39 | } 40 | 41 | template 42 | bool compare_contains(NSMutableString * const container, const U & element) { 43 | return compare_contains(static_cast(container), element); 44 | } 45 | 46 | template 47 | bool compare_contains(NSDictionary * const container, const U & element) { 48 | [[NSException exceptionWithName:NSInternalInconsistencyException reason:@"Unexpected use of 'contain' matcher with dictionary; use contain_key or contain_value" userInfo:nil] raise]; 49 | return false; 50 | } 51 | 52 | template 53 | bool compare_contains(NSMutableDictionary * const container, const U & element) { 54 | return compare_contains(static_cast(container), element); 55 | } 56 | 57 | namespace { 58 | template 59 | class CompareEqualTo { 60 | private: 61 | CompareEqualTo & operator=(const CompareEqualTo &); 62 | 63 | public: 64 | explicit CompareEqualTo(const T & rhs): rhs_(rhs) {} 65 | // Allow default copy ctor. 66 | ~CompareEqualTo() {} 67 | 68 | template 69 | bool operator()(const U & lhs) const { return compare_equal(lhs, rhs_); } 70 | 71 | private: 72 | const T & rhs_; 73 | }; 74 | } 75 | 76 | template 77 | bool compare_contains(const typename std::vector & container, const U & element) { 78 | return container.end() != std::find_if(container.begin(), container.end(), CompareEqualTo(element)); 79 | } 80 | 81 | template 82 | bool compare_contains(const typename std::map & container, const V & element) { 83 | return compare_contains(static_cast(nil), element); 84 | } 85 | 86 | template 87 | bool compare_contains(const typename std::set & container, const U & element) { 88 | return container.end() != std::find_if(container.begin(), container.end(), CompareEqualTo(element)); 89 | } 90 | }}} 91 | -------------------------------------------------------------------------------- /ASViewControllerExample/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // ASViewControllerExample 4 | // 5 | // Created by Lukasz Warchol on 4/30/12. 6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | #import "ASFlipViewController.h" 11 | #import "ASEColoredViewController.h" 12 | 13 | @implementation AppDelegate 14 | 15 | @synthesize window = _window; 16 | 17 | - (void)dealloc 18 | { 19 | [_window release]; 20 | [super dealloc]; 21 | } 22 | 23 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 24 | { 25 | self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease]; 26 | self.window.backgroundColor = [UIColor whiteColor]; 27 | [self.window makeKeyAndVisible]; 28 | 29 | 30 | ASEColoredViewController* redVC = [[[ASEColoredViewController alloc] init] autorelease]; 31 | redVC.viewColor = [UIColor redColor]; 32 | ASEColoredViewController* greenVC = [[[ASEColoredViewController alloc] init] autorelease]; 33 | greenVC.viewColor = [UIColor greenColor]; 34 | ASEColoredViewController* blueVC = [[[ASEColoredViewController alloc] init] autorelease]; 35 | blueVC.viewColor = [UIColor blueColor]; 36 | 37 | //Flip view controller contains 3 different subviewcontrollers taht yser can switch between. 38 | ASFlipViewController* flipViewController = [[ASFlipViewController alloc] init]; 39 | flipViewController.viewControllers = [NSArray arrayWithObjects:redVC, greenVC, blueVC, nil]; 40 | 41 | UINavigationController* rootViewController = [[UINavigationController alloc]initWithRootViewController:flipViewController]; 42 | self.window.rootViewController = rootViewController; 43 | 44 | return YES; 45 | } 46 | 47 | - (void)applicationWillResignActive:(UIApplication *)application 48 | { 49 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 50 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. 51 | } 52 | 53 | - (void)applicationDidEnterBackground:(UIApplication *)application 54 | { 55 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 56 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 57 | } 58 | 59 | - (void)applicationWillEnterForeground:(UIApplication *)application 60 | { 61 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. 62 | } 63 | 64 | - (void)applicationDidBecomeActive:(UIApplication *)application 65 | { 66 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 67 | } 68 | 69 | - (void)applicationWillTerminate:(UIApplication *)application 70 | { 71 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 72 | } 73 | 74 | @end 75 | -------------------------------------------------------------------------------- /ASViewControllerExample.xcodeproj/xcuserdata/lukewar.xcuserdatad/xcschemes/ASViewControllerExample.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | 14 | 20 | 21 | 22 | 23 | 24 | 29 | 30 | 31 | 32 | 38 | 39 | 40 | 41 | 50 | 51 | 57 | 58 | 59 | 60 | 61 | 62 | 68 | 69 | 75 | 76 | 77 | 78 | 80 | 81 | 84 | 85 | 86 | -------------------------------------------------------------------------------- /ASViewControllerExample.xcodeproj/xcuserdata/lukewar.xcuserdatad/xcschemes/UISpecs.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 4 | 7 | 8 | 14 | 20 | 21 | 22 | 23 | 24 | 29 | 30 | 31 | 32 | 38 | 39 | 40 | 41 | 50 | 51 | 57 | 58 | 59 | 60 | 64 | 65 | 66 | 67 | 68 | 69 | 75 | 76 | 82 | 83 | 84 | 85 | 87 | 88 | 91 | 92 | 93 | -------------------------------------------------------------------------------- /External/Cedar-iOS.framework/Versions/A/Headers/ActualValue.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | #import "StringifiersBase.h" 5 | #import "CDRSpecFailure.h" 6 | 7 | namespace Cedar { namespace Matchers { 8 | 9 | void CDR_fail(const char *fileName, int lineNumber, NSString * reason); 10 | 11 | template class ActualValue; 12 | 13 | #pragma mark class ActualValueMatchProxy 14 | template 15 | class ActualValueMatchProxy { 16 | private: 17 | template 18 | ActualValueMatchProxy(const ActualValueMatchProxy &); 19 | template 20 | ActualValueMatchProxy & operator=(const ActualValueMatchProxy &); 21 | 22 | public: 23 | explicit ActualValueMatchProxy(const ActualValue &, bool negate = false); 24 | ActualValueMatchProxy(); 25 | 26 | template void operator()(const MatcherType &) const; 27 | ActualValueMatchProxy negate() const; 28 | 29 | private: 30 | const ActualValue & actualValue_; 31 | bool negate_; 32 | }; 33 | 34 | template 35 | ActualValueMatchProxy::ActualValueMatchProxy(const ActualValue & actualValue, bool negate /*= false */) 36 | : actualValue_(actualValue), negate_(negate) {} 37 | 38 | template template 39 | void ActualValueMatchProxy::operator()(const MatcherType & matcher) const { 40 | if (negate_) { 41 | actualValue_.execute_negative_match(matcher); 42 | } else { 43 | actualValue_.execute_positive_match(matcher); 44 | } 45 | } 46 | 47 | template 48 | ActualValueMatchProxy ActualValueMatchProxy::negate() const { 49 | return ActualValueMatchProxy(actualValue_, !negate_); 50 | } 51 | 52 | #pragma mark class ActualValue 53 | template 54 | class ActualValue { 55 | private: 56 | template 57 | ActualValue(const ActualValue &); 58 | template 59 | ActualValue & operator=(const ActualValue &); 60 | 61 | public: 62 | explicit ActualValue(const char *, int, const T &); 63 | ~ActualValue(); 64 | 65 | ActualValueMatchProxy to; 66 | ActualValueMatchProxy to_not; 67 | 68 | private: 69 | template void execute_positive_match(const MatcherType &) const; 70 | template void execute_negative_match(const MatcherType &) const; 71 | friend class ActualValueMatchProxy; 72 | 73 | private: 74 | const T & value_; 75 | std::string fileName_; 76 | int lineNumber_; 77 | }; 78 | 79 | template 80 | ActualValue::ActualValue(const char *fileName, int lineNumber, const T & value) : fileName_(fileName), lineNumber_(lineNumber), value_(value), to(*this), to_not(*this, true) { 81 | } 82 | 83 | template 84 | ActualValue::~ActualValue() { 85 | } 86 | 87 | template template 88 | void ActualValue::execute_positive_match(const MatcherType & matcher) const { 89 | if (!matcher.matches(value_)) { 90 | CDR_fail(fileName_.c_str(), lineNumber_, matcher.failure_message_for(value_)); 91 | } 92 | } 93 | 94 | template template 95 | void ActualValue::execute_negative_match(const MatcherType & matcher) const { 96 | if (matcher.matches(value_)) { 97 | CDR_fail(fileName_.c_str(), lineNumber_, matcher.negative_failure_message_for(value_)); 98 | } 99 | } 100 | 101 | template 102 | const ActualValue CDR_expect(const char *fileName, int lineNumber, const T & actualValue) { 103 | return ActualValue(fileName, lineNumber, actualValue); 104 | } 105 | 106 | inline void CDR_fail(const char *fileName, int lineNumber, NSString * reason) { 107 | [[CDRSpecFailure specFailureWithReason:reason 108 | fileName:[NSString stringWithUTF8String:fileName] 109 | lineNumber:lineNumber] raise]; 110 | } 111 | 112 | }} 113 | 114 | #ifndef CEDAR_MATCHERS_COMPATIBILITY_MODE 115 | #define expect(x) CDR_expect(__FILE__, __LINE__, (x)) 116 | #define fail(x) CDR_fail(__FILE__, __LINE__, (x)) 117 | #endif 118 | -------------------------------------------------------------------------------- /ASViewControllerExample/Classes/ASFlipViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ASFlipViewController.m 3 | // ASViewControllerExample 4 | // 5 | // Created by Lukasz Warchol on 5/1/12. 6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved. 7 | // 8 | 9 | #import "ASFlipViewController.h" 10 | 11 | @interface ASFlipViewController () 12 | 13 | @end 14 | 15 | @implementation ASFlipViewController 16 | @synthesize currentViewController = _currentViewController; 17 | @synthesize currentIndex = _currentIndex; 18 | 19 | @dynamic viewControllers; 20 | 21 | #pragma mark - Getters 22 | //--------------------------------------------------------------------------------------------- 23 | - (void) setViewControllers:(NSArray *)viewControllers 24 | { 25 | for (UIViewController* vc in self.childViewControllers) { 26 | [vc willMoveToParentViewController:nil]; 27 | [vc removeFromParentViewController]; 28 | } 29 | for (UIViewController* vc in viewControllers) { 30 | [self addChildViewController:vc]; 31 | [vc didMoveToParentViewController:self]; 32 | } 33 | _currentViewController = nil; 34 | _currentIndex = 0; 35 | if (self.childViewControllers.count > 0) { 36 | if ([self isViewLoaded]) { 37 | [self switchToViewControllerAtIndex:_currentIndex animated:NO]; 38 | } 39 | }else{ 40 | [self.view.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)]; 41 | } 42 | } 43 | 44 | - (NSArray*) viewControllers 45 | { 46 | return self.childViewControllers; 47 | } 48 | 49 | - (void) setCurrentIndex:(NSUInteger)currentIndex 50 | { 51 | [self switchToViewControllerAtIndex:currentIndex animated:NO]; 52 | } 53 | 54 | - (void) setCurrentViewController:(UIViewController *)currentViewController 55 | { 56 | [self switchToViewController:currentViewController animated:NO]; 57 | } 58 | //--------------------------------------------------------------------------------------------- 59 | 60 | #pragma mark - View lifecycle 61 | //--------------------------------------------------------------------------------------------- 62 | - (void) viewDidLoad 63 | { 64 | [super viewDidLoad]; 65 | if (self.childViewControllers.count > 0) { 66 | [self switchToViewControllerAtIndex:_currentIndex animated:NO]; 67 | } 68 | 69 | UIBarButtonItem *item = [[UIBarButtonItem alloc] initWithTitle:@"flip" style:UIBarButtonItemStyleBordered target:self action:@selector(flipViews)]; 70 | self.navigationItem.rightBarButtonItem = item; 71 | [item release]; 72 | } 73 | 74 | - (void) flipViews 75 | { 76 | NSInteger newIndex = self.currentIndex + 1; 77 | newIndex = newIndex%self.viewControllers.count; 78 | [self switchToViewControllerAtIndex:newIndex animated:YES]; 79 | } 80 | 81 | - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 82 | { 83 | if ([self.currentViewController respondsToSelector:@selector(shouldAutorotateToInterfaceOrientation:)]) { 84 | return [self.currentViewController shouldAutorotateToInterfaceOrientation:interfaceOrientation]; 85 | } 86 | return YES; 87 | } 88 | //--------------------------------------------------------------------------------------------- 89 | 90 | #pragma mark - Child view controllers managment 91 | //--------------------------------------------------------------------------------------------- 92 | - (void) switchToViewController:(UIViewController*)controller animated:(BOOL)animated 93 | { 94 | NSInteger index = [self.viewControllers indexOfObject:controller]; 95 | if (index != NSNotFound) { 96 | UIViewController* fromViewController = self.currentViewController; 97 | UIViewController* toViewController = controller; 98 | UIView* toView = toViewController.view; 99 | toView.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight; 100 | toView.frame = self.view.bounds; 101 | 102 | if ([fromViewController isViewLoaded] && fromViewController.view.superview) { 103 | UIViewAnimationOptions animationOptions = UIViewAnimationOptionLayoutSubviews | UIViewAnimationOptionTransitionFlipFromLeft; 104 | if (animated) { 105 | animationOptions |= UIViewAnimationOptionTransitionFlipFromLeft; 106 | } 107 | [[UIApplication sharedApplication] keyWindow].userInteractionEnabled = NO; 108 | [self transitionFromViewController:fromViewController toViewController:toViewController 109 | duration:0.3 options:animationOptions animations:nil completion:^(BOOL finished) { 110 | if (finished) { 111 | _currentViewController = controller; 112 | _currentIndex = index; 113 | } 114 | [[UIApplication sharedApplication] keyWindow].userInteractionEnabled = YES; 115 | }]; 116 | } 117 | else{ 118 | [[self.view subviews] makeObjectsPerformSelector:@selector(removeFromSuperview)]; 119 | [self.view addSubview:toView]; 120 | _currentViewController = controller; 121 | _currentIndex = index; 122 | } 123 | } 124 | } 125 | 126 | - (void) switchToViewControllerAtIndex:(NSUInteger)index animated:(BOOL)animated 127 | { 128 | [self switchToViewController:[self.viewControllers objectAtIndex:index] animated:animated]; 129 | } 130 | //--------------------------------------------------------------------------------------------- 131 | @end 132 | -------------------------------------------------------------------------------- /External/Cedar-iOS.framework/Versions/A/Headers/HaveReceived.h: -------------------------------------------------------------------------------- 1 | #import "Base.h" 2 | #import "Argument.h" 3 | #import "objc/runtime.h" 4 | 5 | namespace Cedar { namespace Doubles { 6 | class HaveReceived : public Matchers::Base<> { 7 | private: 8 | HaveReceived & operator=(const HaveReceived &); 9 | 10 | public: 11 | explicit HaveReceived(const SEL); 12 | ~HaveReceived(); 13 | // Allow default copy ctor. 14 | 15 | template 16 | HaveReceived & with(const T &); 17 | template 18 | HaveReceived & and_with(const T & argument) { return with(argument); } 19 | 20 | bool matches(id) const; 21 | 22 | protected: 23 | virtual NSString * failure_message_end() const; 24 | 25 | private: 26 | void verify_object_is_a_double(id) const; 27 | bool matches_invocation(NSInvocation * const) const; 28 | bool matches_arguments(NSInvocation * const) const; 29 | void verify_correct_number_of_arguments(NSInvocation * const) const; 30 | 31 | private: 32 | const SEL expectedSelector_; 33 | 34 | typedef std::vector arguments_vector_t; 35 | arguments_vector_t arguments_; 36 | }; 37 | 38 | HaveReceived have_received(const SEL expectedSelector); 39 | HaveReceived have_received(const char * expectedMethod); 40 | 41 | template 42 | HaveReceived & HaveReceived::with(const T & value) { 43 | Argument *arg = new TypedArgument(value); 44 | 45 | arguments_.push_back(arg); 46 | return *this; 47 | } 48 | 49 | // This belongs in a separate implementation file, but doing so generates an 50 | // inscrutable linker error: 51 | // 52 | // ld: bad codegen, pointer diff in ___block_global_9 to global weak symbol 53 | // __ZTVN5Cedar8Matchers4BaseINS0_18BaseMessageBuilderEEE for architecture i386 54 | #pragma mark Implementation 55 | 56 | inline HaveReceived have_received(const SEL expectedSelector) { 57 | return HaveReceived(expectedSelector); 58 | } 59 | 60 | inline HaveReceived have_received(const char * expectedMethod) { 61 | return HaveReceived(NSSelectorFromString([NSString stringWithUTF8String:expectedMethod])); 62 | } 63 | 64 | inline HaveReceived::HaveReceived(const SEL expectedSelector) 65 | : Base<>(), expectedSelector_(expectedSelector) { 66 | } 67 | 68 | inline HaveReceived::~HaveReceived() { 69 | for (arguments_vector_t::const_iterator cit = arguments_.begin(); cit != arguments_.end(); ++cit) { 70 | delete *cit; 71 | } 72 | arguments_.clear(); 73 | } 74 | 75 | inline bool HaveReceived::matches(id instance) const { 76 | this->verify_object_is_a_double(instance); 77 | 78 | for (NSInvocation *invocation in [instance sent_messages]) { 79 | if (this->matches_invocation(invocation)) { 80 | return true; 81 | } 82 | } 83 | return false; 84 | } 85 | 86 | inline void HaveReceived::verify_object_is_a_double(id instance) const { 87 | if (![instance respondsToSelector:@selector(sent_messages)]) { 88 | [[CDRSpecFailure specFailureWithReason:[NSString stringWithFormat:@"Received expectation for non-double object <%@>", instance]] raise]; 89 | } 90 | } 91 | 92 | #pragma mark Protected interface 93 | inline /*virtual*/ NSString * HaveReceived::failure_message_end() const { 94 | NSMutableString *message = [NSMutableString stringWithFormat:@"have received message <%@>", NSStringFromSelector(expectedSelector_)]; 95 | if (arguments_.size()) { 96 | [message appendString:@", with arguments: <"]; 97 | arguments_vector_t::const_iterator cit = arguments_.begin(); 98 | [message appendString:(*cit++)->value_string()]; 99 | for (; cit != arguments_.end(); ++cit) { 100 | [message appendString:[NSString stringWithFormat:@", %@", (*cit)->value_string()]]; 101 | } 102 | [message appendString:@">"]; 103 | } 104 | return message; 105 | } 106 | 107 | #pragma mark Private interface 108 | inline bool HaveReceived::matches_invocation(NSInvocation * const invocation) const { 109 | return sel_isEqual(invocation.selector, expectedSelector_) && this->matches_arguments(invocation); 110 | } 111 | 112 | inline bool HaveReceived::matches_arguments(NSInvocation * const invocation) const { 113 | this->verify_correct_number_of_arguments(invocation); 114 | 115 | bool matches = true; 116 | size_t index = 2; 117 | for (arguments_vector_t::const_iterator cit = arguments_.begin(); cit != arguments_.end() && matches; ++cit, ++index) { 118 | const char *actualArgumentEncoding = [invocation.methodSignature getArgumentTypeAtIndex:index]; 119 | NSUInteger actualArgumentSize; 120 | NSGetSizeAndAlignment(actualArgumentEncoding, &actualArgumentSize, nil); 121 | 122 | char actualArgumentBytes[actualArgumentSize]; 123 | [invocation getArgument:&actualArgumentBytes atIndex:index]; 124 | matches = (*cit)->matches_bytes(&actualArgumentBytes); 125 | } 126 | return matches; 127 | } 128 | 129 | inline void HaveReceived::verify_correct_number_of_arguments(NSInvocation * const invocation) const { 130 | size_t expectedArgumentCount = arguments_.size(); 131 | size_t actualArgumentCount = invocation.methodSignature.numberOfArguments - 2; // 132 | 133 | if (expectedArgumentCount) { 134 | if (expectedArgumentCount < actualArgumentCount) { 135 | NSString *reason = [NSString stringWithFormat:@"Too few parameters expected for message <%@>; required %d, expected %d", NSStringFromSelector(expectedSelector_), actualArgumentCount, expectedArgumentCount]; 136 | [[CDRSpecFailure specFailureWithReason:reason] raise]; 137 | } else if (expectedArgumentCount > actualArgumentCount) { 138 | NSString *reason = [NSString stringWithFormat:@"Too many parameters expected for message <%@>; required %d, expected %d", NSStringFromSelector(expectedSelector_), actualArgumentCount, expectedArgumentCount]; 139 | [[CDRSpecFailure specFailureWithReason:reason] raise]; 140 | } 141 | } 142 | } 143 | 144 | }} 145 | -------------------------------------------------------------------------------- /External/Expecta/README.md: -------------------------------------------------------------------------------- 1 | # Expecta 2 | 3 | A Matcher Framework for Objective-C/Cocoa 4 | 5 | ## HOW IS IT BETTER? 6 | 7 | The main advantage of using Expecta over other matcher frameworks is that you do not have to specify the data types. Also, the syntax of Expecta matchers is much more readable and does not suffer from parenthesitis. If you have used [Jasmine](http://pivotal.github.com/jasmine/) before, you will feel right at home! 8 | 9 | **OCHamcrest** 10 | 11 | ```objective-c 12 | assertThat(@"foo", is(equalTo(@"foo"))); 13 | assertThatUnsignedInteger(foo, isNot(equalToUnsignedInteger(1))); 14 | assertThatBool([bar isBar], is(equalToBool(YES))); 15 | assertThatDouble(baz, is(equalToDouble(3.14159))); 16 | ``` 17 | 18 | vs. 19 | 20 | **Expecta** 21 | 22 | ```objective-c 23 | expect(@"foo").toEqual(@"foo"); 24 | expect(foo).Not.toEqual(1); 25 | expect([bar isBar]).toEqual(YES); 26 | expect(baz).toEqual(3.14159); 27 | ``` 28 | 29 | ## STATUS 30 | 31 | Still under heavy development, but usable. 32 | 33 | ## USAGE 34 | 35 | 1. Clone from Github. 36 | 2. Run `rake` in project root to build. 37 | 3. Copy and add all header files in `products` folder to the Spec/Test target in your Xcode project. 38 | 4. For **OS X projects**, copy and add `libExpecta-macosx.a` in `products` folder to the Spec/Test target in your Xcode project. 39 | For **iOS projects**, copy and add `libExpecta-ios-universal.a` in `products` folder to the Spec/Test target in your Xcode project. 40 | 5. Add `-ObjC` to the "Other Linker Flags" build setting for the Spec/Test target in your Xcode project. 41 | 6. Add the following to your test code. 42 | 43 | ```objective-c 44 | #define EXP_SHORTHAND 45 | #import "Expecta.h" 46 | ``` 47 | 48 | If `EXP_SHORTHAND` is not defined, expectations must be written with `EXP_expect` instead of `expect`. 49 | 50 | Expecta works best with [Cedar BDD Framework](http://pivotal.github.com/cedar/). 51 | 52 | ## BUILT-IN MATCHERS 53 | 54 | >`expect(x).toEqual(y);` compares objects or primitives x and y and passes if they are identical (==) or equivalent (isEqual:). 55 | > 56 | >`expect(x).toBeIdenticalTo(y);` compares objects x and y and passes if they are identical and have the same memory address. 57 | > 58 | >`expect(x).toBeNil();` passes if x is nil. 59 | > 60 | >`expect(x).toBeTruthy();` passes if x evaluates to true (non-zero). 61 | > 62 | >`expect(x).toBeFalsy();` passes if x evaluates to false (zero). 63 | > 64 | >`expect(x).toContain(y);` passes if an instance of NSArray or NSString x contains y. 65 | > 66 | >`expect(x).toBeInstanceOf([Foo class]);` passes if x is an instance of a class Foo. 67 | > 68 | >`expect(x).toBeKindOf([Foo class]);` passes if x is an instance of a class Foo or if x is an instance of any class that inherits from the class Foo. 69 | > 70 | >`expect([Foo class]).toBeSubclassOf([Bar class]);` passes if the class Foo is a subclass of the class Bar or if it is identical to the class Bar. Use toBeKindOf() for class clusters. 71 | > 72 | >`expect(x).toBeLessThan(y);` 73 | > 74 | >`expect(x).toBeLessThanOrEqualTo(y);` 75 | > 76 | >`expect(x).toBeGreaterThan(y);` 77 | > 78 | >`expect(x).toBeGreaterThanOrEqualTo(y);` 79 | 80 | **More matchers are coming soon!** 81 | 82 | ## INVERTING MATCHERS 83 | 84 | Every matcher's criteria can be inverted by prepending `.Not`: (It is with a capital `N` because `not` is a keyword in C++.) 85 | 86 | >`expect(x).Not.toEqual(y);` compares objects or primitives x and y and passes if they are *not* equivalent. 87 | 88 | ## ASYNCHRONOUS TESTING 89 | 90 | Every matcher can be made to perform asynchronous testing by prepending `.isGoing` or `.isNotGoing`: 91 | 92 | >`expect(x).isGoing.toBeNil();` passes if x becomes nil before the timeout. 93 | 94 | Default timeout is 1.0 second. This setting can be changed by calling `[Expecta setAsynchronousTestTimeout:x]`, where x is the desired timeout. 95 | 96 | ## WRITING NEW MATCHERS 97 | 98 | Writing a new matcher is easy with special macros provided by Expecta. Take a look at how `.toBeKindOf()` matcher is defined: 99 | 100 | `EXPMatchers+toBeKindOf.h` 101 | 102 | ```objective-c 103 | #import "Expecta.h" 104 | 105 | EXPMatcherInterface(toBeKindOf, (Class expected)); 106 | // 1st argument is the name of the matcher function 107 | // 2nd argument is the list of arguments that may be passed in the function call. 108 | // Multiple arguments are fine. (e.g. (int foo, float bar)) 109 | 110 | #define toBeAKindOf toBeKindOf 111 | ``` 112 | 113 | `EXPMatchers+toBeKindOf.m` 114 | 115 | ```objective-c 116 | #import "EXPMatchers+toBeKindOf.h" 117 | 118 | EXPMatcherImplementationBegin(toBeKindOf, (Class expected)) { 119 | BOOL actualIsNil = (actual == nil); 120 | BOOL expectedIsNil = (expected == nil); 121 | 122 | prerequisite(^BOOL{ 123 | return !(actualIsNil || expectedIsNil); 124 | // Return `NO` if matcher should fail whether or not the result is inverted using `.Not`. 125 | }); 126 | 127 | match(^BOOL{ 128 | return [actual isKindOfClass:expected]; 129 | // Return `YES` if the matcher should pass, `NO` if it should not. 130 | // The actual value/object is passed as `actual`. 131 | // Please note that primitive values will be wrapped in NSNumber/NSValue. 132 | }); 133 | 134 | failureMessageForTo(^NSString *{ 135 | if(actualIsNil) return @"the actual value is nil/null"; 136 | if(expectedIsNil) return @"the expected value is nil/null"; 137 | return [NSString stringWithFormat:@"expected: a kind of %@, " 138 | "got: an instance of %@, which is not a kind of %@", 139 | [expected class], [actual class], [expected class]]; 140 | // Return the message to be displayed when the match function returns `YES`. 141 | }); 142 | 143 | failureMessageForNotTo(^NSString *{ 144 | if(actualIsNil) return @"the actual value is nil/null"; 145 | if(expectedIsNil) return @"the expected value is nil/null"; 146 | return [NSString stringWithFormat:@"expected: not a kind of %@, " 147 | "got: an instance of %@, which is a kind of %@", 148 | [expected class], [actual class], [expected class]]; 149 | // Return the message to be displayed when the match function returns `NO`. 150 | }); 151 | } 152 | EXPMatcherImplementationEnd 153 | ``` 154 | 155 | ## CONTRIBUTION 156 | 157 | You can find the public Tracker project [here](https://www.pivotaltracker.com/projects/323267). 158 | 159 | ### CONTRIBUTION GUIDELINES 160 | 161 | * Please use only spaces and indent 2 spaces at a time. 162 | * Please prefix instance variable names with a single underscore (`_`). 163 | * Please prefix custom classes and functions defined in the global scope with `EXP`. 164 | 165 | ## LICENSE 166 | 167 | Copyright (c) 2011 Peter Jihoon Kim. This software is licensed under the MIT License. 168 | -------------------------------------------------------------------------------- /UISpecs/Classes/ASViewController/ASViewControllerSpec.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | #define EXP_SHORTHAND 5 | #import "Expecta.h" 6 | 7 | #import "ASViewController.h" 8 | #import "FakeCopyingArray.h" 9 | 10 | @interface ASViewController(SpecPrivate) 11 | @property(retain) NSMutableArray *subviewControllers; 12 | @end 13 | 14 | SPEC_BEGIN(ASViewControllerSpec) 15 | 16 | describe(@"ASViewController", ^{ 17 | __block ASViewController *viewController; 18 | __block UIViewController* childViewController; 19 | __block id mockChildViewController; 20 | 21 | context(@"when runned on pre iOS 5 system", ^{ 22 | 23 | beforeEach(^{ 24 | id mockCurrentDevice = [OCMockObject partialMockForObject:[UIDevice currentDevice]]; 25 | [(UIDevice*)[[mockCurrentDevice stub] andReturn:@"4.3"] systemVersion]; 26 | 27 | viewController = [[[ASViewController alloc] init] autorelease]; 28 | childViewController = [[[UIViewController alloc] init] autorelease]; 29 | mockChildViewController = [OCMockObject partialMockForObject:childViewController]; 30 | }); 31 | 32 | describe(@"when requesting childViewController", ^{ 33 | it(@"should return a copy of subviewControllers", ^{ 34 | FakeCopyingArray * fakeCopyingArray = [FakeCopyingArray array]; 35 | viewController.subviewControllers = (NSMutableArray *)fakeCopyingArray; 36 | 37 | NSArray * children1 = viewController.childViewControllers; 38 | NSArray * children2 = viewController.childViewControllers; 39 | expect(fakeCopyingArray.persistentFakeCopy).toEqual(children1); 40 | expect(children1).toEqual(children2); 41 | }); 42 | }); 43 | 44 | describe(@"when adding child view controller", ^{ 45 | 46 | it(@"should call KVC notifications on this child view controller", ^{ 47 | [[mockChildViewController expect] willChangeValueForKey:@"parentViewController"]; 48 | [[mockChildViewController expect] didChangeValueForKey:@"parentViewController"]; 49 | 50 | [viewController addChildViewController:mockChildViewController]; 51 | 52 | [mockChildViewController verify]; 53 | }); 54 | 55 | it(@"should call willMoveToParentViewController: when responds to it", ^{ 56 | [[mockChildViewController expect] willMoveToParentViewController:viewController]; 57 | 58 | [viewController addChildViewController:mockChildViewController]; 59 | 60 | [mockChildViewController verify]; 61 | }); 62 | 63 | it(@"should add view controller to childViewControllers", ^{ 64 | 65 | [viewController addChildViewController:mockChildViewController]; 66 | 67 | expect(viewController.childViewControllers).toContain(mockChildViewController); 68 | }); 69 | 70 | it(@"should associate view controller as parent view controller", ^{ 71 | 72 | [viewController addChildViewController:childViewController]; 73 | 74 | expect(childViewController.parentViewController).toEqual(viewController); 75 | }); 76 | 77 | it(@"should associate view controller's navigationController with child navigationController", ^{ 78 | UINavigationController * navigationController = [[[UINavigationController alloc] initWithRootViewController:viewController] autorelease]; 79 | 80 | [viewController addChildViewController:childViewController]; 81 | 82 | expect(childViewController.navigationController).toEqual(navigationController); 83 | }); 84 | 85 | it(@"should associate view controller's tabBarController with child tabBarController", ^{ 86 | UITabBarController * tabBarController = [[[UITabBarController alloc] init] autorelease]; 87 | [tabBarController setViewControllers:[NSArray arrayWithObject:viewController]]; 88 | 89 | [viewController addChildViewController:childViewController]; 90 | 91 | expect(childViewController.tabBarController).toEqual(tabBarController); 92 | }); 93 | 94 | }); 95 | 96 | describe(@"when child removes self from parent view controller", ^{ 97 | beforeEach(^{ 98 | [viewController addChildViewController:childViewController]; 99 | }); 100 | 101 | it(@"should call KVC notifications on this child view controller", ^{ 102 | [[mockChildViewController expect] willChangeValueForKey:@"parentViewController"]; 103 | [[mockChildViewController expect] didChangeValueForKey:@"parentViewController"]; 104 | 105 | [childViewController removeFromParentViewController]; 106 | 107 | [mockChildViewController verify]; 108 | }); 109 | 110 | 111 | it(@"should add view controller to childViewControllers", ^{ 112 | 113 | [childViewController removeFromParentViewController]; 114 | 115 | expect(viewController.childViewControllers).Not.toContain(mockChildViewController); 116 | }); 117 | 118 | 119 | it(@"should set parent view controller as nil", ^{ 120 | expect(childViewController.parentViewController).toEqual(viewController); 121 | 122 | [childViewController removeFromParentViewController]; 123 | 124 | expect(childViewController.parentViewController).toBeNil(); 125 | }); 126 | 127 | }); 128 | 129 | context(@"fowarding calls", ^{ 130 | __block UIViewController * forwardChildViewController; 131 | beforeEach(^{ 132 | forwardChildViewController = [[[UIViewController alloc] init] autorelease]; 133 | }); 134 | 135 | describe(@"shouldForwardCallbackToChildViewController:", ^{ 136 | context(@"when child view controller's view is not yet loaded", ^{ 137 | it(@"should retunr NO", ^{ 138 | BOOL result =[viewController shouldForwardCallbackToChildViewController:forwardChildViewController]; 139 | expect(result).toBeFalsy(); 140 | }); 141 | }); 142 | 143 | context(@"when child view controller's view is loaded", ^{ 144 | beforeEach(^{ 145 | [forwardChildViewController loadView]; 146 | }); 147 | 148 | context(@"and child view controller's view is not present in parent view controller's view's herachy tree", ^{ 149 | it(@"should return NO", ^{ 150 | BOOL result =[viewController shouldForwardCallbackToChildViewController:forwardChildViewController]; 151 | expect(result).toBeFalsy(); 152 | }); 153 | }); 154 | 155 | context(@"and child view controller's view is present in parent view controller's view's herachy tree", ^{ 156 | context(@"and it is it's subview", ^{ 157 | beforeEach(^{ 158 | [viewController.view addSubview:forwardChildViewController.view]; 159 | }); 160 | 161 | it(@"should return YES", ^{ 162 | BOOL result =[viewController shouldForwardCallbackToChildViewController:forwardChildViewController]; 163 | expect(result).toBeTruthy(); 164 | }); 165 | }); 166 | 167 | context(@"and it is one of subviews' subview", ^{ 168 | it(@"should pass at least up to 10 levels of depth", ^{ 169 | for (int numberOfViewInBetween = 1; numberOfViewInBetween <= 10; numberOfViewInBetween++) { 170 | ASViewController * localParentViewController = [[[ASViewController alloc] init] autorelease]; 171 | UIViewController * localChildViewController = [[[UIViewController alloc] init] autorelease]; 172 | UIView *topView = localParentViewController.view; 173 | for (int i = 0; i < numberOfViewInBetween; i++) { 174 | UIView *newTopView = [[[UIView alloc] init] autorelease]; 175 | [topView addSubview:newTopView]; 176 | topView = newTopView; 177 | } 178 | [topView addSubview:localChildViewController.view]; 179 | 180 | BOOL result =[localParentViewController shouldForwardCallbackToChildViewController:localChildViewController]; 181 | expect(result).toBeTruthy(); 182 | } 183 | }); 184 | }); 185 | }); 186 | 187 | }); 188 | 189 | }); 190 | }); 191 | 192 | context(@"when view lifecycle changes", ^{ 193 | __block id mockChildViewController1; 194 | __block id mockChildViewController2; 195 | __block id mockChildViewController3; 196 | 197 | beforeEach(^{ 198 | UIViewController * childViewController1 = [[[UIViewController alloc] init] autorelease]; 199 | [childViewController1 loadView]; 200 | UIViewController * childViewController2 = [[[UIViewController alloc] init] autorelease]; 201 | [childViewController2 loadView]; 202 | UIViewController * childViewController3 = [[[UIViewController alloc] init] autorelease]; 203 | [childViewController3 loadView]; 204 | 205 | mockChildViewController1 = [OCMockObject partialMockForObject:childViewController1]; 206 | mockChildViewController2 = [OCMockObject partialMockForObject:childViewController2]; 207 | mockChildViewController3 = [OCMockObject partialMockForObject:childViewController3]; 208 | 209 | [viewController addChildViewController:mockChildViewController1]; 210 | [viewController addChildViewController:mockChildViewController2]; 211 | [viewController addChildViewController:mockChildViewController3]; 212 | 213 | [viewController.view addSubview:childViewController1.view]; 214 | [viewController.view addSubview:childViewController2.view]; 215 | //not adding view of 3rd child VC 216 | }); 217 | 218 | describe(@"when container view controller did unload", ^{ 219 | it(@"should call didReceiveMemoryWarning on children", ^{ 220 | [[mockChildViewController1 expect] didReceiveMemoryWarning]; 221 | [[mockChildViewController2 expect] didReceiveMemoryWarning]; 222 | [[mockChildViewController3 expect] didReceiveMemoryWarning]; 223 | 224 | [viewController viewDidUnload]; 225 | 226 | [mockChildViewController1 verify]; 227 | [mockChildViewController2 verify]; 228 | [mockChildViewController3 verify]; 229 | }); 230 | }); 231 | 232 | describe(@"when view controller apperaince changes", ^{ 233 | describe(@"on displaying", ^{ 234 | it(@"should forward calls to subviewControllers", ^{ 235 | [[mockChildViewController1 expect] viewWillAppear:YES]; 236 | [[mockChildViewController2 expect] viewWillAppear:YES]; 237 | [[mockChildViewController3 reject] viewWillAppear:YES]; 238 | 239 | [[mockChildViewController1 expect] viewDidAppear:YES]; 240 | [[mockChildViewController2 expect] viewDidAppear:YES]; 241 | [[mockChildViewController3 reject] viewDidAppear:YES]; 242 | 243 | [viewController viewWillAppear:YES]; 244 | [viewController viewDidAppear:YES]; 245 | 246 | [mockChildViewController1 verify]; 247 | [mockChildViewController2 verify]; 248 | [mockChildViewController3 verify]; 249 | }); 250 | }); 251 | 252 | describe(@"on hidding", ^{ 253 | it(@"should forward calls to subviewControllers", ^{ 254 | [[mockChildViewController1 expect] viewWillDisappear:YES]; 255 | [[mockChildViewController2 expect] viewWillDisappear:YES]; 256 | [[mockChildViewController3 reject] viewWillDisappear:YES]; 257 | 258 | [[mockChildViewController1 expect] viewDidDisappear:YES]; 259 | [[mockChildViewController2 expect] viewDidDisappear:YES]; 260 | [[mockChildViewController3 reject] viewDidDisappear:YES]; 261 | 262 | [viewController viewWillDisappear:YES]; 263 | [viewController viewDidDisappear:YES]; 264 | 265 | [mockChildViewController1 verify]; 266 | [mockChildViewController2 verify]; 267 | [mockChildViewController3 verify]; 268 | }); 269 | }); 270 | }); 271 | 272 | describe(@"when view controller rotates", ^{ 273 | it(@"should forward calls to subviewControllers", ^{ 274 | [[mockChildViewController1 expect] willRotateToInterfaceOrientation:UIInterfaceOrientationPortraitUpsideDown duration:2]; 275 | [[mockChildViewController2 expect] willRotateToInterfaceOrientation:UIInterfaceOrientationPortraitUpsideDown duration:2]; 276 | [[mockChildViewController3 reject] willRotateToInterfaceOrientation:UIInterfaceOrientationPortraitUpsideDown duration:2]; 277 | 278 | [[mockChildViewController1 expect] willAnimateRotationToInterfaceOrientation:UIInterfaceOrientationPortraitUpsideDown duration:2]; 279 | [[mockChildViewController2 expect] willAnimateRotationToInterfaceOrientation:UIInterfaceOrientationPortraitUpsideDown duration:2]; 280 | [[mockChildViewController3 reject] willAnimateRotationToInterfaceOrientation:UIInterfaceOrientationPortraitUpsideDown duration:2]; 281 | 282 | [[mockChildViewController1 expect] didRotateFromInterfaceOrientation:UIInterfaceOrientationPortraitUpsideDown]; 283 | [[mockChildViewController2 expect] didRotateFromInterfaceOrientation:UIInterfaceOrientationPortraitUpsideDown]; 284 | [[mockChildViewController3 reject] didRotateFromInterfaceOrientation:UIInterfaceOrientationPortraitUpsideDown]; 285 | 286 | [viewController willRotateToInterfaceOrientation:UIInterfaceOrientationPortraitUpsideDown duration:2]; 287 | [viewController willAnimateRotationToInterfaceOrientation:UIInterfaceOrientationPortraitUpsideDown duration:2]; 288 | [viewController didRotateFromInterfaceOrientation:UIInterfaceOrientationPortraitUpsideDown]; 289 | 290 | [mockChildViewController1 verify]; 291 | [mockChildViewController2 verify]; 292 | [mockChildViewController3 verify]; 293 | }); 294 | }); 295 | 296 | }); 297 | 298 | }); 299 | 300 | }); 301 | 302 | SPEC_END 303 | -------------------------------------------------------------------------------- /ASViewControllerExample/Classes/ASViewController/ASViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // Created by Lukasz Warchol on 11/21/11. 3 | // 4 | 5 | #import "ASViewController.h" 6 | #import 7 | 8 | #define IF_PRE_IOS5(...) \ 9 | if ([[[UIDevice currentDevice] systemVersion] intValue] < 5) \ 10 | { \ 11 | __VA_ARGS__ \ 12 | } 13 | 14 | @interface NSArray(SelectiveMethodPerforming) 15 | - (void) executeBlock:(void (^)(id obj))block 16 | forObjectsPassingTest:(BOOL (^)(id obj, NSUInteger idx, BOOL *stop))predicate; 17 | 18 | @end 19 | 20 | @implementation NSArray(SelectiveMethodPerforming) 21 | 22 | - (void) executeBlock:(void (^)(id obj))block 23 | forObjectsPassingTest:(BOOL (^)(id obj, NSUInteger idx, BOOL *stop))predicate 24 | { 25 | [self enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { 26 | if (predicate(obj, idx, stop)) { 27 | block(obj); 28 | } 29 | }]; 30 | } 31 | @end 32 | 33 | @interface ASViewControllerSwizzler : NSObject 34 | + (void) associateChildViewController:(UIViewController *)childController 35 | withParentViewController:(UIViewController *)parentViewController; 36 | + (void) swizzleChildViewControllerMethods:(UIViewController *)childController; 37 | + (void) addRemoveFromParentViewControllerMethodIfNeeded:(UIViewController *)controller; 38 | @end 39 | 40 | @interface ASViewController() 41 | @property(retain) NSMutableArray *subviewControllers; 42 | @end 43 | 44 | 45 | @implementation ASViewController 46 | @synthesize subviewControllers = _subviewControllers; 47 | 48 | - (BOOL)useIOS5Implementations { 49 | IF_PRE_IOS5( 50 | return NO; 51 | ); 52 | return YES; 53 | } 54 | 55 | #pragma mark - Lifecycle 56 | 57 | - (id)init 58 | { 59 | self = [super init]; 60 | if (self) { 61 | IF_PRE_IOS5( 62 | self.subviewControllers = [NSMutableArray array]; 63 | ); 64 | } 65 | return self; 66 | } 67 | 68 | 69 | - (void)dealloc 70 | { 71 | [_subviewControllers release]; 72 | _subviewControllers = nil; 73 | [super dealloc]; 74 | } 75 | 76 | - (void)didReceiveMemoryWarning 77 | { 78 | [super didReceiveMemoryWarning]; 79 | for (UIViewController *viewController in _subviewControllers) { 80 | [viewController didReceiveMemoryWarning]; 81 | } 82 | } 83 | 84 | #pragma mark - View lifecycle 85 | 86 | - (BOOL)shouldForwardCallbackToChildViewController:(UIViewController *)childViewController { 87 | BOOL shouldForward = NO; 88 | if ([childViewController isViewLoaded]) { 89 | UIView * superview = childViewController.view.superview; 90 | while (superview != nil) { 91 | if (superview == self.view) { 92 | shouldForward = YES; 93 | break; 94 | } 95 | superview = superview.superview; 96 | } 97 | } 98 | return shouldForward; 99 | } 100 | 101 | - (void) executeBlockOnApplicableSubviewControllers:(void(^)(UIViewController * viewController))block 102 | { 103 | [_subviewControllers executeBlock:block 104 | forObjectsPassingTest:^(id obj, NSUInteger idx, BOOL *stop){ 105 | return [self shouldForwardCallbackToChildViewController:obj]; 106 | }]; 107 | } 108 | 109 | - (void)viewDidUnload 110 | { 111 | [super viewDidUnload]; 112 | //! if parent unloaded then its time to ask children to unload as parent view no longer retains their views 113 | //! this is the RIGHT way to make sub controllers unload their views if they are not retained in other places 114 | [_subviewControllers makeObjectsPerformSelector:@selector(didReceiveMemoryWarning)]; 115 | } 116 | 117 | - (void)viewWillAppear:(BOOL)animated 118 | { 119 | [super viewWillAppear:animated]; 120 | [self executeBlockOnApplicableSubviewControllers:^(UIViewController * viewController){ 121 | [viewController viewWillAppear:animated]; 122 | }]; 123 | } 124 | 125 | - (void)viewDidAppear:(BOOL)animated 126 | { 127 | [super viewDidAppear:animated]; 128 | [self executeBlockOnApplicableSubviewControllers:^(UIViewController * viewController){ 129 | [viewController viewDidAppear:animated]; 130 | }]; 131 | } 132 | 133 | - (void)viewWillDisappear:(BOOL)animated 134 | { 135 | [super viewWillDisappear:animated]; 136 | [self executeBlockOnApplicableSubviewControllers:^(UIViewController * viewController){ 137 | [viewController viewWillDisappear:animated]; 138 | }]; 139 | } 140 | 141 | - (void)viewDidDisappear:(BOOL)animated 142 | { 143 | [super viewDidDisappear:animated]; 144 | [self executeBlockOnApplicableSubviewControllers:^(UIViewController * viewController){ 145 | [viewController viewDidDisappear:animated]; 146 | }]; 147 | } 148 | 149 | #pragma mark - Rotation 150 | 151 | - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 152 | { 153 | __block BOOL rotate = YES; 154 | [self executeBlockOnApplicableSubviewControllers:^(UIViewController * viewController){ 155 | rotate &= [viewController shouldAutorotateToInterfaceOrientation:interfaceOrientation]; 156 | }]; 157 | return rotate; 158 | } 159 | 160 | - (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration 161 | { 162 | [super willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration]; 163 | [self executeBlockOnApplicableSubviewControllers:^(UIViewController * viewController){ 164 | [viewController willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration]; 165 | }]; 166 | } 167 | 168 | - (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration 169 | { 170 | [super willAnimateRotationToInterfaceOrientation:toInterfaceOrientation duration:duration]; 171 | [self executeBlockOnApplicableSubviewControllers:^(UIViewController * viewController){ 172 | [viewController willAnimateRotationToInterfaceOrientation:toInterfaceOrientation duration:duration]; 173 | }]; 174 | } 175 | 176 | - (void) didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation 177 | { 178 | [super didRotateFromInterfaceOrientation:fromInterfaceOrientation]; 179 | [self executeBlockOnApplicableSubviewControllers:^(UIViewController * viewController){ 180 | [viewController didRotateFromInterfaceOrientation:fromInterfaceOrientation]; 181 | }]; 182 | } 183 | 184 | #pragma mark - Managing Child View Controllers 185 | 186 | - (NSArray*) childViewControllers 187 | { 188 | if ([self useIOS5Implementations]) { 189 | return [super childViewControllers]; 190 | }else{ 191 | return [[_subviewControllers copy] autorelease]; 192 | } 193 | } 194 | 195 | - (void) addChildViewController:(UIViewController *)childController 196 | { 197 | if ([self useIOS5Implementations]) { 198 | [super addChildViewController:childController]; 199 | } 200 | else { 201 | [childController willChangeValueForKey:@"parentViewController"]; 202 | if ([childController respondsToSelector:@selector(willMoveToParentViewController:)]) { 203 | [childController willMoveToParentViewController:self]; 204 | } 205 | 206 | [ASViewControllerSwizzler associateChildViewController:childController withParentViewController:self]; 207 | [ASViewControllerSwizzler swizzleChildViewControllerMethods:childController]; 208 | [ASViewControllerSwizzler addRemoveFromParentViewControllerMethodIfNeeded:childController]; 209 | 210 | [_subviewControllers addObject:childController]; 211 | [childController didChangeValueForKey:@"parentViewController"]; 212 | } 213 | } 214 | 215 | - (void)removeFromParentViewController 216 | { 217 | if ([self useIOS5Implementations]) { 218 | [super removeFromParentViewController]; 219 | } 220 | else{ 221 | [self willChangeValueForKey:@"parentViewController"]; 222 | ASViewController* parentViewController = (ASViewController *) self.parentViewController; 223 | [parentViewController.subviewControllers removeObject:self]; 224 | [ASViewControllerSwizzler associateChildViewController:self withParentViewController:nil]; 225 | [self didChangeValueForKey:@"parentViewController"]; 226 | if ([self respondsToSelector:@selector(didMoveToParentViewController:)]) { 227 | [self didMoveToParentViewController:nil]; 228 | } 229 | } 230 | } 231 | 232 | - (void)transitionFromViewController:(UIViewController *)fromViewController toViewController:(UIViewController *)toViewController duration:(NSTimeInterval)duration 233 | options:(UIViewAnimationOptions)options animations:(void (^)(void))animations completion:(void (^)(BOOL finished))completion 234 | { 235 | UIView* fromView = fromViewController.view; 236 | UIView* toView = toViewController.view; 237 | UIView* parentView = fromView.superview; 238 | [parentView addSubview:toView]; 239 | 240 | if ([self useIOS5Implementations]) { 241 | [super transitionFromViewController:fromViewController toViewController:toViewController duration:duration options:options animations:animations completion:completion]; 242 | } 243 | else{ 244 | if (fromViewController.parentViewController != toViewController.parentViewController) { 245 | NSString* reason = [NSString stringWithFormat:@"Children view controllers %@ and %@ must have a common parent view controller when calling -[UIViewController transitionFromViewController:toViewController:duration:options:animations:completion:]", fromViewController, toViewController]; 246 | [[NSException exceptionWithName:NSInvalidArgumentException reason:reason userInfo:nil] raise]; 247 | } 248 | BOOL animated = duration>0; 249 | [fromViewController viewWillDisappear:animated]; 250 | [toViewController viewWillAppear:animated]; 251 | 252 | [UIView transitionWithView:parentView duration:duration options:options animations:animations completion:^(BOOL finished){ 253 | [fromView removeFromSuperview]; 254 | if (completion) { 255 | completion(finished); 256 | } 257 | [fromViewController viewDidDisappear:animated]; 258 | [toViewController viewDidAppear:animated]; 259 | }]; 260 | } 261 | } 262 | 263 | #pragma mark - Managing the Layout of Contained View Controllers 264 | 265 | - (void)willMoveToParentViewController:(UIViewController *)parent 266 | { 267 | if ([self useIOS5Implementations]) { 268 | [super willMoveToParentViewController:parent]; 269 | } 270 | } 271 | 272 | - (void)didMoveToParentViewController:(UIViewController *)parent 273 | { 274 | if ([self useIOS5Implementations]) { 275 | [super didMoveToParentViewController:parent]; 276 | } 277 | } 278 | 279 | @end 280 | 281 | @implementation ASViewControllerSwizzler 282 | 283 | static NSString *ASViewControllerParentControllerKey = @"ASViewControllerParentControllerKey"; 284 | 285 | + (void) associateChildViewController:(UIViewController *)childController 286 | withParentViewController:(UIViewController *)parentViewController 287 | { 288 | objc_setAssociatedObject(childController, ASViewControllerParentControllerKey, nil, OBJC_ASSOCIATION_ASSIGN); 289 | objc_setAssociatedObject(childController, ASViewControllerParentControllerKey, parentViewController, OBJC_ASSOCIATION_ASSIGN); 290 | } 291 | 292 | + (void) swizzleChildViewControllerMethods:(UIViewController *)childController 293 | { 294 | if (objc_getAssociatedObject(childController, ASViewControllerParentControllerKey) == nil){ 295 | NSString * reason = [NSString stringWithFormat:@"No parent view controller assigned to this child view controller. You should use '%@' to achieve this.", 296 | NSStringFromSelector(@selector(associateChildViewController:withParentViewController:))]; 297 | [[NSException exceptionWithName:NSObjectNotAvailableException reason:reason 298 | userInfo:nil] raise]; 299 | } 300 | 301 | { // parentViewController 302 | Method replacingMethod = class_getInstanceMethod([self class], @selector(swizzlingParentViewController)); 303 | Method replacedMethod = class_getInstanceMethod([childController class], @selector(parentViewController)); 304 | class_addMethod([childController class], @selector(originalParentViewController), method_getImplementation(replacedMethod), method_getTypeEncoding(replacedMethod)); 305 | class_addMethod([childController class], @selector(parentViewController), method_getImplementation(replacingMethod), method_getTypeEncoding(replacingMethod)); 306 | } 307 | { // navigationViewController 308 | Method replacingMethod = class_getInstanceMethod([self class], @selector(swizzlingNavigationController)); 309 | Method replacedMethod = class_getInstanceMethod([childController class], @selector(navigationController)); 310 | class_addMethod([childController class], @selector(originalNavigationController), method_getImplementation(replacedMethod), method_getTypeEncoding(replacedMethod)); 311 | class_addMethod([childController class], @selector(navigationController), method_getImplementation(replacingMethod), method_getTypeEncoding(replacingMethod)); 312 | } 313 | { // tabBarViewController 314 | Method replacingMethod = class_getInstanceMethod([self class], @selector(swizzlingTabBarController)); 315 | Method replacedMethod = class_getInstanceMethod([childController class], @selector(tabBarController)); 316 | class_addMethod([childController class], @selector(originalTabBarController), method_getImplementation(replacedMethod), method_getTypeEncoding(replacedMethod)); 317 | class_addMethod([childController class], @selector(tabBarController), method_getImplementation(replacingMethod), method_getTypeEncoding(replacingMethod)); 318 | } 319 | } 320 | 321 | + (void) addRemoveFromParentViewControllerMethodIfNeeded:(UIViewController *)controller { 322 | IF_PRE_IOS5( 323 | Method newRespondsMethod = class_getInstanceMethod([ASViewController class], @selector(useIOS5Implementations)); 324 | Method newRemoveMethod = class_getInstanceMethod([ASViewController class], @selector(removeFromParentViewController)); 325 | class_addMethod([controller class], @selector(useIOS5Implementations), method_getImplementation(newRespondsMethod), method_getTypeEncoding(newRespondsMethod)); 326 | class_addMethod([controller class], @selector(removeFromParentViewController), method_getImplementation(newRemoveMethod), method_getTypeEncoding(newRemoveMethod)); 327 | ); 328 | } 329 | 330 | #pragma mark - Swizzling methods 331 | 332 | - (UINavigationController*)swizzlingNavigationController 333 | { 334 | UIViewController *parentController = objc_getAssociatedObject(self, ASViewControllerParentControllerKey); 335 | if (parentController) { 336 | return parentController.navigationController; 337 | } else { 338 | return [self performSelector:@selector(originalNavigationController)]; 339 | } 340 | } 341 | 342 | - (UIViewController*)swizzlingParentViewController 343 | { 344 | UIViewController *parentController = objc_getAssociatedObject(self, ASViewControllerParentControllerKey); 345 | if (parentController) { 346 | return parentController; 347 | } else { 348 | return [self performSelector:@selector(originalParentViewController)]; 349 | } 350 | } 351 | 352 | - (UITabBarController*)swizzlingTabBarController 353 | { 354 | UIViewController *parentController = objc_getAssociatedObject(self, ASViewControllerParentControllerKey); 355 | if (parentController) { 356 | return parentController.tabBarController; 357 | } else { 358 | return [self performSelector:@selector(originalTabBarController)]; 359 | } 360 | } 361 | 362 | @end 363 | -------------------------------------------------------------------------------- /ASViewControllerExample.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 8666D080155053C300B1635D /* ASViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8666D07F155053C300B1635D /* ASViewController.m */; }; 11 | 8666D081155053C300B1635D /* ASViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8666D07F155053C300B1635D /* ASViewController.m */; }; 12 | 8666D084155053E400B1635D /* ASViewControllerSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 8666D083155053E400B1635D /* ASViewControllerSpec.m */; }; 13 | 8666D0871550541A00B1635D /* ASEColoredViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8666D0861550541A00B1635D /* ASEColoredViewController.m */; }; 14 | 8666D0881550541A00B1635D /* ASEColoredViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8666D0861550541A00B1635D /* ASEColoredViewController.m */; }; 15 | 8666D09A15505B1900B1635D /* ASFlipViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8666D09915505B1900B1635D /* ASFlipViewController.m */; }; 16 | 8666D09B15505B1900B1635D /* ASFlipViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 8666D09915505B1900B1635D /* ASFlipViewController.m */; }; 17 | 8679C569154E897D00198B69 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8679C568154E897D00198B69 /* UIKit.framework */; }; 18 | 8679C56B154E897D00198B69 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8679C56A154E897D00198B69 /* Foundation.framework */; }; 19 | 8679C56D154E897D00198B69 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8679C56C154E897D00198B69 /* CoreGraphics.framework */; }; 20 | 8679C573154E897D00198B69 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 8679C571154E897D00198B69 /* InfoPlist.strings */; }; 21 | 8679C575154E897D00198B69 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 8679C574154E897D00198B69 /* main.m */; }; 22 | 8679C579154E897D00198B69 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 8679C578154E897D00198B69 /* AppDelegate.m */; }; 23 | 8679C592154E8BA600198B69 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8679C568154E897D00198B69 /* UIKit.framework */; }; 24 | 8679C593154E8BA600198B69 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8679C56A154E897D00198B69 /* Foundation.framework */; }; 25 | 8679C594154E8BA600198B69 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8679C56C154E897D00198B69 /* CoreGraphics.framework */; }; 26 | 8679C59A154E8BA600198B69 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 8679C598154E8BA600198B69 /* InfoPlist.strings */; }; 27 | 8679C59C154E8BA600198B69 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 8679C59B154E8BA600198B69 /* main.m */; }; 28 | 8679C5C1154E8C0400198B69 /* Cedar-iOS.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8679C5A5154E8C0400198B69 /* Cedar-iOS.framework */; }; 29 | 8679C5C2154E8C0400198B69 /* libExpecta-ios-universal.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 8679C5BB154E8C0400198B69 /* libExpecta-ios-universal.a */; }; 30 | 8679C5C3154E8C0400198B69 /* LICENSE in Resources */ = {isa = PBXBuildFile; fileRef = 8679C5BC154E8C0400198B69 /* LICENSE */; }; 31 | 8679C5C4154E8C0400198B69 /* README.md in Resources */ = {isa = PBXBuildFile; fileRef = 8679C5BF154E8C0400198B69 /* README.md */; }; 32 | 8679C5C5154E8C0400198B69 /* OCMock-iPhone.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8679C5C0154E8C0400198B69 /* OCMock-iPhone.framework */; }; 33 | 8679C5D0154E903B00198B69 /* FakeCopyingArray.m in Sources */ = {isa = PBXBuildFile; fileRef = 8679C5CF154E903B00198B69 /* FakeCopyingArray.m */; }; 34 | 86E40889162715F0006CB185 /* ASViewController.podspec in Resources */ = {isa = PBXBuildFile; fileRef = 86E40888162715F0006CB185 /* ASViewController.podspec */; }; 35 | /* End PBXBuildFile section */ 36 | 37 | /* Begin PBXFileReference section */ 38 | 8666D07E155053C300B1635D /* ASViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASViewController.h; sourceTree = ""; }; 39 | 8666D07F155053C300B1635D /* ASViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ASViewController.m; sourceTree = ""; }; 40 | 8666D083155053E400B1635D /* ASViewControllerSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ASViewControllerSpec.m; sourceTree = ""; }; 41 | 8666D0851550541A00B1635D /* ASEColoredViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASEColoredViewController.h; sourceTree = ""; }; 42 | 8666D0861550541A00B1635D /* ASEColoredViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ASEColoredViewController.m; sourceTree = ""; }; 43 | 8666D09815505B1900B1635D /* ASFlipViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASFlipViewController.h; sourceTree = ""; }; 44 | 8666D09915505B1900B1635D /* ASFlipViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ASFlipViewController.m; sourceTree = ""; }; 45 | 8679C564154E897D00198B69 /* ASViewControllerExample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ASViewControllerExample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 46 | 8679C568154E897D00198B69 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; 47 | 8679C56A154E897D00198B69 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 48 | 8679C56C154E897D00198B69 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; 49 | 8679C570154E897D00198B69 /* ASViewControllerExample-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "ASViewControllerExample-Info.plist"; sourceTree = ""; }; 50 | 8679C572154E897D00198B69 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 51 | 8679C574154E897D00198B69 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 52 | 8679C576154E897D00198B69 /* ASViewControllerExample-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "ASViewControllerExample-Prefix.pch"; sourceTree = ""; }; 53 | 8679C577154E897D00198B69 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 54 | 8679C578154E897D00198B69 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 55 | 8679C590154E8BA600198B69 /* UISpecs.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = UISpecs.app; sourceTree = BUILT_PRODUCTS_DIR; }; 56 | 8679C597154E8BA600198B69 /* UISpecs-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "UISpecs-Info.plist"; sourceTree = ""; }; 57 | 8679C599154E8BA600198B69 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; }; 58 | 8679C59B154E8BA600198B69 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 59 | 8679C59D154E8BA600198B69 /* UISpecs-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "UISpecs-Prefix.pch"; sourceTree = ""; }; 60 | 8679C5A5154E8C0400198B69 /* Cedar-iOS.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = "Cedar-iOS.framework"; sourceTree = ""; }; 61 | 8679C5A7154E8C0400198B69 /* Expecta.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Expecta.h; sourceTree = ""; }; 62 | 8679C5A8154E8C0400198B69 /* ExpectaSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExpectaSupport.h; sourceTree = ""; }; 63 | 8679C5A9154E8C0400198B69 /* EXPExpect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EXPExpect.h; sourceTree = ""; }; 64 | 8679C5AA154E8C0400198B69 /* EXPMatcherHelpers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EXPMatcherHelpers.h; sourceTree = ""; }; 65 | 8679C5AB154E8C0400198B69 /* EXPMatchers+toBeFalsy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "EXPMatchers+toBeFalsy.h"; sourceTree = ""; }; 66 | 8679C5AC154E8C0400198B69 /* EXPMatchers+toBeGreaterThan.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "EXPMatchers+toBeGreaterThan.h"; sourceTree = ""; }; 67 | 8679C5AD154E8C0400198B69 /* EXPMatchers+toBeGreaterThanOrEqualTo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "EXPMatchers+toBeGreaterThanOrEqualTo.h"; sourceTree = ""; }; 68 | 8679C5AE154E8C0400198B69 /* EXPMatchers+toBeIdenticalTo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "EXPMatchers+toBeIdenticalTo.h"; sourceTree = ""; }; 69 | 8679C5AF154E8C0400198B69 /* EXPMatchers+toBeInstanceOf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "EXPMatchers+toBeInstanceOf.h"; sourceTree = ""; }; 70 | 8679C5B0154E8C0400198B69 /* EXPMatchers+toBeInTheRangeOf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "EXPMatchers+toBeInTheRangeOf.h"; sourceTree = ""; }; 71 | 8679C5B1154E8C0400198B69 /* EXPMatchers+toBeKindOf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "EXPMatchers+toBeKindOf.h"; sourceTree = ""; }; 72 | 8679C5B2154E8C0400198B69 /* EXPMatchers+toBeLessThan.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "EXPMatchers+toBeLessThan.h"; sourceTree = ""; }; 73 | 8679C5B3154E8C0400198B69 /* EXPMatchers+toBeLessThanOrEqualTo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "EXPMatchers+toBeLessThanOrEqualTo.h"; sourceTree = ""; }; 74 | 8679C5B4154E8C0400198B69 /* EXPMatchers+toBeNil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "EXPMatchers+toBeNil.h"; sourceTree = ""; }; 75 | 8679C5B5154E8C0400198B69 /* EXPMatchers+toBeSubclassOf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "EXPMatchers+toBeSubclassOf.h"; sourceTree = ""; }; 76 | 8679C5B6154E8C0400198B69 /* EXPMatchers+toBeTruthy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "EXPMatchers+toBeTruthy.h"; sourceTree = ""; }; 77 | 8679C5B7154E8C0400198B69 /* EXPMatchers+toContain.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "EXPMatchers+toContain.h"; sourceTree = ""; }; 78 | 8679C5B8154E8C0400198B69 /* EXPMatchers+toEqual.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "EXPMatchers+toEqual.h"; sourceTree = ""; }; 79 | 8679C5B9154E8C0400198B69 /* EXPMatchers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EXPMatchers.h; sourceTree = ""; }; 80 | 8679C5BA154E8C0400198B69 /* EXPUnsupportedObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EXPUnsupportedObject.h; sourceTree = ""; }; 81 | 8679C5BB154E8C0400198B69 /* libExpecta-ios-universal.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libExpecta-ios-universal.a"; sourceTree = ""; }; 82 | 8679C5BC154E8C0400198B69 /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; 83 | 8679C5BD154E8C0400198B69 /* NSObject+Expecta.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSObject+Expecta.h"; sourceTree = ""; }; 84 | 8679C5BE154E8C0400198B69 /* NSValue+Expecta.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "NSValue+Expecta.h"; sourceTree = ""; }; 85 | 8679C5BF154E8C0400198B69 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.md; sourceTree = ""; }; 86 | 8679C5C0154E8C0400198B69 /* OCMock-iPhone.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = "OCMock-iPhone.framework"; sourceTree = ""; }; 87 | 8679C5CE154E903B00198B69 /* FakeCopyingArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FakeCopyingArray.h; sourceTree = ""; }; 88 | 8679C5CF154E903B00198B69 /* FakeCopyingArray.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FakeCopyingArray.m; sourceTree = ""; }; 89 | 86E40888162715F0006CB185 /* ASViewController.podspec */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ASViewController.podspec; sourceTree = ""; }; 90 | /* End PBXFileReference section */ 91 | 92 | /* Begin PBXFrameworksBuildPhase section */ 93 | 8679C561154E897D00198B69 /* Frameworks */ = { 94 | isa = PBXFrameworksBuildPhase; 95 | buildActionMask = 2147483647; 96 | files = ( 97 | 8679C569154E897D00198B69 /* UIKit.framework in Frameworks */, 98 | 8679C56B154E897D00198B69 /* Foundation.framework in Frameworks */, 99 | 8679C56D154E897D00198B69 /* CoreGraphics.framework in Frameworks */, 100 | ); 101 | runOnlyForDeploymentPostprocessing = 0; 102 | }; 103 | 8679C58D154E8BA600198B69 /* Frameworks */ = { 104 | isa = PBXFrameworksBuildPhase; 105 | buildActionMask = 2147483647; 106 | files = ( 107 | 8679C592154E8BA600198B69 /* UIKit.framework in Frameworks */, 108 | 8679C593154E8BA600198B69 /* Foundation.framework in Frameworks */, 109 | 8679C594154E8BA600198B69 /* CoreGraphics.framework in Frameworks */, 110 | 8679C5C1154E8C0400198B69 /* Cedar-iOS.framework in Frameworks */, 111 | 8679C5C2154E8C0400198B69 /* libExpecta-ios-universal.a in Frameworks */, 112 | 8679C5C5154E8C0400198B69 /* OCMock-iPhone.framework in Frameworks */, 113 | ); 114 | runOnlyForDeploymentPostprocessing = 0; 115 | }; 116 | /* End PBXFrameworksBuildPhase section */ 117 | 118 | /* Begin PBXGroup section */ 119 | 8666D07D155053C300B1635D /* ASViewController */ = { 120 | isa = PBXGroup; 121 | children = ( 122 | 8666D07E155053C300B1635D /* ASViewController.h */, 123 | 8666D07F155053C300B1635D /* ASViewController.m */, 124 | ); 125 | path = ASViewController; 126 | sourceTree = ""; 127 | }; 128 | 8666D082155053E400B1635D /* ASViewController */ = { 129 | isa = PBXGroup; 130 | children = ( 131 | 8666D083155053E400B1635D /* ASViewControllerSpec.m */, 132 | ); 133 | path = ASViewController; 134 | sourceTree = ""; 135 | }; 136 | 8679C559154E897D00198B69 = { 137 | isa = PBXGroup; 138 | children = ( 139 | 86E40888162715F0006CB185 /* ASViewController.podspec */, 140 | 8679C56E154E897D00198B69 /* ASViewControllerExample */, 141 | 8679C595154E8BA600198B69 /* UISpecs */, 142 | 8679C5A4154E8C0400198B69 /* External */, 143 | 8679C567154E897D00198B69 /* Frameworks */, 144 | 8679C565154E897D00198B69 /* Products */, 145 | ); 146 | sourceTree = ""; 147 | }; 148 | 8679C565154E897D00198B69 /* Products */ = { 149 | isa = PBXGroup; 150 | children = ( 151 | 8679C564154E897D00198B69 /* ASViewControllerExample.app */, 152 | 8679C590154E8BA600198B69 /* UISpecs.app */, 153 | ); 154 | name = Products; 155 | sourceTree = ""; 156 | }; 157 | 8679C567154E897D00198B69 /* Frameworks */ = { 158 | isa = PBXGroup; 159 | children = ( 160 | 8679C568154E897D00198B69 /* UIKit.framework */, 161 | 8679C56A154E897D00198B69 /* Foundation.framework */, 162 | 8679C56C154E897D00198B69 /* CoreGraphics.framework */, 163 | ); 164 | name = Frameworks; 165 | sourceTree = ""; 166 | }; 167 | 8679C56E154E897D00198B69 /* ASViewControllerExample */ = { 168 | isa = PBXGroup; 169 | children = ( 170 | 8679C588154E89C100198B69 /* Classes */, 171 | 8679C577154E897D00198B69 /* AppDelegate.h */, 172 | 8679C578154E897D00198B69 /* AppDelegate.m */, 173 | 8679C56F154E897D00198B69 /* Supporting Files */, 174 | ); 175 | path = ASViewControllerExample; 176 | sourceTree = ""; 177 | }; 178 | 8679C56F154E897D00198B69 /* Supporting Files */ = { 179 | isa = PBXGroup; 180 | children = ( 181 | 8679C570154E897D00198B69 /* ASViewControllerExample-Info.plist */, 182 | 8679C571154E897D00198B69 /* InfoPlist.strings */, 183 | 8679C574154E897D00198B69 /* main.m */, 184 | 8679C576154E897D00198B69 /* ASViewControllerExample-Prefix.pch */, 185 | ); 186 | name = "Supporting Files"; 187 | sourceTree = ""; 188 | }; 189 | 8679C588154E89C100198B69 /* Classes */ = { 190 | isa = PBXGroup; 191 | children = ( 192 | 8666D07D155053C300B1635D /* ASViewController */, 193 | 8666D0851550541A00B1635D /* ASEColoredViewController.h */, 194 | 8666D0861550541A00B1635D /* ASEColoredViewController.m */, 195 | 8666D09815505B1900B1635D /* ASFlipViewController.h */, 196 | 8666D09915505B1900B1635D /* ASFlipViewController.m */, 197 | ); 198 | path = Classes; 199 | sourceTree = ""; 200 | }; 201 | 8679C595154E8BA600198B69 /* UISpecs */ = { 202 | isa = PBXGroup; 203 | children = ( 204 | 8679C5C7154E8CE400198B69 /* Helpers */, 205 | 8679C5C6154E8CC900198B69 /* Classes */, 206 | 8679C596154E8BA600198B69 /* Supporting Files */, 207 | ); 208 | path = UISpecs; 209 | sourceTree = ""; 210 | }; 211 | 8679C596154E8BA600198B69 /* Supporting Files */ = { 212 | isa = PBXGroup; 213 | children = ( 214 | 8679C597154E8BA600198B69 /* UISpecs-Info.plist */, 215 | 8679C598154E8BA600198B69 /* InfoPlist.strings */, 216 | 8679C59B154E8BA600198B69 /* main.m */, 217 | 8679C59D154E8BA600198B69 /* UISpecs-Prefix.pch */, 218 | ); 219 | name = "Supporting Files"; 220 | sourceTree = ""; 221 | }; 222 | 8679C5A4154E8C0400198B69 /* External */ = { 223 | isa = PBXGroup; 224 | children = ( 225 | 8679C5A5154E8C0400198B69 /* Cedar-iOS.framework */, 226 | 8679C5A6154E8C0400198B69 /* Expecta */, 227 | 8679C5C0154E8C0400198B69 /* OCMock-iPhone.framework */, 228 | ); 229 | path = External; 230 | sourceTree = ""; 231 | }; 232 | 8679C5A6154E8C0400198B69 /* Expecta */ = { 233 | isa = PBXGroup; 234 | children = ( 235 | 8679C5A7154E8C0400198B69 /* Expecta.h */, 236 | 8679C5A8154E8C0400198B69 /* ExpectaSupport.h */, 237 | 8679C5A9154E8C0400198B69 /* EXPExpect.h */, 238 | 8679C5AA154E8C0400198B69 /* EXPMatcherHelpers.h */, 239 | 8679C5AB154E8C0400198B69 /* EXPMatchers+toBeFalsy.h */, 240 | 8679C5AC154E8C0400198B69 /* EXPMatchers+toBeGreaterThan.h */, 241 | 8679C5AD154E8C0400198B69 /* EXPMatchers+toBeGreaterThanOrEqualTo.h */, 242 | 8679C5AE154E8C0400198B69 /* EXPMatchers+toBeIdenticalTo.h */, 243 | 8679C5AF154E8C0400198B69 /* EXPMatchers+toBeInstanceOf.h */, 244 | 8679C5B0154E8C0400198B69 /* EXPMatchers+toBeInTheRangeOf.h */, 245 | 8679C5B1154E8C0400198B69 /* EXPMatchers+toBeKindOf.h */, 246 | 8679C5B2154E8C0400198B69 /* EXPMatchers+toBeLessThan.h */, 247 | 8679C5B3154E8C0400198B69 /* EXPMatchers+toBeLessThanOrEqualTo.h */, 248 | 8679C5B4154E8C0400198B69 /* EXPMatchers+toBeNil.h */, 249 | 8679C5B5154E8C0400198B69 /* EXPMatchers+toBeSubclassOf.h */, 250 | 8679C5B6154E8C0400198B69 /* EXPMatchers+toBeTruthy.h */, 251 | 8679C5B7154E8C0400198B69 /* EXPMatchers+toContain.h */, 252 | 8679C5B8154E8C0400198B69 /* EXPMatchers+toEqual.h */, 253 | 8679C5B9154E8C0400198B69 /* EXPMatchers.h */, 254 | 8679C5BA154E8C0400198B69 /* EXPUnsupportedObject.h */, 255 | 8679C5BB154E8C0400198B69 /* libExpecta-ios-universal.a */, 256 | 8679C5BC154E8C0400198B69 /* LICENSE */, 257 | 8679C5BD154E8C0400198B69 /* NSObject+Expecta.h */, 258 | 8679C5BE154E8C0400198B69 /* NSValue+Expecta.h */, 259 | 8679C5BF154E8C0400198B69 /* README.md */, 260 | ); 261 | path = Expecta; 262 | sourceTree = ""; 263 | }; 264 | 8679C5C6154E8CC900198B69 /* Classes */ = { 265 | isa = PBXGroup; 266 | children = ( 267 | 8666D082155053E400B1635D /* ASViewController */, 268 | ); 269 | path = Classes; 270 | sourceTree = ""; 271 | }; 272 | 8679C5C7154E8CE400198B69 /* Helpers */ = { 273 | isa = PBXGroup; 274 | children = ( 275 | 8679C5CE154E903B00198B69 /* FakeCopyingArray.h */, 276 | 8679C5CF154E903B00198B69 /* FakeCopyingArray.m */, 277 | ); 278 | path = Helpers; 279 | sourceTree = ""; 280 | }; 281 | /* End PBXGroup section */ 282 | 283 | /* Begin PBXNativeTarget section */ 284 | 8679C563154E897D00198B69 /* ASViewControllerExample */ = { 285 | isa = PBXNativeTarget; 286 | buildConfigurationList = 8679C57C154E897D00198B69 /* Build configuration list for PBXNativeTarget "ASViewControllerExample" */; 287 | buildPhases = ( 288 | 8679C560154E897D00198B69 /* Sources */, 289 | 8679C561154E897D00198B69 /* Frameworks */, 290 | 8679C562154E897D00198B69 /* Resources */, 291 | ); 292 | buildRules = ( 293 | ); 294 | dependencies = ( 295 | ); 296 | name = ASViewControllerExample; 297 | productName = ASViewControllerExample; 298 | productReference = 8679C564154E897D00198B69 /* ASViewControllerExample.app */; 299 | productType = "com.apple.product-type.application"; 300 | }; 301 | 8679C58F154E8BA600198B69 /* UISpecs */ = { 302 | isa = PBXNativeTarget; 303 | buildConfigurationList = 8679C5A1154E8BA600198B69 /* Build configuration list for PBXNativeTarget "UISpecs" */; 304 | buildPhases = ( 305 | 8679C58C154E8BA600198B69 /* Sources */, 306 | 8679C58D154E8BA600198B69 /* Frameworks */, 307 | 8679C58E154E8BA600198B69 /* Resources */, 308 | ); 309 | buildRules = ( 310 | ); 311 | dependencies = ( 312 | ); 313 | name = UISpecs; 314 | productName = UISpecs; 315 | productReference = 8679C590154E8BA600198B69 /* UISpecs.app */; 316 | productType = "com.apple.product-type.application"; 317 | }; 318 | /* End PBXNativeTarget section */ 319 | 320 | /* Begin PBXProject section */ 321 | 8679C55B154E897D00198B69 /* Project object */ = { 322 | isa = PBXProject; 323 | attributes = { 324 | LastUpgradeCheck = 0430; 325 | }; 326 | buildConfigurationList = 8679C55E154E897D00198B69 /* Build configuration list for PBXProject "ASViewControllerExample" */; 327 | compatibilityVersion = "Xcode 3.2"; 328 | developmentRegion = English; 329 | hasScannedForEncodings = 0; 330 | knownRegions = ( 331 | en, 332 | ); 333 | mainGroup = 8679C559154E897D00198B69; 334 | productRefGroup = 8679C565154E897D00198B69 /* Products */; 335 | projectDirPath = ""; 336 | projectRoot = ""; 337 | targets = ( 338 | 8679C563154E897D00198B69 /* ASViewControllerExample */, 339 | 8679C58F154E8BA600198B69 /* UISpecs */, 340 | ); 341 | }; 342 | /* End PBXProject section */ 343 | 344 | /* Begin PBXResourcesBuildPhase section */ 345 | 8679C562154E897D00198B69 /* Resources */ = { 346 | isa = PBXResourcesBuildPhase; 347 | buildActionMask = 2147483647; 348 | files = ( 349 | 8679C573154E897D00198B69 /* InfoPlist.strings in Resources */, 350 | 86E40889162715F0006CB185 /* ASViewController.podspec in Resources */, 351 | ); 352 | runOnlyForDeploymentPostprocessing = 0; 353 | }; 354 | 8679C58E154E8BA600198B69 /* Resources */ = { 355 | isa = PBXResourcesBuildPhase; 356 | buildActionMask = 2147483647; 357 | files = ( 358 | 8679C59A154E8BA600198B69 /* InfoPlist.strings in Resources */, 359 | 8679C5C3154E8C0400198B69 /* LICENSE in Resources */, 360 | 8679C5C4154E8C0400198B69 /* README.md in Resources */, 361 | ); 362 | runOnlyForDeploymentPostprocessing = 0; 363 | }; 364 | /* End PBXResourcesBuildPhase section */ 365 | 366 | /* Begin PBXSourcesBuildPhase section */ 367 | 8679C560154E897D00198B69 /* Sources */ = { 368 | isa = PBXSourcesBuildPhase; 369 | buildActionMask = 2147483647; 370 | files = ( 371 | 8679C575154E897D00198B69 /* main.m in Sources */, 372 | 8679C579154E897D00198B69 /* AppDelegate.m in Sources */, 373 | 8666D080155053C300B1635D /* ASViewController.m in Sources */, 374 | 8666D0871550541A00B1635D /* ASEColoredViewController.m in Sources */, 375 | 8666D09A15505B1900B1635D /* ASFlipViewController.m in Sources */, 376 | ); 377 | runOnlyForDeploymentPostprocessing = 0; 378 | }; 379 | 8679C58C154E8BA600198B69 /* Sources */ = { 380 | isa = PBXSourcesBuildPhase; 381 | buildActionMask = 2147483647; 382 | files = ( 383 | 8679C59C154E8BA600198B69 /* main.m in Sources */, 384 | 8679C5D0154E903B00198B69 /* FakeCopyingArray.m in Sources */, 385 | 8666D081155053C300B1635D /* ASViewController.m in Sources */, 386 | 8666D084155053E400B1635D /* ASViewControllerSpec.m in Sources */, 387 | 8666D0881550541A00B1635D /* ASEColoredViewController.m in Sources */, 388 | 8666D09B15505B1900B1635D /* ASFlipViewController.m in Sources */, 389 | ); 390 | runOnlyForDeploymentPostprocessing = 0; 391 | }; 392 | /* End PBXSourcesBuildPhase section */ 393 | 394 | /* Begin PBXVariantGroup section */ 395 | 8679C571154E897D00198B69 /* InfoPlist.strings */ = { 396 | isa = PBXVariantGroup; 397 | children = ( 398 | 8679C572154E897D00198B69 /* en */, 399 | ); 400 | name = InfoPlist.strings; 401 | sourceTree = ""; 402 | }; 403 | 8679C598154E8BA600198B69 /* InfoPlist.strings */ = { 404 | isa = PBXVariantGroup; 405 | children = ( 406 | 8679C599154E8BA600198B69 /* en */, 407 | ); 408 | name = InfoPlist.strings; 409 | sourceTree = ""; 410 | }; 411 | /* End PBXVariantGroup section */ 412 | 413 | /* Begin XCBuildConfiguration section */ 414 | 8679C57A154E897D00198B69 /* Debug */ = { 415 | isa = XCBuildConfiguration; 416 | buildSettings = { 417 | ALWAYS_SEARCH_USER_PATHS = NO; 418 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 419 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 420 | COPY_PHASE_STRIP = NO; 421 | GCC_C_LANGUAGE_STANDARD = gnu99; 422 | GCC_DYNAMIC_NO_PIC = NO; 423 | GCC_OPTIMIZATION_LEVEL = 0; 424 | GCC_PREPROCESSOR_DEFINITIONS = ( 425 | "DEBUG=1", 426 | "$(inherited)", 427 | ); 428 | GCC_SYMBOLS_PRIVATE_EXTERN = NO; 429 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0; 430 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 431 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 432 | GCC_WARN_UNUSED_VARIABLE = YES; 433 | IPHONEOS_DEPLOYMENT_TARGET = 5.1; 434 | SDKROOT = iphoneos; 435 | TARGETED_DEVICE_FAMILY = "1,2"; 436 | }; 437 | name = Debug; 438 | }; 439 | 8679C57B154E897D00198B69 /* Release */ = { 440 | isa = XCBuildConfiguration; 441 | buildSettings = { 442 | ALWAYS_SEARCH_USER_PATHS = NO; 443 | ARCHS = "$(ARCHS_STANDARD_32_BIT)"; 444 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 445 | COPY_PHASE_STRIP = YES; 446 | GCC_C_LANGUAGE_STANDARD = gnu99; 447 | GCC_VERSION = com.apple.compilers.llvm.clang.1_0; 448 | GCC_WARN_ABOUT_RETURN_TYPE = YES; 449 | GCC_WARN_UNINITIALIZED_AUTOS = YES; 450 | GCC_WARN_UNUSED_VARIABLE = YES; 451 | IPHONEOS_DEPLOYMENT_TARGET = 5.1; 452 | OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; 453 | SDKROOT = iphoneos; 454 | TARGETED_DEVICE_FAMILY = "1,2"; 455 | VALIDATE_PRODUCT = YES; 456 | }; 457 | name = Release; 458 | }; 459 | 8679C57D154E897D00198B69 /* Debug */ = { 460 | isa = XCBuildConfiguration; 461 | buildSettings = { 462 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 463 | GCC_PREFIX_HEADER = "ASViewControllerExample/ASViewControllerExample-Prefix.pch"; 464 | INFOPLIST_FILE = "ASViewControllerExample/ASViewControllerExample-Info.plist"; 465 | IPHONEOS_DEPLOYMENT_TARGET = 4.0; 466 | PRODUCT_NAME = "$(TARGET_NAME)"; 467 | WRAPPER_EXTENSION = app; 468 | }; 469 | name = Debug; 470 | }; 471 | 8679C57E154E897D00198B69 /* Release */ = { 472 | isa = XCBuildConfiguration; 473 | buildSettings = { 474 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 475 | GCC_PREFIX_HEADER = "ASViewControllerExample/ASViewControllerExample-Prefix.pch"; 476 | INFOPLIST_FILE = "ASViewControllerExample/ASViewControllerExample-Info.plist"; 477 | IPHONEOS_DEPLOYMENT_TARGET = 4.0; 478 | PRODUCT_NAME = "$(TARGET_NAME)"; 479 | WRAPPER_EXTENSION = app; 480 | }; 481 | name = Release; 482 | }; 483 | 8679C5A2154E8BA600198B69 /* Debug */ = { 484 | isa = XCBuildConfiguration; 485 | buildSettings = { 486 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 487 | FRAMEWORK_SEARCH_PATHS = ( 488 | "$(inherited)", 489 | "\"$(SRCROOT)/External\"", 490 | ); 491 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 492 | GCC_PREFIX_HEADER = "UISpecs/UISpecs-Prefix.pch"; 493 | INFOPLIST_FILE = "UISpecs/UISpecs-Info.plist"; 494 | IPHONEOS_DEPLOYMENT_TARGET = 4.0; 495 | LIBRARY_SEARCH_PATHS = ( 496 | "$(inherited)", 497 | "\"$(SRCROOT)/External/Expecta\"", 498 | ); 499 | OTHER_LDFLAGS = ( 500 | "-ObjC", 501 | "-lstdc++", 502 | "-all_load", 503 | ); 504 | PRODUCT_NAME = "$(TARGET_NAME)"; 505 | WRAPPER_EXTENSION = app; 506 | }; 507 | name = Debug; 508 | }; 509 | 8679C5A3154E8BA600198B69 /* Release */ = { 510 | isa = XCBuildConfiguration; 511 | buildSettings = { 512 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 513 | FRAMEWORK_SEARCH_PATHS = ( 514 | "$(inherited)", 515 | "\"$(SRCROOT)/External\"", 516 | ); 517 | GCC_PRECOMPILE_PREFIX_HEADER = YES; 518 | GCC_PREFIX_HEADER = "UISpecs/UISpecs-Prefix.pch"; 519 | INFOPLIST_FILE = "UISpecs/UISpecs-Info.plist"; 520 | IPHONEOS_DEPLOYMENT_TARGET = 4.0; 521 | LIBRARY_SEARCH_PATHS = ( 522 | "$(inherited)", 523 | "\"$(SRCROOT)/External/Expecta\"", 524 | ); 525 | OTHER_LDFLAGS = ( 526 | "-ObjC", 527 | "-lstdc++", 528 | "-all_load", 529 | ); 530 | PRODUCT_NAME = "$(TARGET_NAME)"; 531 | WRAPPER_EXTENSION = app; 532 | }; 533 | name = Release; 534 | }; 535 | /* End XCBuildConfiguration section */ 536 | 537 | /* Begin XCConfigurationList section */ 538 | 8679C55E154E897D00198B69 /* Build configuration list for PBXProject "ASViewControllerExample" */ = { 539 | isa = XCConfigurationList; 540 | buildConfigurations = ( 541 | 8679C57A154E897D00198B69 /* Debug */, 542 | 8679C57B154E897D00198B69 /* Release */, 543 | ); 544 | defaultConfigurationIsVisible = 0; 545 | defaultConfigurationName = Release; 546 | }; 547 | 8679C57C154E897D00198B69 /* Build configuration list for PBXNativeTarget "ASViewControllerExample" */ = { 548 | isa = XCConfigurationList; 549 | buildConfigurations = ( 550 | 8679C57D154E897D00198B69 /* Debug */, 551 | 8679C57E154E897D00198B69 /* Release */, 552 | ); 553 | defaultConfigurationIsVisible = 0; 554 | defaultConfigurationName = Release; 555 | }; 556 | 8679C5A1154E8BA600198B69 /* Build configuration list for PBXNativeTarget "UISpecs" */ = { 557 | isa = XCConfigurationList; 558 | buildConfigurations = ( 559 | 8679C5A2154E8BA600198B69 /* Debug */, 560 | 8679C5A3154E8BA600198B69 /* Release */, 561 | ); 562 | defaultConfigurationIsVisible = 0; 563 | defaultConfigurationName = Release; 564 | }; 565 | /* End XCConfigurationList section */ 566 | }; 567 | rootObject = 8679C55B154E897D00198B69 /* Project object */; 568 | } 569 | --------------------------------------------------------------------------------