├── .gitignore ├── AnimationDemo.xcodeproj ├── project.pbxproj ├── project.xcworkspace │ └── contents.xcworkspacedata └── xcuserdata │ └── rbobbins.xcuserdatad │ ├── xcdebugger │ └── Breakpoints_v2.xcbkptlist │ └── xcschemes │ ├── AnimationDemo.xcscheme │ ├── Specs.xcscheme │ └── xcschememanagement.plist ├── AnimationDemo ├── AppDelegate.h ├── AppDelegate.m ├── Base.lproj │ └── LaunchScreen.xib ├── BookCell.h ├── BookCell.m ├── BookCell.xib ├── BooksViewController.h ├── BooksViewController.m ├── BooksViewController.xib ├── Images.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json ├── Info.plist ├── MenuViewController.h ├── MenuViewController.m ├── MenuViewController.xib ├── SimpleViewController.h ├── SimpleViewController.m ├── SimpleViewController.xib ├── fire_photo.jpg ├── main.m └── vertical_bookshelf.jpg ├── LICENSE ├── README.md ├── Specs ├── BooksViewControllerSpec.mm ├── Default-568h@2x.png ├── Frameworks │ └── Cedar-iOS.framework │ │ ├── Cedar-iOS │ │ ├── Headers │ │ ├── ActualValue.h │ │ ├── AnInstanceOf.h │ │ ├── AnyArgument.h │ │ ├── AnyInstanceArgument.h │ │ ├── AnyInstanceConformingToProtocolArgument.h │ │ ├── AnyInstanceOfClassArgument.h │ │ ├── Argument.h │ │ ├── Base.h │ │ ├── BeCloseTo.h │ │ ├── BeEmpty.h │ │ ├── BeFalsy.h │ │ ├── BeGTE.h │ │ ├── BeGreaterThan.h │ │ ├── BeInstanceOf.h │ │ ├── BeLTE.h │ │ ├── BeLessThan.h │ │ ├── BeNil.h │ │ ├── BeSameInstanceAs.h │ │ ├── BeTruthy.h │ │ ├── CDRClassFake.h │ │ ├── CDRColorizedReporter.h │ │ ├── CDRExample.h │ │ ├── CDRExampleBase.h │ │ ├── CDRExampleGroup.h │ │ ├── CDRExampleParent.h │ │ ├── CDRExampleReporter.h │ │ ├── CDRFake.h │ │ ├── CDRFunctions.h │ │ ├── CDRHooks.h │ │ ├── CDRProtocolFake.h │ │ ├── CDRSharedExampleGroupPool.h │ │ ├── CDRSlowTestStatistics.h │ │ ├── CDRSpec.h │ │ ├── CDRSpecFailure.h │ │ ├── CDRSpecHelper.h │ │ ├── CDRSpy.h │ │ ├── CDRSpyInfo.h │ │ ├── CDRSymbolicator.h │ │ ├── CDRVersion.h │ │ ├── Cedar-iOS.h │ │ ├── Cedar.h │ │ ├── CedarApplicationDelegate.h │ │ ├── CedarComparators.h │ │ ├── CedarDouble.h │ │ ├── CedarDoubleImpl.h │ │ ├── CedarDoubles.h │ │ ├── CedarMatchers.h │ │ ├── CedarStringifiers.h │ │ ├── ComparatorsBase.h │ │ ├── ComparatorsContainer.h │ │ ├── ComparatorsContainerConvenience.h │ │ ├── CompareCloseTo.h │ │ ├── CompareEqual.h │ │ ├── CompareGreaterThan.h │ │ ├── ConformTo.h │ │ ├── Contain.h │ │ ├── Equal.h │ │ ├── Exist.h │ │ ├── HaveReceived.h │ │ ├── InvocationMatcher.h │ │ ├── NSInvocation+Cedar.h │ │ ├── NSMethodSignature+Cedar.h │ │ ├── RaiseException.h │ │ ├── RejectedMethod.h │ │ ├── RespondTo.h │ │ ├── ReturnValue.h │ │ ├── ShouldSyntax.h │ │ ├── StringifiersBase.h │ │ ├── StringifiersContainer.h │ │ ├── StubbedMethod.h │ │ ├── UIGeometryCompareEqual.h │ │ ├── UIGeometryStringifiers.h │ │ ├── UIKitComparatorsContainer.h │ │ └── ValueArgument.h │ │ ├── Resources │ │ └── Info.plist │ │ └── Versions │ │ ├── A │ │ ├── Cedar-iOS │ │ ├── Headers │ │ │ ├── ActualValue.h │ │ │ ├── AnInstanceOf.h │ │ │ ├── AnyArgument.h │ │ │ ├── AnyInstanceArgument.h │ │ │ ├── AnyInstanceConformingToProtocolArgument.h │ │ │ ├── AnyInstanceOfClassArgument.h │ │ │ ├── Argument.h │ │ │ ├── Base.h │ │ │ ├── BeCloseTo.h │ │ │ ├── BeEmpty.h │ │ │ ├── BeFalsy.h │ │ │ ├── BeGTE.h │ │ │ ├── BeGreaterThan.h │ │ │ ├── BeInstanceOf.h │ │ │ ├── BeLTE.h │ │ │ ├── BeLessThan.h │ │ │ ├── BeNil.h │ │ │ ├── BeSameInstanceAs.h │ │ │ ├── BeTruthy.h │ │ │ ├── CDRClassFake.h │ │ │ ├── CDRColorizedReporter.h │ │ │ ├── CDRExample.h │ │ │ ├── CDRExampleBase.h │ │ │ ├── CDRExampleGroup.h │ │ │ ├── CDRExampleParent.h │ │ │ ├── CDRExampleReporter.h │ │ │ ├── CDRFake.h │ │ │ ├── CDRFunctions.h │ │ │ ├── CDRHooks.h │ │ │ ├── CDRProtocolFake.h │ │ │ ├── CDRSharedExampleGroupPool.h │ │ │ ├── CDRSlowTestStatistics.h │ │ │ ├── CDRSpec.h │ │ │ ├── CDRSpecFailure.h │ │ │ ├── CDRSpecHelper.h │ │ │ ├── CDRSpy.h │ │ │ ├── CDRSpyInfo.h │ │ │ ├── CDRSymbolicator.h │ │ │ ├── CDRVersion.h │ │ │ ├── Cedar-iOS.h │ │ │ ├── Cedar.h │ │ │ ├── CedarApplicationDelegate.h │ │ │ ├── CedarComparators.h │ │ │ ├── CedarDouble.h │ │ │ ├── CedarDoubleImpl.h │ │ │ ├── CedarDoubles.h │ │ │ ├── CedarMatchers.h │ │ │ ├── CedarStringifiers.h │ │ │ ├── ComparatorsBase.h │ │ │ ├── ComparatorsContainer.h │ │ │ ├── ComparatorsContainerConvenience.h │ │ │ ├── CompareCloseTo.h │ │ │ ├── CompareEqual.h │ │ │ ├── CompareGreaterThan.h │ │ │ ├── ConformTo.h │ │ │ ├── Contain.h │ │ │ ├── Equal.h │ │ │ ├── Exist.h │ │ │ ├── HaveReceived.h │ │ │ ├── InvocationMatcher.h │ │ │ ├── NSInvocation+Cedar.h │ │ │ ├── NSMethodSignature+Cedar.h │ │ │ ├── RaiseException.h │ │ │ ├── RejectedMethod.h │ │ │ ├── RespondTo.h │ │ │ ├── ReturnValue.h │ │ │ ├── ShouldSyntax.h │ │ │ ├── StringifiersBase.h │ │ │ ├── StringifiersContainer.h │ │ │ ├── StubbedMethod.h │ │ │ ├── UIGeometryCompareEqual.h │ │ │ ├── UIGeometryStringifiers.h │ │ │ ├── UIKitComparatorsContainer.h │ │ │ └── ValueArgument.h │ │ └── Resources │ │ │ └── Info.plist │ │ └── Current │ │ ├── Cedar-iOS │ │ ├── Headers │ │ ├── ActualValue.h │ │ ├── AnInstanceOf.h │ │ ├── AnyArgument.h │ │ ├── AnyInstanceArgument.h │ │ ├── AnyInstanceConformingToProtocolArgument.h │ │ ├── AnyInstanceOfClassArgument.h │ │ ├── Argument.h │ │ ├── Base.h │ │ ├── BeCloseTo.h │ │ ├── BeEmpty.h │ │ ├── BeFalsy.h │ │ ├── BeGTE.h │ │ ├── BeGreaterThan.h │ │ ├── BeInstanceOf.h │ │ ├── BeLTE.h │ │ ├── BeLessThan.h │ │ ├── BeNil.h │ │ ├── BeSameInstanceAs.h │ │ ├── BeTruthy.h │ │ ├── CDRClassFake.h │ │ ├── CDRColorizedReporter.h │ │ ├── CDRExample.h │ │ ├── CDRExampleBase.h │ │ ├── CDRExampleGroup.h │ │ ├── CDRExampleParent.h │ │ ├── CDRExampleReporter.h │ │ ├── CDRFake.h │ │ ├── CDRFunctions.h │ │ ├── CDRHooks.h │ │ ├── CDRProtocolFake.h │ │ ├── CDRSharedExampleGroupPool.h │ │ ├── CDRSlowTestStatistics.h │ │ ├── CDRSpec.h │ │ ├── CDRSpecFailure.h │ │ ├── CDRSpecHelper.h │ │ ├── CDRSpy.h │ │ ├── CDRSpyInfo.h │ │ ├── CDRSymbolicator.h │ │ ├── CDRVersion.h │ │ ├── Cedar-iOS.h │ │ ├── Cedar.h │ │ ├── CedarApplicationDelegate.h │ │ ├── CedarComparators.h │ │ ├── CedarDouble.h │ │ ├── CedarDoubleImpl.h │ │ ├── CedarDoubles.h │ │ ├── CedarMatchers.h │ │ ├── CedarStringifiers.h │ │ ├── ComparatorsBase.h │ │ ├── ComparatorsContainer.h │ │ ├── ComparatorsContainerConvenience.h │ │ ├── CompareCloseTo.h │ │ ├── CompareEqual.h │ │ ├── CompareGreaterThan.h │ │ ├── ConformTo.h │ │ ├── Contain.h │ │ ├── Equal.h │ │ ├── Exist.h │ │ ├── HaveReceived.h │ │ ├── InvocationMatcher.h │ │ ├── NSInvocation+Cedar.h │ │ ├── NSMethodSignature+Cedar.h │ │ ├── RaiseException.h │ │ ├── RejectedMethod.h │ │ ├── RespondTo.h │ │ ├── ReturnValue.h │ │ ├── ShouldSyntax.h │ │ ├── StringifiersBase.h │ │ ├── StringifiersContainer.h │ │ ├── StubbedMethod.h │ │ ├── UIGeometryCompareEqual.h │ │ ├── UIGeometryStringifiers.h │ │ ├── UIKitComparatorsContainer.h │ │ └── ValueArgument.h │ │ └── Resources │ │ └── Info.plist ├── Info.plist ├── MenuViewControllerSpec.mm ├── Rakefile ├── Specs-Info.plist ├── Specs-Prefix.pch └── main.m ├── SuperFold ├── SuperFold.h ├── UIView+Fold.h └── UIView+Fold.m ├── Superfold.podspec └── screenshots ├── fold.png └── video_demo.gif /.gitignore: -------------------------------------------------------------------------------- 1 | # Xcode 2 | 3 | *.pbxuser 4 | !default.pbxuser 5 | *.mode1v3 6 | !default.mode1v3 7 | *.mode2v3 8 | !default.mode2v3 9 | *.perspectivev3 10 | !default.perspectivev3 11 | xcuserdata 12 | *.xccheckout 13 | *.moved-aside 14 | DerivedData 15 | *.hmap 16 | *.ipa 17 | *.xcuserstate 18 | .DS_Store 19 | -------------------------------------------------------------------------------- /AnimationDemo.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /AnimationDemo.xcodeproj/xcuserdata/rbobbins.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /AnimationDemo.xcodeproj/xcuserdata/rbobbins.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | AnimationDemo.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | Specs.xcscheme 13 | 14 | orderHint 15 | 1 16 | 17 | 18 | SuppressBuildableAutocreation 19 | 20 | 5A3D3B5C1A7DCB0A0032923C 21 | 22 | primary 23 | 24 | 25 | 5A5672731A7B5C8C00BC24ED 26 | 27 | primary 28 | 29 | 30 | 5A56728C1A7B5C8C00BC24ED 31 | 32 | primary 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /AnimationDemo/AppDelegate.h: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.h 3 | // AnimationDemo 4 | // 5 | // Created by Rachel Bobbins on 1/29/15. 6 | // Copyright (c) 2015 Rachel Bobbins. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface AppDelegate : UIResponder 12 | 13 | @property (strong, nonatomic) UIWindow *window; 14 | 15 | 16 | @end 17 | 18 | -------------------------------------------------------------------------------- /AnimationDemo/AppDelegate.m: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.m 3 | // AnimationDemo 4 | // 5 | // Created by Rachel Bobbins on 1/29/15. 6 | // Copyright (c) 2015 Rachel Bobbins. All rights reserved. 7 | // 8 | 9 | #import "AppDelegate.h" 10 | #import "MenuViewController.h" 11 | 12 | @interface AppDelegate () 13 | 14 | @end 15 | 16 | @implementation AppDelegate 17 | 18 | 19 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 20 | self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds]; 21 | UIViewController *rootViewController = [[MenuViewController alloc] init]; 22 | 23 | UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:rootViewController]; 24 | navigationController.navigationBar.translucent = NO; 25 | 26 | self.window.rootViewController = navigationController; 27 | 28 | [self.window makeKeyAndVisible]; 29 | return YES; 30 | } 31 | 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /AnimationDemo/BookCell.h: -------------------------------------------------------------------------------- 1 | // 2 | // BookCell.h 3 | // AnimationDemo 4 | // 5 | // Created by Rachel Bobbins on 1/31/15. 6 | // Copyright (c) 2015 Rachel Bobbins. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface BookCell : UITableViewCell 12 | 13 | @property (weak, nonatomic) IBOutlet UILabel *bookTitleLabel; 14 | @property (weak, nonatomic) IBOutlet UILabel *bookDescriptionLabel; 15 | @property (weak, nonatomic) IBOutlet UIView *detailContainerView; 16 | 17 | @property (nonatomic, assign) BOOL withDetails; 18 | 19 | - (void)animateOpen; 20 | - (void)animateClosed; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /AnimationDemo/BookCell.m: -------------------------------------------------------------------------------- 1 | // 2 | // BookCell.m 3 | // AnimationDemo 4 | // 5 | // Created by Rachel Bobbins on 1/31/15. 6 | // Copyright (c) 2015 Rachel Bobbins. All rights reserved. 7 | // 8 | 9 | #import "BookCell.h" 10 | #import "UIView+Fold.h" 11 | @interface BookCell () 12 | @property (weak, nonatomic) IBOutlet UIView *titleContainer; 13 | @property (strong, nonatomic) IBOutlet NSLayoutConstraint *detailContainerViewHeightConstraint; 14 | @end 15 | 16 | @implementation BookCell 17 | 18 | - (void)awakeFromNib { 19 | [super awakeFromNib]; 20 | self.withDetails = NO; 21 | self.backgroundView = nil; 22 | self.detailContainerViewHeightConstraint.constant = 0; 23 | } 24 | 25 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated { 26 | [super setSelected:selected animated:animated]; 27 | } 28 | 29 | - (void)setWithDetails:(BOOL)withDetails { 30 | _withDetails = withDetails; 31 | 32 | if (withDetails) { 33 | self.detailContainerViewHeightConstraint.priority = 250; 34 | } else { 35 | self.detailContainerViewHeightConstraint.priority = 999; 36 | } 37 | } 38 | 39 | - (void)animateOpen { 40 | UIColor *originalBackgroundColor = self.contentView.backgroundColor; 41 | self.contentView.backgroundColor = [UIColor clearColor]; 42 | [self.detailContainerView foldOpenWithTransparency:YES 43 | withCompletionBlock:^{ 44 | self.contentView.backgroundColor = originalBackgroundColor; 45 | }]; 46 | } 47 | 48 | - (void)animateClosed { 49 | UIColor *originalBackgroundColor = self.contentView.backgroundColor; 50 | self.contentView.backgroundColor = [UIColor clearColor]; 51 | 52 | [self.detailContainerView foldClosedWithTransparency:YES withCompletionBlock:^{ 53 | self.contentView.backgroundColor = originalBackgroundColor; 54 | }]; 55 | } 56 | 57 | 58 | 59 | @end 60 | -------------------------------------------------------------------------------- /AnimationDemo/BooksViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // BooksViewController.h 3 | // AnimationDemo 4 | // 5 | // Created by Rachel Bobbins on 1/31/15. 6 | // Copyright (c) 2015 Rachel Bobbins. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface BooksViewController : UIViewController 12 | @property (nonatomic, weak, readonly) UITableView *tableView; 13 | @end 14 | -------------------------------------------------------------------------------- /AnimationDemo/Images.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "idiom" : "ipad", 35 | "size" : "29x29", 36 | "scale" : "1x" 37 | }, 38 | { 39 | "idiom" : "ipad", 40 | "size" : "29x29", 41 | "scale" : "2x" 42 | }, 43 | { 44 | "idiom" : "ipad", 45 | "size" : "40x40", 46 | "scale" : "1x" 47 | }, 48 | { 49 | "idiom" : "ipad", 50 | "size" : "40x40", 51 | "scale" : "2x" 52 | }, 53 | { 54 | "idiom" : "ipad", 55 | "size" : "76x76", 56 | "scale" : "1x" 57 | }, 58 | { 59 | "idiom" : "ipad", 60 | "size" : "76x76", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } -------------------------------------------------------------------------------- /AnimationDemo/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | Bobbypins.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 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 | -------------------------------------------------------------------------------- /AnimationDemo/MenuViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // MenuViewController.h 3 | // AnimationDemo 4 | // 5 | // Created by Rachel Bobbins on 1/31/15. 6 | // Copyright (c) 2015 Rachel Bobbins. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface MenuViewController : UIViewController 12 | 13 | @property (nonatomic, weak, readonly) UITableView *tableView; 14 | 15 | @end 16 | -------------------------------------------------------------------------------- /AnimationDemo/MenuViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // MenuViewController.m 3 | // AnimationDemo 4 | // 5 | // Created by Rachel Bobbins on 1/31/15. 6 | // Copyright (c) 2015 Rachel Bobbins. All rights reserved. 7 | // 8 | 9 | #import "MenuViewController.h" 10 | #import "SimpleViewController.h" 11 | #import "BooksViewController.h" 12 | 13 | @interface MenuViewController () 14 | @property (weak, nonatomic) IBOutlet UITableView *tableView; 15 | 16 | @end 17 | 18 | @implementation MenuViewController 19 | 20 | 21 | - (void)viewDidLoad { 22 | [super viewDidLoad]; 23 | 24 | [self.tableView registerClass:[UITableViewCell class] 25 | forCellReuseIdentifier:@"cellIdentifier"]; 26 | } 27 | #pragma mark - UITableViewDataSource 28 | 29 | - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { 30 | return 1; 31 | } 32 | 33 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { 34 | return 2; 35 | } 36 | 37 | - (UITableViewCell *)tableView:(UITableView *)tableView 38 | cellForRowAtIndexPath:(NSIndexPath *)indexPath { 39 | 40 | UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"cellIdentifier"]; 41 | switch (indexPath.row) { 42 | case 0: 43 | cell.textLabel.text = @"Simple View Fold"; 44 | break; 45 | case 1: 46 | cell.textLabel.text = @"Foldable UITableViewCells"; 47 | default: 48 | break; 49 | } 50 | 51 | return cell; 52 | } 53 | 54 | #pragma mark - UITableViewDelegate 55 | 56 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { 57 | [tableView deselectRowAtIndexPath:indexPath animated:YES]; 58 | 59 | UIViewController *viewController; 60 | if (indexPath.row == 0) { 61 | viewController = [[SimpleViewController alloc] init]; 62 | } else if (indexPath.row == 1) { 63 | viewController = [[BooksViewController alloc] init]; 64 | } 65 | [self.navigationController pushViewController:viewController animated:NO]; 66 | 67 | } 68 | @end 69 | -------------------------------------------------------------------------------- /AnimationDemo/SimpleViewController.h: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.h 3 | // AnimationDemo 4 | // 5 | // Created by Rachel Bobbins on 1/29/15. 6 | // Copyright (c) 2015 Rachel Bobbins. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface SimpleViewController : UIViewController 12 | 13 | 14 | @end 15 | 16 | -------------------------------------------------------------------------------- /AnimationDemo/SimpleViewController.m: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.m 3 | // AnimationDemo 4 | // 5 | // Created by Rachel Bobbins on 1/29/15. 6 | // Copyright (c) 2015 Rachel Bobbins. All rights reserved. 7 | // 8 | 9 | #import "SimpleViewController.h" 10 | #import "UIView+Fold.h" 11 | 12 | @interface SimpleViewController () 13 | @property (weak, nonatomic) IBOutlet UIView *animationContainer; 14 | @property (strong) UIView *topHalfView; 15 | @property (strong) UIView *bottomHalfView; 16 | @end 17 | 18 | @implementation SimpleViewController 19 | 20 | - (void)viewDidLoad { 21 | [super viewDidLoad]; 22 | 23 | self.title = @"Simple View Fold"; 24 | } 25 | 26 | - (IBAction)didTapAnimate:(id)sender { 27 | [self.animationContainer foldOpenWithTransparency:NO withCompletionBlock:nil]; 28 | } 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /AnimationDemo/fire_photo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rbobbins/animation-demo/53060507efaf9ec4c84f5abb105213e6a978cdb4/AnimationDemo/fire_photo.jpg -------------------------------------------------------------------------------- /AnimationDemo/main.m: -------------------------------------------------------------------------------- 1 | // 2 | // main.m 3 | // AnimationDemo 4 | // 5 | // Created by Rachel Bobbins on 1/29/15. 6 | // Copyright (c) 2015 Rachel Bobbins. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "AppDelegate.h" 11 | 12 | int main(int argc, char * argv[]) { 13 | @autoreleasepool { 14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /AnimationDemo/vertical_bookshelf.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rbobbins/animation-demo/53060507efaf9ec4c84f5abb105213e6a978cdb4/AnimationDemo/vertical_bookshelf.jpg -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 grubby 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | This app shows demonstrates a folding animation for UITableViewCells. 2 | 3 | It can be used on any UIView, but it looks *really* good on UITableViewCells. 4 | 5 | On a UITableViewCell that has one "collapsible" area (thanks autolayout!), the animation looks like this: 6 | 7 | ![Animated demo](https://raw.githubusercontent.com/rbobbins/animation-demo/master/screenshots/video_demo.gif) 8 | 9 | ## Usage: 10 | ``` 11 | - (void)foldOpenWithTransparency:(BOOL)withTransparency 12 | withCompletionBlock:(void (^)(void))completionBlock; 13 | 14 | - (void)foldClosedWithTransparency:(BOOL)withTransparency 15 | withCompletionBlock:(void (^)(void))completionBlock; 16 | ``` 17 | 18 | * `withTransparency`: YES hides all the subviews of the view you're animating, so you can see what's behind it. NO shows a black background while the animation is going on. 19 | * `withCompletionBlock`: Sometimes you want to change the state of your superview before animating... use the completion block to change it back when done! 20 | -------------------------------------------------------------------------------- /Specs/Default-568h@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rbobbins/animation-demo/53060507efaf9ec4c84f5abb105213e6a978cdb4/Specs/Default-568h@2x.png -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Cedar-iOS: -------------------------------------------------------------------------------- 1 | Versions/Current/Cedar-iOS -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Headers/AnyArgument.h: -------------------------------------------------------------------------------- 1 | #import "Argument.h" 2 | 3 | namespace Cedar { namespace Doubles { 4 | 5 | class AnyArgument : public Argument { 6 | private: 7 | AnyArgument & operator=(const AnyArgument &); 8 | 9 | public: 10 | AnyArgument() {}; 11 | virtual ~AnyArgument() {}; 12 | // Allow default copy ctor. 13 | 14 | virtual const char * const value_encoding() const { return ""; }; 15 | virtual void * value_bytes() const { return NULL; }; 16 | virtual NSString * value_string() const { return @"anything"; }; 17 | 18 | virtual bool matches_encoding(const char *) const { return true; } 19 | virtual bool matches_bytes(void *) const { return true; } 20 | virtual unsigned int specificity_ranking() const { return 0; } 21 | }; 22 | 23 | namespace Arguments { 24 | extern const Argument::shared_ptr_t anything; 25 | } 26 | 27 | }} 28 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Headers/AnyInstanceArgument.h: -------------------------------------------------------------------------------- 1 | #import "Argument.h" 2 | 3 | namespace Cedar { namespace Doubles { 4 | 5 | class AnyInstanceArgument : public Argument { 6 | public: 7 | virtual ~AnyInstanceArgument() = 0; 8 | 9 | virtual const char * const value_encoding() const; 10 | virtual void * value_bytes() const { return NULL; } 11 | virtual NSString * value_string() const = 0; 12 | 13 | virtual bool matches_encoding(const char *) const; 14 | virtual bool matches_bytes(void *) const = 0; 15 | virtual unsigned int specificity_ranking() const { return 1; } 16 | }; 17 | }} 18 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Headers/AnyInstanceConformingToProtocolArgument.h: -------------------------------------------------------------------------------- 1 | #import "AnyInstanceArgument.h" 2 | 3 | namespace Cedar { namespace Doubles { 4 | 5 | class AnyInstanceConformingToProtocolArgument : public AnyInstanceArgument { 6 | private: 7 | AnyInstanceConformingToProtocolArgument & operator=(const AnyInstanceConformingToProtocolArgument &); 8 | 9 | public: 10 | explicit AnyInstanceConformingToProtocolArgument(Protocol *); 11 | virtual ~AnyInstanceConformingToProtocolArgument(); 12 | // Allow default copy ctor. 13 | 14 | virtual NSString * value_string() const; 15 | virtual bool matches_bytes(void *) const; 16 | virtual bool matches(const Argument &) const; 17 | private: 18 | Protocol *protocol_; 19 | }; 20 | 21 | namespace Arguments { 22 | Argument::shared_ptr_t any(Protocol *); 23 | } 24 | }} 25 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Headers/AnyInstanceOfClassArgument.h: -------------------------------------------------------------------------------- 1 | #import "AnyInstanceArgument.h" 2 | 3 | namespace Cedar { namespace Doubles { 4 | 5 | class AnyInstanceOfClassArgument : public AnyInstanceArgument { 6 | private: 7 | AnyInstanceOfClassArgument & operator=(const AnyInstanceOfClassArgument &); 8 | 9 | public: 10 | explicit AnyInstanceOfClassArgument(const Class); 11 | virtual ~AnyInstanceOfClassArgument(); 12 | // Allow default copy ctor. 13 | 14 | virtual NSString * value_string() const; 15 | virtual bool matches_bytes(void *) const; 16 | virtual bool matches(const Argument &) const; 17 | private: 18 | const Class class_; 19 | }; 20 | 21 | namespace Arguments { 22 | Argument::shared_ptr_t any(Class); 23 | } 24 | }} 25 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Headers/Argument.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import 4 | 5 | namespace Cedar { namespace Doubles { 6 | 7 | #pragma mark - Argument 8 | class Argument { 9 | public: 10 | virtual ~Argument() = 0; 11 | 12 | virtual const char * const value_encoding() const = 0; 13 | virtual void * value_bytes() const = 0; 14 | virtual NSString * value_string() const = 0; 15 | 16 | virtual bool matches_encoding(const char *) const = 0; 17 | virtual bool matches_bytes(void *) const = 0; 18 | virtual unsigned int specificity_ranking() const = 0; 19 | 20 | typedef std::shared_ptr shared_ptr_t; 21 | virtual bool matches(const Argument &other_argument) const { 22 | return ((this->matches_encoding(other_argument.value_encoding()) && this->matches_bytes(other_argument.value_bytes())) || 23 | (other_argument.matches_encoding(this->value_encoding()) && other_argument.matches_bytes(this->value_bytes()))); 24 | } 25 | 26 | bool operator==(const Argument &other_argument) const { 27 | return typeid(*this) == typeid(other_argument) && this->matches(other_argument); 28 | } 29 | 30 | bool operator!=(const Argument &other_argument) const { 31 | return !(*this == other_argument); 32 | } 33 | }; 34 | 35 | inline /* virtual */ Argument::~Argument() {} 36 | 37 | }} 38 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/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 | NSString * failureMessageEnd = this->failure_message_end(); 45 | NSString * actualValueString = MessageBuilder_::string_for_actual_value(value); 46 | return [NSString stringWithFormat:@"Expected <%@> to %@", actualValueString, failureMessageEnd]; 47 | } 48 | 49 | template template 50 | NSString * Base::negative_failure_message_for(const U & value) const { 51 | NSString * failureMessageEnd = this->failure_message_end(); 52 | NSString * actualValueString = MessageBuilder_::string_for_actual_value(value); 53 | return [NSString stringWithFormat:@"Expected <%@> to not %@", actualValueString, failureMessageEnd]; 54 | } 55 | }} 56 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Headers/BeEmpty.h: -------------------------------------------------------------------------------- 1 | #import "Base.h" 2 | 3 | #pragma mark - private interface 4 | namespace Cedar { namespace Matchers { namespace Private { 5 | class BeEmpty : public Base<> { 6 | private: 7 | BeEmpty & operator=(const BeEmpty &); 8 | 9 | public: 10 | inline BeEmpty() : Base<>() {} 11 | inline ~BeEmpty() {} 12 | // Allow default copy ctor. 13 | 14 | inline const BeEmpty & 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 @"be empty"; } 21 | }; 22 | 23 | #pragma mark Generic 24 | template 25 | bool BeEmpty::matches(const U & actualValue) const { 26 | return Comparators::compare_empty(actualValue); 27 | } 28 | }}} 29 | 30 | #pragma mark - public interface 31 | namespace Cedar { namespace Matchers { 32 | using CedarBeEmpty = Cedar::Matchers::Private::BeEmpty; 33 | static const CedarBeEmpty be_empty = CedarBeEmpty(); 34 | }} 35 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Headers/BeFalsy.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Base.h" 3 | 4 | #pragma mark - private interface 5 | namespace Cedar { namespace Matchers { namespace Private { 6 | class BeFalsy : public Base<> { 7 | private: 8 | BeFalsy & operator=(const BeFalsy &); 9 | 10 | public: 11 | inline BeFalsy() : Base<>() {} 12 | inline ~BeFalsy() {} 13 | // Allow default copy ctor. 14 | 15 | inline const BeFalsy & operator()() const { return *this; } 16 | 17 | template 18 | bool matches(const U &) const; 19 | 20 | protected: 21 | inline /*virtual*/ NSString * failure_message_end() const { return @"evaluate to false"; } 22 | }; 23 | 24 | static const BeFalsy be_falsy = BeFalsy(); 25 | 26 | #pragma mark Generic 27 | template 28 | bool BeFalsy::matches(const U & actualValue) const { 29 | return !actualValue; 30 | } 31 | 32 | }}} 33 | 34 | #pragma mark - public interface 35 | namespace Cedar { namespace Matchers { 36 | using CedarBeFalsy = Cedar::Matchers::Private::BeFalsy; 37 | static const CedarBeFalsy be_falsy = CedarBeFalsy(); 38 | }} 39 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Headers/BeGreaterThan.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Base.h" 3 | 4 | namespace Cedar { namespace Matchers { namespace Private { 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::BeGreaterThan(const T & expectedValue) 28 | : Base<>(), expectedValue_(expectedValue) { 29 | } 30 | 31 | template 32 | BeGreaterThan::~BeGreaterThan() { 33 | } 34 | 35 | template 36 | /*virtual*/ NSString * BeGreaterThan::failure_message_end() const { 37 | NSString * expectedValueString = Stringifiers::string_for(expectedValue_); 38 | return [NSString stringWithFormat:@"be greater than <%@>", expectedValueString]; 39 | } 40 | 41 | template template 42 | bool BeGreaterThan::matches(const U & actualValue) const { 43 | return Comparators::compare_greater_than(actualValue, expectedValue_); 44 | } 45 | }}} 46 | 47 | #pragma mark - public interface 48 | namespace Cedar { namespace Matchers { 49 | template 50 | using CedarBeGreaterThan = Cedar::Matchers::Private::BeGreaterThan; 51 | 52 | template 53 | CedarBeGreaterThan be_greater_than(const T & expectedValue) { 54 | return CedarBeGreaterThan(expectedValue); 55 | } 56 | 57 | #pragma mark operators 58 | template 59 | bool operator>(const ActualValue & actualValue, const U & expectedValue) { 60 | return actualValue.to > expectedValue; 61 | } 62 | 63 | template 64 | bool operator>(const ActualValueMatchProxy & actualValueMatchProxy, const U & expectedValue) { 65 | actualValueMatchProxy(be_greater_than(expectedValue)); 66 | return true; 67 | } 68 | }} 69 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Headers/BeLTE.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Base.h" 3 | 4 | #pragma mark - private interface 5 | namespace Cedar { namespace Matchers { namespace Private { 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::BeLTE(const T & expectedValue) 28 | : Base<>(), expectedValue_(expectedValue) { 29 | } 30 | 31 | template 32 | BeLTE::~BeLTE() { 33 | } 34 | 35 | template 36 | /*virtual*/ NSString * BeLTE::failure_message_end() const { 37 | NSString * expectedValueString = Stringifiers::string_for(expectedValue_); 38 | return [NSString stringWithFormat:@"be less than or equal to <%@>", expectedValueString]; 39 | } 40 | 41 | template template 42 | bool BeLTE::matches(const U & actualValue) const { 43 | return !Comparators::compare_greater_than(actualValue, expectedValue_); 44 | } 45 | }}} 46 | 47 | #pragma mark - public interface 48 | namespace Cedar { namespace Matchers { 49 | template 50 | using CedarBeLTE = Cedar::Matchers::Private::BeLTE; 51 | 52 | template 53 | CedarBeLTE be_lte(const T & expectedValue) { 54 | return CedarBeLTE(expectedValue); 55 | } 56 | 57 | template 58 | CedarBeLTE be_less_than_or_equal_to(const T & expectedValue) { 59 | return be_lte(expectedValue); 60 | } 61 | 62 | #pragma mark operators 63 | template 64 | bool operator<=(const ActualValue & actualValue, const U & expectedValue) { 65 | return actualValue.to <= expectedValue; 66 | } 67 | 68 | template 69 | bool operator<=(const ActualValueMatchProxy & actualValueMatchProxy, const U & expectedValue) { 70 | actualValueMatchProxy(be_lte(expectedValue)); 71 | return true; 72 | } 73 | }} 74 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Headers/BeLessThan.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Base.h" 3 | 4 | #pragma mark - private interface 5 | namespace Cedar { namespace Matchers { namespace Private { 6 | 7 | template 8 | class BeLessThan : public Base<> { 9 | private: 10 | BeLessThan & operator=(const BeLessThan &); 11 | 12 | public: 13 | explicit BeLessThan(const T & expectedValue); 14 | ~BeLessThan(); 15 | // Allow default copy ctor. 16 | 17 | template 18 | bool matches(const U &) const; 19 | 20 | protected: 21 | virtual NSString * failure_message_end() const; 22 | 23 | private: 24 | const T & expectedValue_; 25 | }; 26 | 27 | template 28 | BeLessThan::BeLessThan(const T & expectedValue) 29 | : Base<>(), expectedValue_(expectedValue) { 30 | } 31 | 32 | template 33 | BeLessThan::~BeLessThan() { 34 | } 35 | 36 | template 37 | /*virtual*/ NSString * BeLessThan::failure_message_end() const { 38 | NSString * expectedValueString = Stringifiers::string_for(expectedValue_); 39 | return [NSString stringWithFormat:@"be less than <%@>", expectedValueString]; 40 | } 41 | 42 | template template 43 | bool BeLessThan::matches(const U & actualValue) const { 44 | return !Comparators::compare_greater_than(actualValue, expectedValue_) && !Comparators::compare_equal(actualValue, expectedValue_); 45 | } 46 | 47 | }}} 48 | 49 | #pragma mark - public interface 50 | namespace Cedar { namespace Matchers { 51 | template 52 | using CedarBeLessThan = Cedar::Matchers::Private::BeLessThan; 53 | 54 | template 55 | CedarBeLessThan be_less_than(const T & expectedValue) { 56 | return CedarBeLessThan(expectedValue); 57 | } 58 | 59 | #pragma mark operators 60 | template 61 | bool operator<(const ActualValue & actualValue, const U & expectedValue) { 62 | return actualValue.to < expectedValue; 63 | } 64 | 65 | template 66 | bool operator<(const ActualValueMatchProxy & actualValueMatchProxy, const U & expectedValue) { 67 | actualValueMatchProxy(be_less_than(expectedValue)); 68 | return true; 69 | } 70 | }} 71 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Headers/BeTruthy.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Base.h" 3 | 4 | #pragma mark - private interface 5 | namespace Cedar { namespace Matchers { namespace Private { 6 | class BeTruthy : public Base<> { 7 | private: 8 | BeTruthy & operator=(const BeTruthy &); 9 | 10 | public: 11 | inline BeTruthy() : Base<>() {} 12 | inline ~BeTruthy() {} 13 | // Allow default copy ctor. 14 | 15 | inline const BeTruthy & operator()() const { return *this; } 16 | 17 | template 18 | bool matches(const U &) const; 19 | 20 | protected: 21 | inline /*virtual*/ NSString * failure_message_end() const { return @"evaluate to true"; } 22 | }; 23 | 24 | static const BeTruthy be_truthy = BeTruthy(); 25 | 26 | #pragma mark Generic 27 | template 28 | bool BeTruthy::matches(const U & actualValue) const { 29 | return !!actualValue; 30 | } 31 | }}} 32 | 33 | #pragma mark - public interface 34 | namespace Cedar { namespace Matchers { 35 | using CedarBeTruthy = Cedar::Matchers::Private::BeTruthy; 36 | static const CedarBeTruthy be_truthy = CedarBeTruthy(); 37 | }} 38 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Headers/CDRClassFake.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CDRFake.h" 3 | #import "CedarDouble.h" 4 | 5 | @interface CDRClassFake : CDRFake 6 | 7 | @end 8 | 9 | id CDR_fake_for(BOOL require_explicit_stubs, Class klass, ...); 10 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Headers/CDRColorizedReporter.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CDRDefaultReporter.h" 3 | 4 | @interface CDRColorizedReporter : CDRDefaultReporter 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Headers/CDRExample.h: -------------------------------------------------------------------------------- 1 | #import "CDRExampleBase.h" 2 | #import "CDRSpecFailure.h" 3 | 4 | @interface CDRExample : CDRExampleBase { 5 | CDRSpecBlock block_; 6 | CDRExampleState state_; 7 | CDRSpecFailure *failure_; 8 | } 9 | 10 | @property (nonatomic, retain) CDRSpecFailure *failure; 11 | 12 | + (id)exampleWithText:(NSString *)text andBlock:(CDRSpecBlock)block; 13 | - (id)initWithText:(NSString *)text andBlock:(CDRSpecBlock)block; 14 | - (BOOL)isPending; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Headers/CDRExampleBase.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CDRExampleParent.h" 3 | 4 | @class CDRSpec, CDRReportDispatcher; 5 | typedef NS_ENUM(NSInteger, CDRExampleState) { 6 | CDRExampleStateIncomplete = 0x00, 7 | CDRExampleStateSkipped = 0x01, 8 | CDRExampleStatePassed = 0x03, 9 | CDRExampleStatePending = 0x07, 10 | CDRExampleStateFailed = 0x0F, 11 | CDRExampleStateError = 0x1F 12 | }; 13 | 14 | @interface CDRExampleBase : NSObject { 15 | NSString *text_; 16 | NSObject *parent_; 17 | CDRSpec *spec_; 18 | BOOL focused_; 19 | NSUInteger stackAddress_; 20 | NSDate *startDate_; 21 | NSDate *endDate_; 22 | } 23 | 24 | @property (nonatomic, readonly) NSString *text; 25 | @property (nonatomic, assign) NSObject *parent; 26 | @property (nonatomic, assign) CDRSpec *spec; 27 | @property (nonatomic, assign, getter=isFocused) BOOL focused; 28 | @property (nonatomic) NSUInteger stackAddress; 29 | @property (nonatomic, readonly) NSDate *startDate; 30 | @property (nonatomic, readonly) NSDate *endDate; 31 | 32 | - (id)initWithText:(NSString *)text; 33 | 34 | 35 | - (void)runWithDispatcher:(CDRReportDispatcher *)dispatcher; 36 | - (BOOL)shouldRun; 37 | 38 | - (BOOL)hasChildren; 39 | - (BOOL)hasFocusedExamples; 40 | 41 | - (NSString *)message; 42 | - (NSString *)fullText; 43 | - (NSMutableArray *)fullTextInPieces; 44 | 45 | - (NSTimeInterval)runTime; 46 | - (CDRExampleState)state; 47 | @end 48 | 49 | @interface CDRExampleBase (RunReporting) 50 | - (float)progress; 51 | @end 52 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Headers/CDRExampleGroup.h: -------------------------------------------------------------------------------- 1 | #import "CDRExampleBase.h" 2 | 3 | @interface CDRExampleGroup : CDRExampleBase { 4 | NSMutableArray *beforeBlocks_, *examples_, *afterBlocks_; 5 | BOOL isRoot_; 6 | CDRSpecBlock subjectActionBlock_; 7 | } 8 | 9 | @property (nonatomic, copy) CDRSpecBlock subjectActionBlock; 10 | @property (nonatomic, readonly) NSArray *examples; 11 | 12 | + (id)groupWithText:(NSString *)text; 13 | 14 | - (id)initWithText:(NSString *)text isRoot:(BOOL)isRoot; 15 | - (void)add:(CDRExampleBase *)example; 16 | - (void)addBefore:(CDRSpecBlock)block; 17 | - (void)addAfter:(CDRSpecBlock)block; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Headers/CDRExampleParent.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | typedef void (^CDRSpecBlock)(void); 4 | 5 | @protocol CDRExampleParent 6 | 7 | - (BOOL)shouldRun; 8 | 9 | - (void)setUp; 10 | - (CDRSpecBlock)subjectActionBlock; 11 | - (void)tearDown; 12 | 13 | @optional 14 | - (BOOL)hasFullText; 15 | - (NSString *)fullText; 16 | - (NSMutableArray *)fullTextInPieces; 17 | 18 | - (NSUInteger)stackAddress; 19 | @end 20 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Headers/CDRExampleReporter.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class CDRExample, CDRExampleGroup, CDRSpec; 4 | 5 | @protocol CDRExampleReporter 6 | 7 | - (void)runWillStartWithGroups:(NSArray *)groups andRandomSeed:(unsigned int)seed; 8 | - (void)runDidComplete; 9 | - (int)result; 10 | 11 | // new methods to use instead of KVO 12 | @required 13 | - (void)runWillStartExample:(CDRExample *)example; 14 | - (void)runDidFinishExample:(CDRExample *)example; 15 | 16 | - (void)runWillStartExampleGroup:(CDRExampleGroup *)exampleGroup; 17 | - (void)runDidFinishExampleGroup:(CDRExampleGroup *)exampleGroup; 18 | 19 | - (void)runWillStartSpec:(CDRSpec *)spec; 20 | - (void)runDidFinishSpec:(CDRSpec *)spec; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Headers/CDRFake.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CedarDouble.h" 3 | 4 | @interface CDRFake : NSObject 5 | 6 | @property (nonatomic, assign) Class klass; 7 | @property (nonatomic, assign) BOOL requiresExplicitStubs; 8 | 9 | - (id)initWithClass:(Class)klass requireExplicitStubs:(BOOL)requireExplicitStubs; 10 | 11 | @end 12 | 13 | #ifndef CEDAR_DOUBLES_COMPATIBILITY_MODE 14 | #define fake_for(...) CDR_fake_for(YES, __VA_ARGS__, nil) 15 | #define nice_fake_for(...) CDR_fake_for(NO, __VA_ARGS__, nil) 16 | #endif 17 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Headers/CDRFunctions.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NSArray *CDRReportersFromEnv(const char*defaultReporterClassName); 4 | 5 | int CDRRunSpecs(); 6 | OBJC_EXPORT void CDRInjectIntoXCTestRunner(); 7 | int CDRRunSpecsWithCustomExampleReporters(NSArray *reporters); 8 | NSArray *CDRShuffleItemsInArrayWithSeed(NSArray *sortedItems, unsigned int seed); 9 | NSArray *CDRReportersToRun(); 10 | NSString *CDRGetTestBundleExtension(); 11 | void CDRSuppressStandardPipesWhileLoadingClasses(); 12 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Headers/CDRHooks.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @protocol CDRHooks 4 | 5 | @optional 6 | 7 | + (void)beforeEach; 8 | + (void)afterEach; 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Headers/CDRProtocolFake.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CedarDouble.h" 3 | #import "CDRFake.h" 4 | 5 | #import 6 | #import 7 | 8 | @interface CDRProtocolFake : CDRFake 9 | 10 | - (id)initWithClass:(Class)klass forProtocols:(NSArray *)protocols requireExplicitStubs:(BOOL)requireExplicitStubs; 11 | 12 | @end 13 | 14 | id CDR_fake_for(BOOL require_explicit_stubs, Protocol *protocol, ...); 15 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Headers/CDRSharedExampleGroupPool.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #define CDR_OVERLOADABLE __attribute__((overloadable)) 4 | 5 | @protocol CDRSharedExampleGroupPool 6 | @end 7 | 8 | typedef void (^CDRSharedExampleGroupBlock)(NSDictionary *); 9 | typedef void (^CDRSharedExampleContextProviderBlock)(NSMutableDictionary *); 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | void sharedExamplesFor(NSString *, CDRSharedExampleGroupBlock); 15 | CDR_OVERLOADABLE void itShouldBehaveLike(NSString *); 16 | CDR_OVERLOADABLE void itShouldBehaveLike(NSString *, CDRSharedExampleContextProviderBlock); 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | 21 | @interface CDRSharedExampleGroupPool : NSObject 22 | @end 23 | 24 | @interface CDRSharedExampleGroupPool (SharedExampleGroupDeclaration) 25 | - (void)declareSharedExampleGroups; 26 | @end 27 | 28 | #define SHARED_EXAMPLE_GROUPS_BEGIN(name) \ 29 | @interface SharedExampleGroupPoolFor##name : CDRSharedExampleGroupPool \ 30 | @end \ 31 | @implementation SharedExampleGroupPoolFor##name \ 32 | - (void)declareSharedExampleGroups { 33 | 34 | #define SHARED_EXAMPLE_GROUPS_END \ 35 | } \ 36 | @end 37 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Headers/CDRSlowTestStatistics.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface CDRSlowTestStatistics : NSObject 4 | 5 | - (void)printStatsForExampleGroups:(NSArray *)groups; 6 | 7 | @end 8 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Headers/CDRSpec.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CDRExampleBase.h" 3 | 4 | @protocol CDRExampleReporter; 5 | @class CDRExampleGroup, CDRExample, CDRSpecHelper, CDRSymbolicator; 6 | @class CDRReportDispatcher; 7 | 8 | @protocol CDRSpec 9 | @end 10 | 11 | extern const CDRSpecBlock PENDING; 12 | 13 | #ifdef __cplusplus 14 | extern "C" { 15 | #endif 16 | void beforeEach(CDRSpecBlock); 17 | void afterEach(CDRSpecBlock); 18 | 19 | CDRExampleGroup * describe(NSString *, CDRSpecBlock); 20 | extern CDRExampleGroup* (*context)(NSString *, CDRSpecBlock); 21 | 22 | CDRExample * it(NSString *, CDRSpecBlock); 23 | 24 | CDRExampleGroup * xdescribe(NSString *, CDRSpecBlock); 25 | extern CDRExampleGroup* (*xcontext)(NSString *, CDRSpecBlock); 26 | void subjectAction(CDRSpecBlock); 27 | CDRExample * xit(NSString *, CDRSpecBlock); 28 | 29 | CDRExampleGroup * fdescribe(NSString *, CDRSpecBlock); 30 | extern CDRExampleGroup* (*fcontext)(NSString *, CDRSpecBlock); 31 | CDRExample * fit(NSString *, CDRSpecBlock); 32 | 33 | void fail(NSString *); 34 | #ifdef __cplusplus 35 | } 36 | 37 | #import "ActualValue.h" 38 | #import "ShouldSyntax.h" 39 | #import "CedarComparators.h" 40 | #import "CedarMatchers.h" 41 | #import "CedarDoubles.h" 42 | 43 | #endif // __cplusplus 44 | 45 | @interface CDRSpec : NSObject { 46 | CDRExampleGroup *rootGroup_; 47 | CDRExampleGroup *currentGroup_; 48 | NSString *fileName_; 49 | CDRSymbolicator *symbolicator_; 50 | } 51 | 52 | @property (nonatomic, retain) CDRExampleGroup *currentGroup, *rootGroup; 53 | @property (nonatomic, retain) NSString *fileName; 54 | @property (nonatomic, retain) CDRSymbolicator *symbolicator; 55 | 56 | - (void)defineBehaviors; 57 | - (void)markAsFocusedClosestToLineNumber:(NSUInteger)lineNumber; 58 | - (NSArray *)allChildren; 59 | @end 60 | 61 | @interface CDRSpec (XCTestSupport) 62 | - (id)testSuiteWithRandomSeed:(unsigned int)seed dispatcher:(CDRReportDispatcher *)dispatcher; 63 | @end 64 | 65 | @interface CDRSpec (SpecDeclaration) 66 | - (void)declareBehaviors; 67 | @end 68 | 69 | #define SPEC_BEGIN(name) \ 70 | @interface name : CDRSpec \ 71 | @end \ 72 | @implementation name \ 73 | - (void)declareBehaviors { \ 74 | self.fileName = [NSString stringWithUTF8String:__FILE__]; 75 | 76 | #define SPEC_END \ 77 | } \ 78 | @end 79 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Headers/CDRSpecFailure.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface CDRSpecFailure : NSException { 4 | NSString *fileName_; 5 | int lineNumber_; 6 | NSArray *callStackReturnAddresses_; 7 | } 8 | 9 | @property (nonatomic, retain, readonly) NSString *fileName; 10 | @property (nonatomic, assign, readonly) int lineNumber; 11 | @property (copy, readonly) NSArray *callStackReturnAddresses; 12 | 13 | + (id)specFailureWithReason:(NSString *)reason; 14 | + (id)specFailureWithReason:(NSString *)reason fileName:(NSString *)fileName lineNumber:(int)lineNumber; 15 | + (id)specFailureWithRaisedObject:(NSObject *)object; 16 | 17 | - (id)initWithReason:(NSString *)reason; 18 | - (id)initWithReason:(NSString *)reason fileName:(NSString *)fileName lineNumber:(int)lineNumber; 19 | - (id)initWithRaisedObject:(NSObject *)object; 20 | 21 | - (NSString *)callStackSymbolicatedSymbols:(NSError **)error; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Headers/CDRSpecHelper.h: -------------------------------------------------------------------------------- 1 | #import "CDRSpec.h" 2 | #import "CDRHooks.h" 3 | #import "CDRSharedExampleGroupPool.h" 4 | #import "CDRExampleParent.h" 5 | 6 | @interface CDRSpecHelper : NSObject { 7 | NSMutableDictionary *sharedExampleContext_, *sharedExampleGroups_; 8 | NSArray *globalBeforeEachClasses_, *globalAfterEachClasses_; 9 | BOOL shouldOnlyRunFocused_; 10 | } 11 | 12 | @property (nonatomic, retain, readonly) NSMutableDictionary *sharedExampleContext; 13 | @property (nonatomic, retain) NSArray *globalBeforeEachClasses, *globalAfterEachClasses; 14 | 15 | @property (nonatomic, assign) BOOL shouldOnlyRunFocused; 16 | 17 | + (CDRSpecHelper *)specHelper; 18 | 19 | @end 20 | 21 | @compatibility_alias SpecHelper CDRSpecHelper; 22 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Headers/CDRSpy.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CedarDouble.h" 3 | 4 | @interface CDRSpy : NSProxy 5 | 6 | + (void)interceptMessagesForInstance:(id)instance; 7 | + (void)stopInterceptingMessagesForInstance:(id)instance; 8 | 9 | @end 10 | 11 | namespace Cedar { namespace Doubles { 12 | inline void CDR_spy_on(id instance) { 13 | [CDRSpy interceptMessagesForInstance:instance]; 14 | } 15 | 16 | inline void CDR_stop_spying_on(id instance) { 17 | [CDRSpy stopInterceptingMessagesForInstance:instance]; 18 | } 19 | }} 20 | 21 | #ifndef CEDAR_DOUBLES_COMPATIBILITY_MODE 22 | #define spy_on(x) CDR_spy_on((x)) 23 | #define stop_spying_on(x) CDR_stop_spying_on((x)) 24 | #endif 25 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Headers/CDRSpyInfo.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class CedarDoubleImpl; 4 | 5 | @interface CDRSpyInfo : NSObject 6 | 7 | @property (nonatomic, assign) Class publicClass; 8 | @property (nonatomic, assign) Class spiedClass; 9 | @property (nonatomic, retain) CedarDoubleImpl *cedarDouble; 10 | 11 | + (void)storeSpyInfoForObject:(id)object; 12 | + (BOOL)clearSpyInfoForObject:(id)object; 13 | 14 | + (CDRSpyInfo *)spyInfoForObject:(id)object; 15 | + (CedarDoubleImpl *)cedarDoubleForObject:(id)object; 16 | + (Class)publicClassForObject:(id)object; 17 | 18 | - (IMP)impForSelector:(SEL)selector; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Headers/CDRSymbolicator.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NSUInteger CDRCallerStackAddress(); 4 | 5 | extern NSString *kCDRSymbolicatorErrorDomain; 6 | extern NSString *kCDRSymbolicatorErrorMessageKey; 7 | 8 | typedef enum { 9 | kCDRSymbolicatorErrorNotAvailable = 100, 10 | kCDRSymbolicatorErrorNotSuccessful, 11 | kCDRSymbolicatorErrorNoAddresses, 12 | } kCDRSymbolicatorError; 13 | 14 | @interface CDRSymbolicator : NSObject 15 | - (BOOL)symbolicateAddresses:(NSArray *)addresses error:(NSError **)error; 16 | - (NSString *)fileNameForStackAddress:(NSUInteger)address; 17 | - (NSUInteger)lineNumberForStackAddress:(NSUInteger)address; 18 | @end 19 | 20 | 21 | @interface CDRAtosTask : NSObject { 22 | NSString *executablePath_; 23 | long slide_; 24 | NSArray *addresses_; 25 | NSArray *outputLines_; 26 | } 27 | 28 | @property (retain, nonatomic) NSString *executablePath; 29 | @property (assign, nonatomic) long slide; 30 | @property (retain, nonatomic) NSArray *addresses; 31 | 32 | - (id)initWithExecutablePath:(NSString *)executablePath slide:(long)slide addresses:(NSArray *)addresses; 33 | - (void)launch; 34 | - (void)valuesOnLineNumber:(NSUInteger)line fileName:(NSString **)fileName lineNumber:(NSNumber **)lineNumber; 35 | @end 36 | 37 | @interface CDRAtosTask (CurrentTestExecutable) 38 | + (CDRAtosTask *)taskForCurrentTestExecutable; 39 | @end 40 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Headers/CDRVersion.h: -------------------------------------------------------------------------------- 1 | NSString *CDRVersion = @"0.11.2"; 2 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Headers/Cedar-iOS.h: -------------------------------------------------------------------------------- 1 | #import "Cedar.h" 2 | #import "CedarApplicationDelegate.h" 3 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Headers/Cedar.h: -------------------------------------------------------------------------------- 1 | #import "CDRFunctions.h" 2 | #import "CDRSpecHelper.h" 3 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Headers/CedarApplicationDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | // In some cases CDRIPhoneOTestRunner needs to spin up an instance of Cedar app. 4 | // It appears that SenTestingKit fails to start up the test when CedarApplicationDelegate 5 | // is used. Solution is to use a subclass of UIApplicaton. 6 | @interface CedarApplication : UIApplication 7 | @end 8 | 9 | // Needed for backwards compatibility with existing projects using CedarApplicationDelegate 10 | @interface CedarApplicationDelegate : NSObject 11 | @end 12 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Headers/CedarComparators.h: -------------------------------------------------------------------------------- 1 | #import "ComparatorsBase.h" 2 | #import "ComparatorsContainer.h" 3 | 4 | #if TARGET_OS_IPHONE 5 | #import "UIKitComparatorsContainer.h" 6 | #endif 7 | 8 | #import "ComparatorsContainerConvenience.h" 9 | 10 | #ifdef CEDAR_CUSTOM_COMPARATORS 11 | #import CEDAR_CUSTOM_COMPARATORS 12 | #endif 13 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Headers/CedarDouble.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | namespace Cedar { namespace Doubles { 4 | class StubbedMethod; 5 | class RejectedMethod; 6 | }} 7 | 8 | @protocol CedarDouble 9 | 10 | - (Cedar::Doubles::StubbedMethod &)add_stub:(const Cedar::Doubles::StubbedMethod &)stubbed_method; 11 | - (void)reject_method:(const Cedar::Doubles::RejectedMethod &)rejected_method; 12 | 13 | - (NSArray *)sent_messages; 14 | - (void)reset_sent_messages; 15 | 16 | - (BOOL)can_stub:(SEL)selector; 17 | - (BOOL)has_stubbed_method_for:(SEL)selector; 18 | - (BOOL)has_rejected_method_for:(SEL)selector; 19 | 20 | @end 21 | 22 | namespace Cedar { namespace Doubles { 23 | 24 | struct MethodStubbingMarker { 25 | const char *fileName; 26 | int lineNumber; 27 | }; 28 | 29 | id operator,(id, const MethodStubbingMarker &); 30 | 31 | void operator,(id, const StubbedMethod &); 32 | void operator,(id, const RejectedMethod &); 33 | }} 34 | 35 | #ifndef CEDAR_MATCHERS_DISALLOW_STUB_METHOD 36 | #define stub_method(x) ,(Cedar::Doubles::MethodStubbingMarker){__FILE__, __LINE__},Cedar::Doubles::StubbedMethod((x)) 37 | #define reject_method(x) ,(Cedar::Doubles::MethodStubbingMarker){__FILE__, __LINE__},Cedar::Doubles::RejectedMethod((x)) 38 | #endif 39 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Headers/CedarDoubleImpl.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CedarDouble.h" 3 | #import "StubbedMethod.h" 4 | #import "RejectedMethod.h" 5 | 6 | typedef enum { 7 | CDRStubMethodNotStubbed = 0, 8 | CDRStubMethodInvoked, 9 | CDRStubWrongArguments, 10 | } CDRStubInvokeStatus; 11 | 12 | @interface CedarDoubleImpl : NSObject 13 | 14 | + (void)afterEach; 15 | 16 | - (id)initWithDouble:(NSObject *)parent_double; 17 | 18 | - (CDRStubInvokeStatus)invoke_stubbed_method:(NSInvocation *)invocation; 19 | - (void)record_method_invocation:(NSInvocation *)invocation; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Headers/CedarDoubles.h: -------------------------------------------------------------------------------- 1 | #import "CDRSpy.h" 2 | #import "CDRFake.h" 3 | #import "CDRClassFake.h" 4 | #import "CDRProtocolFake.h" 5 | #import "HaveReceived.h" 6 | #import "StubbedMethod.h" 7 | #import "RejectedMethod.h" 8 | 9 | #import "Argument.h" 10 | #import "AnyArgument.h" 11 | #import "ValueArgument.h" 12 | #import "AnyInstanceOfClassArgument.h" 13 | #import "AnyInstanceConformingToProtocolArgument.h" 14 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Headers/CedarMatchers.h: -------------------------------------------------------------------------------- 1 | // Base 2 | #import "Equal.h" 3 | #import "BeTruthy.h" 4 | #import "BeFalsy.h" 5 | #import "BeNil.h" 6 | #import "BeCloseTo.h" 7 | #import "BeSameInstanceAs.h" 8 | #import "BeInstanceOf.h" 9 | #import "BeGreaterThan.h" 10 | #import "BeGTE.h" 11 | #import "BeLessThan.h" 12 | #import "BeLTE.h" 13 | #import "RaiseException.h" 14 | #import "RespondTo.h" 15 | #import "ConformTo.h" 16 | 17 | // Container 18 | #import "BeEmpty.h" 19 | #import "AnInstanceOf.h" 20 | #import "Contain.h" 21 | 22 | // Verifiers 23 | #import "Exist.h" 24 | 25 | #ifdef CEDAR_CUSTOM_MATCHERS 26 | #import CEDAR_CUSTOM_MATCHERS 27 | #endif 28 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/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 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Headers/ComparatorsBase.h: -------------------------------------------------------------------------------- 1 | #import "CompareEqual.h" 2 | #import "CompareGreaterThan.h" 3 | #import "CompareCloseTo.h" 4 | 5 | #if TARGET_OS_IPHONE 6 | #import "UIGeometryCompareEqual.h" 7 | #else 8 | #import "OSXGeometryCompareEqual.h" 9 | #endif 10 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Headers/ComparatorsContainerConvenience.h: -------------------------------------------------------------------------------- 1 | namespace Cedar { namespace Matchers { namespace Comparators { 2 | template 3 | bool compare_contains(const T & container, const U & element, contains_options options) { 4 | return compare_contains(container, element, options, [](const U & lhs, const U & rhs) { return compare_equal(lhs, rhs); }); 5 | } 6 | }}} 7 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Headers/CompareCloseTo.h: -------------------------------------------------------------------------------- 1 | #import "CDRSpecFailure.h" 2 | 3 | namespace Cedar { namespace Matchers { namespace Comparators { 4 | inline bool compare_close_to(const double actualValue, const double expectedValue, const double threshold) { 5 | return actualValue > expectedValue - threshold && actualValue < expectedValue + threshold; 6 | } 7 | 8 | inline bool compare_close_to(const NSDecimal & actualValue, const NSDecimal & expectedValue, const double threshold) { 9 | NSDecimal decimalThreshold = [@(threshold) decimalValue]; 10 | NSDecimal maxExpectedValue; 11 | NSDecimal minExpectedValue; 12 | NSDecimalAdd(&maxExpectedValue, &expectedValue, &decimalThreshold, NSRoundPlain); 13 | NSDecimalSubtract(&minExpectedValue, &expectedValue, &decimalThreshold, NSRoundPlain); 14 | return NSDecimalCompare(&actualValue, &minExpectedValue) != NSOrderedAscending && NSDecimalCompare(&actualValue, &maxExpectedValue) != NSOrderedDescending; 15 | } 16 | 17 | inline bool compare_close_to(const id actualValue, const id expectedValue, const double threshold) { 18 | if ([expectedValue isKindOfClass:[NSNumber class]] && [actualValue isKindOfClass:[NSNumber class]]) { 19 | return compare_close_to([actualValue decimalValue], [expectedValue decimalValue], threshold); 20 | } 21 | if ([expectedValue isKindOfClass:[NSDate class]] && [actualValue isKindOfClass:[NSDate class]]) { 22 | return compare_close_to([actualValue timeIntervalSince1970], [expectedValue timeIntervalSince1970], threshold); 23 | } 24 | 25 | NSString *reason = [NSString stringWithFormat:@"Actual value <%@> (%@) is not a numeric value (NSNumber, NSDate, float, etc.)", 26 | actualValue, NSStringFromClass([actualValue class])]; 27 | [[CDRSpecFailure specFailureWithReason:reason] raise]; 28 | return false; 29 | } 30 | }}} 31 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/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 NSDecimal 16 | inline bool compare_equal(const NSDecimal & actualValue, const NSDecimal & expectedValue) { 17 | return NSOrderedSame == NSDecimalCompare(&actualValue, &expectedValue); 18 | } 19 | 20 | #pragma mark C Strings 21 | template 22 | bool compare_equal(char *actualValue, const U & expectedValue) { 23 | return strcmp(actualValue, expectedValue) == 0; 24 | } 25 | 26 | template 27 | bool compare_equal(const char *actualValue, const U & expectedValue) { 28 | return strcmp(actualValue, expectedValue) == 0; 29 | } 30 | 31 | #pragma mark NSRange 32 | template 33 | bool compare_equal(const NSRange actualValue, const U & expectedValue) { 34 | return NSEqualRanges(actualValue, expectedValue); 35 | } 36 | }}} 37 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/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 | 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 | id actualValueObject = [actualValueId nonretainedObjectValue]; 10 | id expectedValueObject = [expectedValueId nonretainedObjectValue]; 11 | if ([actualValueObject respondsToSelector:@selector(compare:)]) { 12 | return NSOrderedDescending == [actualValueObject compare:expectedValueObject]; 13 | } else if ([expectedValueObject respondsToSelector:@selector(compare:)]) { 14 | return NSOrderedAscending == [expectedValueObject compare:actualValueObject]; 15 | } 16 | return false; 17 | } else { 18 | return actualValue > expectedValue; 19 | } 20 | } 21 | 22 | #pragma mark NSDecimal 23 | inline bool compare_greater_than(const NSDecimal & actualValue, const NSDecimal & expectedValue) { 24 | return NSOrderedDescending == NSDecimalCompare(&actualValue, &expectedValue); 25 | } 26 | }}} 27 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Headers/ConformTo.h: -------------------------------------------------------------------------------- 1 | #import "Base.h" 2 | 3 | #pragma mark - private interface 4 | namespace Cedar { namespace Matchers { namespace Private { 5 | 6 | class ConformTo : public Base<> { 7 | private: 8 | ConformTo & operator=(const ConformTo &); 9 | 10 | public: 11 | explicit ConformTo(const char *); 12 | ConformTo(Protocol *protocol); 13 | ~ConformTo(); 14 | // Allow default copy ctor. 15 | 16 | bool matches(const id) const; 17 | 18 | protected: 19 | virtual NSString * failure_message_end() const; 20 | 21 | private: 22 | const char *expectedProtocolName_; 23 | }; 24 | }}} 25 | 26 | #pragma mark - public interface 27 | namespace Cedar { namespace Matchers { 28 | using CedarConformTo = Cedar::Matchers::Private::ConformTo; 29 | inline CedarConformTo conform_to(Protocol *protocol) { 30 | return CedarConformTo(protocol); 31 | } 32 | 33 | inline CedarConformTo conform_to(const char *protocolName) { 34 | return CedarConformTo(protocolName); 35 | } 36 | }} 37 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Headers/Exist.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Base.h" 3 | 4 | #pragma mark - private interface 5 | namespace Cedar { namespace Matchers { namespace Private { 6 | class Exist : public Base<> { 7 | public: 8 | virtual NSString * failure_message_end() const { 9 | return @"exist on the local filesystem"; 10 | } 11 | 12 | template 13 | bool matches(T * const &) const; 14 | 15 | bool matches(NSString * const path) const { 16 | return [[NSFileManager defaultManager] fileExistsAtPath:path]; 17 | } 18 | 19 | bool matches(NSURL * const URL) const { 20 | return matches([URL path]); 21 | } 22 | }; 23 | }}} 24 | 25 | #pragma mark - public interface 26 | namespace Cedar { namespace Matchers { 27 | using CedarExist = Cedar::Matchers::Private::Exist; 28 | static const CedarExist exist = CedarExist(); 29 | }} 30 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Headers/InvocationMatcher.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "ValueArgument.h" 3 | 4 | namespace Cedar { namespace Doubles { 5 | 6 | class InvocationMatcher { 7 | public: 8 | typedef std::vector arguments_vector_t; 9 | enum { OBJC_DEFAULT_ARGUMENT_COUNT = 2 }; 10 | 11 | public: 12 | InvocationMatcher(const SEL); 13 | virtual ~InvocationMatcher() {} 14 | 15 | void add_argument(const Argument::shared_ptr_t argument); 16 | template 17 | void add_argument(const T &); 18 | 19 | bool matches(NSInvocation * const) const; 20 | NSString *mismatch_reason(); 21 | 22 | const SEL selector() const { return expectedSelector_; } 23 | const arguments_vector_t & arguments() const { return arguments_; } 24 | const bool match_any_arguments() const { return arguments_.empty(); } 25 | void verify_count_and_types_of_arguments(id instance) const; 26 | 27 | private: 28 | bool matches_arguments(NSInvocation * const) const; 29 | NSMethodSignature *method_signature_for_instance(id instance) const; 30 | void compare_argument_count_to_method_signature(NSMethodSignature * const methodSignature) const; 31 | void compare_argument_types_to_method_signature(NSMethodSignature * const methodSignature) const; 32 | 33 | private: 34 | const SEL expectedSelector_; 35 | arguments_vector_t arguments_; 36 | }; 37 | 38 | template 39 | void InvocationMatcher::add_argument(const T & value) { 40 | this->add_argument(Argument::shared_ptr_t(new ValueArgument(value))); 41 | } 42 | 43 | }} 44 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Headers/NSInvocation+Cedar.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface NSInvocation (Cedar) 4 | 5 | - (void)copyBlockArguments; 6 | - (NSInvocation *)invocationWithoutCmdArgument; 7 | - (void)invokeUsingBlockWithoutSelfArgument:(id)block; 8 | 9 | - (NSArray *)arguments; 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Headers/NSMethodSignature+Cedar.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface NSMethodSignature (Cedar) 4 | 5 | + (NSMethodSignature *)signatureFromBlock:(id)block; 6 | - (NSMethodSignature *)signatureWithoutSelectorArgument; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Headers/RaiseException.h: -------------------------------------------------------------------------------- 1 | #import "Base.h" 2 | #import 3 | 4 | #pragma mark - private interface 5 | namespace Cedar { namespace Matchers { namespace Private { 6 | 7 | typedef void (^empty_block_t)(); 8 | 9 | struct RaiseExceptionMessageBuilder { 10 | static NSString * string_for_actual_value(empty_block_t value) { 11 | return [value description]; 12 | } 13 | }; 14 | 15 | class RaiseException : public Base { 16 | private: 17 | RaiseException & operator=(const RaiseException &); 18 | 19 | public: 20 | explicit RaiseException(NSObject * = nil, Class = nil, bool = false, NSString * = nil, NSString * = nil); 21 | ~RaiseException(); 22 | // Allow default copy ctor. 23 | 24 | RaiseException operator()() const; 25 | RaiseException operator()(Class) const; 26 | RaiseException operator()(NSObject *) const; 27 | 28 | RaiseException & or_subclass(); 29 | 30 | RaiseException & with_reason(NSString * const reason); 31 | RaiseException with_reason(NSString * const reason) const; 32 | 33 | RaiseException & with_name(NSString * const name); 34 | RaiseException with_name(NSString * const name) const; 35 | 36 | bool matches(empty_block_t) const; 37 | 38 | protected: 39 | virtual NSString * failure_message_end() const; 40 | 41 | private: 42 | bool exception_matches_expected_class(NSObject * const exception) const; 43 | bool exception_matches_expected_instance(NSObject * const exception) const; 44 | bool exception_matches_expected_reason(NSObject * const exception) const; 45 | bool exception_matches_expected_name(NSObject * const exception) const; 46 | 47 | private: 48 | const NSObject *expectedExceptionInstance_; 49 | const Class expectedExceptionClass_; 50 | bool allowSubclasses_; 51 | NSString *expectedReason_; 52 | NSString *expectedName_; 53 | }; 54 | }}} 55 | 56 | #pragma mark - public interface 57 | namespace Cedar { namespace Matchers { 58 | using CedarRaiseException = Cedar::Matchers::Private::RaiseException; 59 | static const CedarRaiseException raise_exception; 60 | }} 61 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Headers/RejectedMethod.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import 4 | #import "InvocationMatcher.h" 5 | #import "Argument.h" 6 | #import "ReturnValue.h" 7 | 8 | namespace Cedar { namespace Doubles { 9 | 10 | class RejectedMethod : private InvocationMatcher { 11 | 12 | private: 13 | RejectedMethod & operator=(const RejectedMethod &); 14 | 15 | public: 16 | RejectedMethod(SEL); 17 | RejectedMethod(const char *); 18 | 19 | const SEL selector() const; 20 | }; 21 | }} 22 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Headers/RespondTo.h: -------------------------------------------------------------------------------- 1 | #import "Base.h" 2 | 3 | #pragma mark - private interface 4 | namespace Cedar { namespace Matchers { namespace Private { 5 | 6 | class RespondTo : public Base<> { 7 | private: 8 | RespondTo & operator=(const RespondTo &); 9 | 10 | public: 11 | explicit RespondTo(const char *); 12 | RespondTo(SEL selector); 13 | ~RespondTo(); 14 | // Allow default copy ctor. 15 | 16 | bool matches(const id) const; 17 | 18 | protected: 19 | virtual NSString * failure_message_end() const; 20 | 21 | private: 22 | const char *expectedSelectorName_; 23 | }; 24 | }}} 25 | 26 | #pragma mark - public interface 27 | namespace Cedar { namespace Matchers { 28 | using CedarRespondTo = Cedar::Matchers::Private::RespondTo; 29 | 30 | inline CedarRespondTo respond_to(const SEL selector) { 31 | return CedarRespondTo(selector); 32 | } 33 | 34 | inline CedarRespondTo respond_to(const char *selectorName) { 35 | return CedarRespondTo(selectorName); 36 | } 37 | }} 38 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/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 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Headers/StringifiersBase.h: -------------------------------------------------------------------------------- 1 | #import 2 | #include 3 | 4 | namespace Cedar { namespace Matchers { namespace Stringifiers { 5 | NSString * object_description_for(const void *objectValue); 6 | 7 | template 8 | NSString * string_for(const U & value) { 9 | if (0 == strncmp(@encode(U), "@", 1)) { 10 | return object_description_for(&value); 11 | } else { 12 | std::stringstream temp; 13 | temp << value; 14 | return [NSString stringWithCString:temp.str().c_str() encoding:NSUTF8StringEncoding]; 15 | } 16 | } 17 | 18 | inline NSString * string_for(std::nullptr_t value) { 19 | return @"nil"; 20 | } 21 | 22 | inline NSString * string_for(const char value) { 23 | return string_for(static_cast(value)); 24 | } 25 | 26 | inline NSString * string_for(const Class & value) { 27 | return NSStringFromClass(value); 28 | } 29 | 30 | inline NSString * string_for(const BOOL value) { 31 | return value ? @"YES" : @"NO"; 32 | } 33 | 34 | inline NSString * string_for(NSNumber * const value) { 35 | if (!value) { 36 | return [NSString stringWithFormat:@"%@", value]; 37 | } 38 | 39 | return string_for([value floatValue]); 40 | } 41 | 42 | inline NSString * string_for(const NSDecimal value) { 43 | return NSDecimalString(&value, [NSLocale systemLocale]); 44 | } 45 | 46 | inline NSString * string_for(char *value) { 47 | if (value == NULL) { 48 | return @"NULL"; 49 | } 50 | return [NSString stringWithFormat:@"cstring(%s)", value]; 51 | } 52 | 53 | inline NSString * string_for(const char *value) { 54 | return string_for((char *)value); 55 | } 56 | 57 | inline NSString * string_for(NSRange value) { 58 | return NSStringFromRange(value); 59 | } 60 | 61 | inline NSString * string_for(NSDate *date) { 62 | return [NSString stringWithFormat:@"%@ (%f)", date, [date timeIntervalSince1970]]; 63 | } 64 | }}} 65 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/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 | 16 | NSString * string = string_for(*it); 17 | [result appendString:[NSString stringWithFormat:@"\n %@", string]]; 18 | } 19 | return result; 20 | } 21 | } 22 | 23 | template 24 | NSString * string_for(const typename std::vector & container) { 25 | NSString * delimitedList = comma_and_newline_delimited_list(container); 26 | return [NSString stringWithFormat:@"(%@\n)", delimitedList]; 27 | } 28 | 29 | template 30 | NSString * string_for(const typename std::map & container) { 31 | NSMutableString *result = [NSMutableString stringWithString:@"{"]; 32 | 33 | for (typename std::map::const_iterator it = container.begin(); it != container.end(); ++it) { 34 | NSString * keyString = string_for(it->first); 35 | NSString * valueString = string_for(it->second); 36 | [result appendString:[NSString stringWithFormat:@"\n %@ = %@;", keyString, valueString]]; 37 | } 38 | [result appendString:@"\n}"]; 39 | return result; 40 | } 41 | 42 | template 43 | NSString * string_for(const typename std::set & container) { 44 | NSString * delimitedList = comma_and_newline_delimited_list(container); 45 | return [NSString stringWithFormat:@"{(%@\n)}", delimitedList]; 46 | } 47 | }}} 48 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Headers/UIGeometryCompareEqual.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | #import "ComparatorsBase.h" 5 | #import "UIGeometryStringifiers.h" 6 | 7 | namespace Cedar { namespace Matchers { namespace Comparators { 8 | template 9 | bool compare_equal(CGRect const actualValue, const U & expectedValue) { 10 | return CGRectEqualToRect(actualValue, expectedValue); 11 | } 12 | 13 | template 14 | bool compare_equal(CGSize const actualValue, const U & expectedValue) { 15 | return CGSizeEqualToSize(actualValue, expectedValue); 16 | } 17 | 18 | template 19 | bool compare_equal(CGPoint const actualValue, const U & expectedValue) { 20 | return CGPointEqualToPoint(actualValue, expectedValue); 21 | } 22 | 23 | template 24 | bool compare_equal(UIEdgeInsets const actualValue, const U & expectedValue) { 25 | return UIEdgeInsetsEqualToEdgeInsets(actualValue, expectedValue); 26 | } 27 | 28 | template 29 | bool compare_equal(CGAffineTransform const actualValue, const U & expectedValue) { 30 | return CGAffineTransformEqualToTransform(actualValue, expectedValue); 31 | } 32 | 33 | template 34 | bool compare_equal(UIImage *actualImage, const U & expectedImage) { 35 | return [expectedImage isEqual:actualImage] || [UIImagePNGRepresentation(expectedImage) isEqual:UIImagePNGRepresentation(actualImage)]; 36 | } 37 | }}} 38 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Headers/UIGeometryStringifiers.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "StringifiersBase.h" 3 | 4 | namespace Cedar { namespace Matchers { namespace Stringifiers { 5 | inline NSString * string_for(const CGRect value) { 6 | return NSStringFromCGRect(value); 7 | } 8 | 9 | inline NSString * string_for(const CGSize value) { 10 | return NSStringFromCGSize(value); 11 | } 12 | 13 | inline NSString * string_for(const CGPoint value) { 14 | return NSStringFromCGPoint(value); 15 | } 16 | 17 | inline NSString * string_for(const UIEdgeInsets value) { 18 | return NSStringFromUIEdgeInsets(value); 19 | } 20 | 21 | inline NSString * string_for(const CGAffineTransform value) { 22 | return NSStringFromCGAffineTransform(value); 23 | } 24 | }}} 25 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Headers/UIKitComparatorsContainer.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | namespace Cedar { namespace Matchers { namespace Comparators { 5 | template 6 | bool compare_contains(UIView * const container, const U & element, contains_options options, F comparator) { 7 | return compare_contains(container, element, @"subviews", options, comparator); 8 | } 9 | 10 | template 11 | bool compare_contains(CALayer * const container, const U & element, contains_options options, F comparator) { 12 | return compare_contains(container, element, @"sublayers", options, comparator); 13 | } 14 | }}} 15 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CDRBuildVersionSHA 6 | 1d27d43597d7b65ac0dba7b1ffb82c45a5672412 7 | CFBundleDevelopmentRegion 8 | English 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | io.pivotal.$(PRODUCT_NAME:rfc1034identifier) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 0.11.2 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/A/Cedar-iOS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rbobbins/animation-demo/53060507efaf9ec4c84f5abb105213e6a978cdb4/Specs/Frameworks/Cedar-iOS.framework/Versions/A/Cedar-iOS -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/AnyArgument.h: -------------------------------------------------------------------------------- 1 | #import "Argument.h" 2 | 3 | namespace Cedar { namespace Doubles { 4 | 5 | class AnyArgument : public Argument { 6 | private: 7 | AnyArgument & operator=(const AnyArgument &); 8 | 9 | public: 10 | AnyArgument() {}; 11 | virtual ~AnyArgument() {}; 12 | // Allow default copy ctor. 13 | 14 | virtual const char * const value_encoding() const { return ""; }; 15 | virtual void * value_bytes() const { return NULL; }; 16 | virtual NSString * value_string() const { return @"anything"; }; 17 | 18 | virtual bool matches_encoding(const char *) const { return true; } 19 | virtual bool matches_bytes(void *) const { return true; } 20 | virtual unsigned int specificity_ranking() const { return 0; } 21 | }; 22 | 23 | namespace Arguments { 24 | extern const Argument::shared_ptr_t anything; 25 | } 26 | 27 | }} 28 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/AnyInstanceArgument.h: -------------------------------------------------------------------------------- 1 | #import "Argument.h" 2 | 3 | namespace Cedar { namespace Doubles { 4 | 5 | class AnyInstanceArgument : public Argument { 6 | public: 7 | virtual ~AnyInstanceArgument() = 0; 8 | 9 | virtual const char * const value_encoding() const; 10 | virtual void * value_bytes() const { return NULL; } 11 | virtual NSString * value_string() const = 0; 12 | 13 | virtual bool matches_encoding(const char *) const; 14 | virtual bool matches_bytes(void *) const = 0; 15 | virtual unsigned int specificity_ranking() const { return 1; } 16 | }; 17 | }} 18 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/AnyInstanceConformingToProtocolArgument.h: -------------------------------------------------------------------------------- 1 | #import "AnyInstanceArgument.h" 2 | 3 | namespace Cedar { namespace Doubles { 4 | 5 | class AnyInstanceConformingToProtocolArgument : public AnyInstanceArgument { 6 | private: 7 | AnyInstanceConformingToProtocolArgument & operator=(const AnyInstanceConformingToProtocolArgument &); 8 | 9 | public: 10 | explicit AnyInstanceConformingToProtocolArgument(Protocol *); 11 | virtual ~AnyInstanceConformingToProtocolArgument(); 12 | // Allow default copy ctor. 13 | 14 | virtual NSString * value_string() const; 15 | virtual bool matches_bytes(void *) const; 16 | virtual bool matches(const Argument &) const; 17 | private: 18 | Protocol *protocol_; 19 | }; 20 | 21 | namespace Arguments { 22 | Argument::shared_ptr_t any(Protocol *); 23 | } 24 | }} 25 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/AnyInstanceOfClassArgument.h: -------------------------------------------------------------------------------- 1 | #import "AnyInstanceArgument.h" 2 | 3 | namespace Cedar { namespace Doubles { 4 | 5 | class AnyInstanceOfClassArgument : public AnyInstanceArgument { 6 | private: 7 | AnyInstanceOfClassArgument & operator=(const AnyInstanceOfClassArgument &); 8 | 9 | public: 10 | explicit AnyInstanceOfClassArgument(const Class); 11 | virtual ~AnyInstanceOfClassArgument(); 12 | // Allow default copy ctor. 13 | 14 | virtual NSString * value_string() const; 15 | virtual bool matches_bytes(void *) const; 16 | virtual bool matches(const Argument &) const; 17 | private: 18 | const Class class_; 19 | }; 20 | 21 | namespace Arguments { 22 | Argument::shared_ptr_t any(Class); 23 | } 24 | }} 25 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/Argument.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import 4 | 5 | namespace Cedar { namespace Doubles { 6 | 7 | #pragma mark - Argument 8 | class Argument { 9 | public: 10 | virtual ~Argument() = 0; 11 | 12 | virtual const char * const value_encoding() const = 0; 13 | virtual void * value_bytes() const = 0; 14 | virtual NSString * value_string() const = 0; 15 | 16 | virtual bool matches_encoding(const char *) const = 0; 17 | virtual bool matches_bytes(void *) const = 0; 18 | virtual unsigned int specificity_ranking() const = 0; 19 | 20 | typedef std::shared_ptr shared_ptr_t; 21 | virtual bool matches(const Argument &other_argument) const { 22 | return ((this->matches_encoding(other_argument.value_encoding()) && this->matches_bytes(other_argument.value_bytes())) || 23 | (other_argument.matches_encoding(this->value_encoding()) && other_argument.matches_bytes(this->value_bytes()))); 24 | } 25 | 26 | bool operator==(const Argument &other_argument) const { 27 | return typeid(*this) == typeid(other_argument) && this->matches(other_argument); 28 | } 29 | 30 | bool operator!=(const Argument &other_argument) const { 31 | return !(*this == other_argument); 32 | } 33 | }; 34 | 35 | inline /* virtual */ Argument::~Argument() {} 36 | 37 | }} 38 | -------------------------------------------------------------------------------- /Specs/Frameworks/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 | NSString * failureMessageEnd = this->failure_message_end(); 45 | NSString * actualValueString = MessageBuilder_::string_for_actual_value(value); 46 | return [NSString stringWithFormat:@"Expected <%@> to %@", actualValueString, failureMessageEnd]; 47 | } 48 | 49 | template template 50 | NSString * Base::negative_failure_message_for(const U & value) const { 51 | NSString * failureMessageEnd = this->failure_message_end(); 52 | NSString * actualValueString = MessageBuilder_::string_for_actual_value(value); 53 | return [NSString stringWithFormat:@"Expected <%@> to not %@", actualValueString, failureMessageEnd]; 54 | } 55 | }} 56 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/BeEmpty.h: -------------------------------------------------------------------------------- 1 | #import "Base.h" 2 | 3 | #pragma mark - private interface 4 | namespace Cedar { namespace Matchers { namespace Private { 5 | class BeEmpty : public Base<> { 6 | private: 7 | BeEmpty & operator=(const BeEmpty &); 8 | 9 | public: 10 | inline BeEmpty() : Base<>() {} 11 | inline ~BeEmpty() {} 12 | // Allow default copy ctor. 13 | 14 | inline const BeEmpty & 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 @"be empty"; } 21 | }; 22 | 23 | #pragma mark Generic 24 | template 25 | bool BeEmpty::matches(const U & actualValue) const { 26 | return Comparators::compare_empty(actualValue); 27 | } 28 | }}} 29 | 30 | #pragma mark - public interface 31 | namespace Cedar { namespace Matchers { 32 | using CedarBeEmpty = Cedar::Matchers::Private::BeEmpty; 33 | static const CedarBeEmpty be_empty = CedarBeEmpty(); 34 | }} 35 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/BeFalsy.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Base.h" 3 | 4 | #pragma mark - private interface 5 | namespace Cedar { namespace Matchers { namespace Private { 6 | class BeFalsy : public Base<> { 7 | private: 8 | BeFalsy & operator=(const BeFalsy &); 9 | 10 | public: 11 | inline BeFalsy() : Base<>() {} 12 | inline ~BeFalsy() {} 13 | // Allow default copy ctor. 14 | 15 | inline const BeFalsy & operator()() const { return *this; } 16 | 17 | template 18 | bool matches(const U &) const; 19 | 20 | protected: 21 | inline /*virtual*/ NSString * failure_message_end() const { return @"evaluate to false"; } 22 | }; 23 | 24 | static const BeFalsy be_falsy = BeFalsy(); 25 | 26 | #pragma mark Generic 27 | template 28 | bool BeFalsy::matches(const U & actualValue) const { 29 | return !actualValue; 30 | } 31 | 32 | }}} 33 | 34 | #pragma mark - public interface 35 | namespace Cedar { namespace Matchers { 36 | using CedarBeFalsy = Cedar::Matchers::Private::BeFalsy; 37 | static const CedarBeFalsy be_falsy = CedarBeFalsy(); 38 | }} 39 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/BeGreaterThan.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Base.h" 3 | 4 | namespace Cedar { namespace Matchers { namespace Private { 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::BeGreaterThan(const T & expectedValue) 28 | : Base<>(), expectedValue_(expectedValue) { 29 | } 30 | 31 | template 32 | BeGreaterThan::~BeGreaterThan() { 33 | } 34 | 35 | template 36 | /*virtual*/ NSString * BeGreaterThan::failure_message_end() const { 37 | NSString * expectedValueString = Stringifiers::string_for(expectedValue_); 38 | return [NSString stringWithFormat:@"be greater than <%@>", expectedValueString]; 39 | } 40 | 41 | template template 42 | bool BeGreaterThan::matches(const U & actualValue) const { 43 | return Comparators::compare_greater_than(actualValue, expectedValue_); 44 | } 45 | }}} 46 | 47 | #pragma mark - public interface 48 | namespace Cedar { namespace Matchers { 49 | template 50 | using CedarBeGreaterThan = Cedar::Matchers::Private::BeGreaterThan; 51 | 52 | template 53 | CedarBeGreaterThan be_greater_than(const T & expectedValue) { 54 | return CedarBeGreaterThan(expectedValue); 55 | } 56 | 57 | #pragma mark operators 58 | template 59 | bool operator>(const ActualValue & actualValue, const U & expectedValue) { 60 | return actualValue.to > expectedValue; 61 | } 62 | 63 | template 64 | bool operator>(const ActualValueMatchProxy & actualValueMatchProxy, const U & expectedValue) { 65 | actualValueMatchProxy(be_greater_than(expectedValue)); 66 | return true; 67 | } 68 | }} 69 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/BeLTE.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Base.h" 3 | 4 | #pragma mark - private interface 5 | namespace Cedar { namespace Matchers { namespace Private { 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::BeLTE(const T & expectedValue) 28 | : Base<>(), expectedValue_(expectedValue) { 29 | } 30 | 31 | template 32 | BeLTE::~BeLTE() { 33 | } 34 | 35 | template 36 | /*virtual*/ NSString * BeLTE::failure_message_end() const { 37 | NSString * expectedValueString = Stringifiers::string_for(expectedValue_); 38 | return [NSString stringWithFormat:@"be less than or equal to <%@>", expectedValueString]; 39 | } 40 | 41 | template template 42 | bool BeLTE::matches(const U & actualValue) const { 43 | return !Comparators::compare_greater_than(actualValue, expectedValue_); 44 | } 45 | }}} 46 | 47 | #pragma mark - public interface 48 | namespace Cedar { namespace Matchers { 49 | template 50 | using CedarBeLTE = Cedar::Matchers::Private::BeLTE; 51 | 52 | template 53 | CedarBeLTE be_lte(const T & expectedValue) { 54 | return CedarBeLTE(expectedValue); 55 | } 56 | 57 | template 58 | CedarBeLTE be_less_than_or_equal_to(const T & expectedValue) { 59 | return be_lte(expectedValue); 60 | } 61 | 62 | #pragma mark operators 63 | template 64 | bool operator<=(const ActualValue & actualValue, const U & expectedValue) { 65 | return actualValue.to <= expectedValue; 66 | } 67 | 68 | template 69 | bool operator<=(const ActualValueMatchProxy & actualValueMatchProxy, const U & expectedValue) { 70 | actualValueMatchProxy(be_lte(expectedValue)); 71 | return true; 72 | } 73 | }} 74 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/BeLessThan.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Base.h" 3 | 4 | #pragma mark - private interface 5 | namespace Cedar { namespace Matchers { namespace Private { 6 | 7 | template 8 | class BeLessThan : public Base<> { 9 | private: 10 | BeLessThan & operator=(const BeLessThan &); 11 | 12 | public: 13 | explicit BeLessThan(const T & expectedValue); 14 | ~BeLessThan(); 15 | // Allow default copy ctor. 16 | 17 | template 18 | bool matches(const U &) const; 19 | 20 | protected: 21 | virtual NSString * failure_message_end() const; 22 | 23 | private: 24 | const T & expectedValue_; 25 | }; 26 | 27 | template 28 | BeLessThan::BeLessThan(const T & expectedValue) 29 | : Base<>(), expectedValue_(expectedValue) { 30 | } 31 | 32 | template 33 | BeLessThan::~BeLessThan() { 34 | } 35 | 36 | template 37 | /*virtual*/ NSString * BeLessThan::failure_message_end() const { 38 | NSString * expectedValueString = Stringifiers::string_for(expectedValue_); 39 | return [NSString stringWithFormat:@"be less than <%@>", expectedValueString]; 40 | } 41 | 42 | template template 43 | bool BeLessThan::matches(const U & actualValue) const { 44 | return !Comparators::compare_greater_than(actualValue, expectedValue_) && !Comparators::compare_equal(actualValue, expectedValue_); 45 | } 46 | 47 | }}} 48 | 49 | #pragma mark - public interface 50 | namespace Cedar { namespace Matchers { 51 | template 52 | using CedarBeLessThan = Cedar::Matchers::Private::BeLessThan; 53 | 54 | template 55 | CedarBeLessThan be_less_than(const T & expectedValue) { 56 | return CedarBeLessThan(expectedValue); 57 | } 58 | 59 | #pragma mark operators 60 | template 61 | bool operator<(const ActualValue & actualValue, const U & expectedValue) { 62 | return actualValue.to < expectedValue; 63 | } 64 | 65 | template 66 | bool operator<(const ActualValueMatchProxy & actualValueMatchProxy, const U & expectedValue) { 67 | actualValueMatchProxy(be_less_than(expectedValue)); 68 | return true; 69 | } 70 | }} 71 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/BeTruthy.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Base.h" 3 | 4 | #pragma mark - private interface 5 | namespace Cedar { namespace Matchers { namespace Private { 6 | class BeTruthy : public Base<> { 7 | private: 8 | BeTruthy & operator=(const BeTruthy &); 9 | 10 | public: 11 | inline BeTruthy() : Base<>() {} 12 | inline ~BeTruthy() {} 13 | // Allow default copy ctor. 14 | 15 | inline const BeTruthy & operator()() const { return *this; } 16 | 17 | template 18 | bool matches(const U &) const; 19 | 20 | protected: 21 | inline /*virtual*/ NSString * failure_message_end() const { return @"evaluate to true"; } 22 | }; 23 | 24 | static const BeTruthy be_truthy = BeTruthy(); 25 | 26 | #pragma mark Generic 27 | template 28 | bool BeTruthy::matches(const U & actualValue) const { 29 | return !!actualValue; 30 | } 31 | }}} 32 | 33 | #pragma mark - public interface 34 | namespace Cedar { namespace Matchers { 35 | using CedarBeTruthy = Cedar::Matchers::Private::BeTruthy; 36 | static const CedarBeTruthy be_truthy = CedarBeTruthy(); 37 | }} 38 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/CDRClassFake.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CDRFake.h" 3 | #import "CedarDouble.h" 4 | 5 | @interface CDRClassFake : CDRFake 6 | 7 | @end 8 | 9 | id CDR_fake_for(BOOL require_explicit_stubs, Class klass, ...); 10 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/CDRColorizedReporter.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CDRDefaultReporter.h" 3 | 4 | @interface CDRColorizedReporter : CDRDefaultReporter 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/CDRExample.h: -------------------------------------------------------------------------------- 1 | #import "CDRExampleBase.h" 2 | #import "CDRSpecFailure.h" 3 | 4 | @interface CDRExample : CDRExampleBase { 5 | CDRSpecBlock block_; 6 | CDRExampleState state_; 7 | CDRSpecFailure *failure_; 8 | } 9 | 10 | @property (nonatomic, retain) CDRSpecFailure *failure; 11 | 12 | + (id)exampleWithText:(NSString *)text andBlock:(CDRSpecBlock)block; 13 | - (id)initWithText:(NSString *)text andBlock:(CDRSpecBlock)block; 14 | - (BOOL)isPending; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/CDRExampleBase.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CDRExampleParent.h" 3 | 4 | @class CDRSpec, CDRReportDispatcher; 5 | typedef NS_ENUM(NSInteger, CDRExampleState) { 6 | CDRExampleStateIncomplete = 0x00, 7 | CDRExampleStateSkipped = 0x01, 8 | CDRExampleStatePassed = 0x03, 9 | CDRExampleStatePending = 0x07, 10 | CDRExampleStateFailed = 0x0F, 11 | CDRExampleStateError = 0x1F 12 | }; 13 | 14 | @interface CDRExampleBase : NSObject { 15 | NSString *text_; 16 | NSObject *parent_; 17 | CDRSpec *spec_; 18 | BOOL focused_; 19 | NSUInteger stackAddress_; 20 | NSDate *startDate_; 21 | NSDate *endDate_; 22 | } 23 | 24 | @property (nonatomic, readonly) NSString *text; 25 | @property (nonatomic, assign) NSObject *parent; 26 | @property (nonatomic, assign) CDRSpec *spec; 27 | @property (nonatomic, assign, getter=isFocused) BOOL focused; 28 | @property (nonatomic) NSUInteger stackAddress; 29 | @property (nonatomic, readonly) NSDate *startDate; 30 | @property (nonatomic, readonly) NSDate *endDate; 31 | 32 | - (id)initWithText:(NSString *)text; 33 | 34 | 35 | - (void)runWithDispatcher:(CDRReportDispatcher *)dispatcher; 36 | - (BOOL)shouldRun; 37 | 38 | - (BOOL)hasChildren; 39 | - (BOOL)hasFocusedExamples; 40 | 41 | - (NSString *)message; 42 | - (NSString *)fullText; 43 | - (NSMutableArray *)fullTextInPieces; 44 | 45 | - (NSTimeInterval)runTime; 46 | - (CDRExampleState)state; 47 | @end 48 | 49 | @interface CDRExampleBase (RunReporting) 50 | - (float)progress; 51 | @end 52 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/CDRExampleGroup.h: -------------------------------------------------------------------------------- 1 | #import "CDRExampleBase.h" 2 | 3 | @interface CDRExampleGroup : CDRExampleBase { 4 | NSMutableArray *beforeBlocks_, *examples_, *afterBlocks_; 5 | BOOL isRoot_; 6 | CDRSpecBlock subjectActionBlock_; 7 | } 8 | 9 | @property (nonatomic, copy) CDRSpecBlock subjectActionBlock; 10 | @property (nonatomic, readonly) NSArray *examples; 11 | 12 | + (id)groupWithText:(NSString *)text; 13 | 14 | - (id)initWithText:(NSString *)text isRoot:(BOOL)isRoot; 15 | - (void)add:(CDRExampleBase *)example; 16 | - (void)addBefore:(CDRSpecBlock)block; 17 | - (void)addAfter:(CDRSpecBlock)block; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/CDRExampleParent.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | typedef void (^CDRSpecBlock)(void); 4 | 5 | @protocol CDRExampleParent 6 | 7 | - (BOOL)shouldRun; 8 | 9 | - (void)setUp; 10 | - (CDRSpecBlock)subjectActionBlock; 11 | - (void)tearDown; 12 | 13 | @optional 14 | - (BOOL)hasFullText; 15 | - (NSString *)fullText; 16 | - (NSMutableArray *)fullTextInPieces; 17 | 18 | - (NSUInteger)stackAddress; 19 | @end 20 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/CDRExampleReporter.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class CDRExample, CDRExampleGroup, CDRSpec; 4 | 5 | @protocol CDRExampleReporter 6 | 7 | - (void)runWillStartWithGroups:(NSArray *)groups andRandomSeed:(unsigned int)seed; 8 | - (void)runDidComplete; 9 | - (int)result; 10 | 11 | // new methods to use instead of KVO 12 | @required 13 | - (void)runWillStartExample:(CDRExample *)example; 14 | - (void)runDidFinishExample:(CDRExample *)example; 15 | 16 | - (void)runWillStartExampleGroup:(CDRExampleGroup *)exampleGroup; 17 | - (void)runDidFinishExampleGroup:(CDRExampleGroup *)exampleGroup; 18 | 19 | - (void)runWillStartSpec:(CDRSpec *)spec; 20 | - (void)runDidFinishSpec:(CDRSpec *)spec; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/CDRFake.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CedarDouble.h" 3 | 4 | @interface CDRFake : NSObject 5 | 6 | @property (nonatomic, assign) Class klass; 7 | @property (nonatomic, assign) BOOL requiresExplicitStubs; 8 | 9 | - (id)initWithClass:(Class)klass requireExplicitStubs:(BOOL)requireExplicitStubs; 10 | 11 | @end 12 | 13 | #ifndef CEDAR_DOUBLES_COMPATIBILITY_MODE 14 | #define fake_for(...) CDR_fake_for(YES, __VA_ARGS__, nil) 15 | #define nice_fake_for(...) CDR_fake_for(NO, __VA_ARGS__, nil) 16 | #endif 17 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/CDRFunctions.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NSArray *CDRReportersFromEnv(const char*defaultReporterClassName); 4 | 5 | int CDRRunSpecs(); 6 | OBJC_EXPORT void CDRInjectIntoXCTestRunner(); 7 | int CDRRunSpecsWithCustomExampleReporters(NSArray *reporters); 8 | NSArray *CDRShuffleItemsInArrayWithSeed(NSArray *sortedItems, unsigned int seed); 9 | NSArray *CDRReportersToRun(); 10 | NSString *CDRGetTestBundleExtension(); 11 | void CDRSuppressStandardPipesWhileLoadingClasses(); 12 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/CDRHooks.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @protocol CDRHooks 4 | 5 | @optional 6 | 7 | + (void)beforeEach; 8 | + (void)afterEach; 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/CDRProtocolFake.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CedarDouble.h" 3 | #import "CDRFake.h" 4 | 5 | #import 6 | #import 7 | 8 | @interface CDRProtocolFake : CDRFake 9 | 10 | - (id)initWithClass:(Class)klass forProtocols:(NSArray *)protocols requireExplicitStubs:(BOOL)requireExplicitStubs; 11 | 12 | @end 13 | 14 | id CDR_fake_for(BOOL require_explicit_stubs, Protocol *protocol, ...); 15 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/CDRSharedExampleGroupPool.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #define CDR_OVERLOADABLE __attribute__((overloadable)) 4 | 5 | @protocol CDRSharedExampleGroupPool 6 | @end 7 | 8 | typedef void (^CDRSharedExampleGroupBlock)(NSDictionary *); 9 | typedef void (^CDRSharedExampleContextProviderBlock)(NSMutableDictionary *); 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | void sharedExamplesFor(NSString *, CDRSharedExampleGroupBlock); 15 | CDR_OVERLOADABLE void itShouldBehaveLike(NSString *); 16 | CDR_OVERLOADABLE void itShouldBehaveLike(NSString *, CDRSharedExampleContextProviderBlock); 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | 21 | @interface CDRSharedExampleGroupPool : NSObject 22 | @end 23 | 24 | @interface CDRSharedExampleGroupPool (SharedExampleGroupDeclaration) 25 | - (void)declareSharedExampleGroups; 26 | @end 27 | 28 | #define SHARED_EXAMPLE_GROUPS_BEGIN(name) \ 29 | @interface SharedExampleGroupPoolFor##name : CDRSharedExampleGroupPool \ 30 | @end \ 31 | @implementation SharedExampleGroupPoolFor##name \ 32 | - (void)declareSharedExampleGroups { 33 | 34 | #define SHARED_EXAMPLE_GROUPS_END \ 35 | } \ 36 | @end 37 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/CDRSlowTestStatistics.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface CDRSlowTestStatistics : NSObject 4 | 5 | - (void)printStatsForExampleGroups:(NSArray *)groups; 6 | 7 | @end 8 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/CDRSpec.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CDRExampleBase.h" 3 | 4 | @protocol CDRExampleReporter; 5 | @class CDRExampleGroup, CDRExample, CDRSpecHelper, CDRSymbolicator; 6 | @class CDRReportDispatcher; 7 | 8 | @protocol CDRSpec 9 | @end 10 | 11 | extern const CDRSpecBlock PENDING; 12 | 13 | #ifdef __cplusplus 14 | extern "C" { 15 | #endif 16 | void beforeEach(CDRSpecBlock); 17 | void afterEach(CDRSpecBlock); 18 | 19 | CDRExampleGroup * describe(NSString *, CDRSpecBlock); 20 | extern CDRExampleGroup* (*context)(NSString *, CDRSpecBlock); 21 | 22 | CDRExample * it(NSString *, CDRSpecBlock); 23 | 24 | CDRExampleGroup * xdescribe(NSString *, CDRSpecBlock); 25 | extern CDRExampleGroup* (*xcontext)(NSString *, CDRSpecBlock); 26 | void subjectAction(CDRSpecBlock); 27 | CDRExample * xit(NSString *, CDRSpecBlock); 28 | 29 | CDRExampleGroup * fdescribe(NSString *, CDRSpecBlock); 30 | extern CDRExampleGroup* (*fcontext)(NSString *, CDRSpecBlock); 31 | CDRExample * fit(NSString *, CDRSpecBlock); 32 | 33 | void fail(NSString *); 34 | #ifdef __cplusplus 35 | } 36 | 37 | #import "ActualValue.h" 38 | #import "ShouldSyntax.h" 39 | #import "CedarComparators.h" 40 | #import "CedarMatchers.h" 41 | #import "CedarDoubles.h" 42 | 43 | #endif // __cplusplus 44 | 45 | @interface CDRSpec : NSObject { 46 | CDRExampleGroup *rootGroup_; 47 | CDRExampleGroup *currentGroup_; 48 | NSString *fileName_; 49 | CDRSymbolicator *symbolicator_; 50 | } 51 | 52 | @property (nonatomic, retain) CDRExampleGroup *currentGroup, *rootGroup; 53 | @property (nonatomic, retain) NSString *fileName; 54 | @property (nonatomic, retain) CDRSymbolicator *symbolicator; 55 | 56 | - (void)defineBehaviors; 57 | - (void)markAsFocusedClosestToLineNumber:(NSUInteger)lineNumber; 58 | - (NSArray *)allChildren; 59 | @end 60 | 61 | @interface CDRSpec (XCTestSupport) 62 | - (id)testSuiteWithRandomSeed:(unsigned int)seed dispatcher:(CDRReportDispatcher *)dispatcher; 63 | @end 64 | 65 | @interface CDRSpec (SpecDeclaration) 66 | - (void)declareBehaviors; 67 | @end 68 | 69 | #define SPEC_BEGIN(name) \ 70 | @interface name : CDRSpec \ 71 | @end \ 72 | @implementation name \ 73 | - (void)declareBehaviors { \ 74 | self.fileName = [NSString stringWithUTF8String:__FILE__]; 75 | 76 | #define SPEC_END \ 77 | } \ 78 | @end 79 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/CDRSpecFailure.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface CDRSpecFailure : NSException { 4 | NSString *fileName_; 5 | int lineNumber_; 6 | NSArray *callStackReturnAddresses_; 7 | } 8 | 9 | @property (nonatomic, retain, readonly) NSString *fileName; 10 | @property (nonatomic, assign, readonly) int lineNumber; 11 | @property (copy, readonly) NSArray *callStackReturnAddresses; 12 | 13 | + (id)specFailureWithReason:(NSString *)reason; 14 | + (id)specFailureWithReason:(NSString *)reason fileName:(NSString *)fileName lineNumber:(int)lineNumber; 15 | + (id)specFailureWithRaisedObject:(NSObject *)object; 16 | 17 | - (id)initWithReason:(NSString *)reason; 18 | - (id)initWithReason:(NSString *)reason fileName:(NSString *)fileName lineNumber:(int)lineNumber; 19 | - (id)initWithRaisedObject:(NSObject *)object; 20 | 21 | - (NSString *)callStackSymbolicatedSymbols:(NSError **)error; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/CDRSpecHelper.h: -------------------------------------------------------------------------------- 1 | #import "CDRSpec.h" 2 | #import "CDRHooks.h" 3 | #import "CDRSharedExampleGroupPool.h" 4 | #import "CDRExampleParent.h" 5 | 6 | @interface CDRSpecHelper : NSObject { 7 | NSMutableDictionary *sharedExampleContext_, *sharedExampleGroups_; 8 | NSArray *globalBeforeEachClasses_, *globalAfterEachClasses_; 9 | BOOL shouldOnlyRunFocused_; 10 | } 11 | 12 | @property (nonatomic, retain, readonly) NSMutableDictionary *sharedExampleContext; 13 | @property (nonatomic, retain) NSArray *globalBeforeEachClasses, *globalAfterEachClasses; 14 | 15 | @property (nonatomic, assign) BOOL shouldOnlyRunFocused; 16 | 17 | + (CDRSpecHelper *)specHelper; 18 | 19 | @end 20 | 21 | @compatibility_alias SpecHelper CDRSpecHelper; 22 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/CDRSpy.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CedarDouble.h" 3 | 4 | @interface CDRSpy : NSProxy 5 | 6 | + (void)interceptMessagesForInstance:(id)instance; 7 | + (void)stopInterceptingMessagesForInstance:(id)instance; 8 | 9 | @end 10 | 11 | namespace Cedar { namespace Doubles { 12 | inline void CDR_spy_on(id instance) { 13 | [CDRSpy interceptMessagesForInstance:instance]; 14 | } 15 | 16 | inline void CDR_stop_spying_on(id instance) { 17 | [CDRSpy stopInterceptingMessagesForInstance:instance]; 18 | } 19 | }} 20 | 21 | #ifndef CEDAR_DOUBLES_COMPATIBILITY_MODE 22 | #define spy_on(x) CDR_spy_on((x)) 23 | #define stop_spying_on(x) CDR_stop_spying_on((x)) 24 | #endif 25 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/CDRSpyInfo.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class CedarDoubleImpl; 4 | 5 | @interface CDRSpyInfo : NSObject 6 | 7 | @property (nonatomic, assign) Class publicClass; 8 | @property (nonatomic, assign) Class spiedClass; 9 | @property (nonatomic, retain) CedarDoubleImpl *cedarDouble; 10 | 11 | + (void)storeSpyInfoForObject:(id)object; 12 | + (BOOL)clearSpyInfoForObject:(id)object; 13 | 14 | + (CDRSpyInfo *)spyInfoForObject:(id)object; 15 | + (CedarDoubleImpl *)cedarDoubleForObject:(id)object; 16 | + (Class)publicClassForObject:(id)object; 17 | 18 | - (IMP)impForSelector:(SEL)selector; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/CDRSymbolicator.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NSUInteger CDRCallerStackAddress(); 4 | 5 | extern NSString *kCDRSymbolicatorErrorDomain; 6 | extern NSString *kCDRSymbolicatorErrorMessageKey; 7 | 8 | typedef enum { 9 | kCDRSymbolicatorErrorNotAvailable = 100, 10 | kCDRSymbolicatorErrorNotSuccessful, 11 | kCDRSymbolicatorErrorNoAddresses, 12 | } kCDRSymbolicatorError; 13 | 14 | @interface CDRSymbolicator : NSObject 15 | - (BOOL)symbolicateAddresses:(NSArray *)addresses error:(NSError **)error; 16 | - (NSString *)fileNameForStackAddress:(NSUInteger)address; 17 | - (NSUInteger)lineNumberForStackAddress:(NSUInteger)address; 18 | @end 19 | 20 | 21 | @interface CDRAtosTask : NSObject { 22 | NSString *executablePath_; 23 | long slide_; 24 | NSArray *addresses_; 25 | NSArray *outputLines_; 26 | } 27 | 28 | @property (retain, nonatomic) NSString *executablePath; 29 | @property (assign, nonatomic) long slide; 30 | @property (retain, nonatomic) NSArray *addresses; 31 | 32 | - (id)initWithExecutablePath:(NSString *)executablePath slide:(long)slide addresses:(NSArray *)addresses; 33 | - (void)launch; 34 | - (void)valuesOnLineNumber:(NSUInteger)line fileName:(NSString **)fileName lineNumber:(NSNumber **)lineNumber; 35 | @end 36 | 37 | @interface CDRAtosTask (CurrentTestExecutable) 38 | + (CDRAtosTask *)taskForCurrentTestExecutable; 39 | @end 40 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/CDRVersion.h: -------------------------------------------------------------------------------- 1 | NSString *CDRVersion = @"0.11.2"; 2 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/Cedar-iOS.h: -------------------------------------------------------------------------------- 1 | #import "Cedar.h" 2 | #import "CedarApplicationDelegate.h" 3 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/Cedar.h: -------------------------------------------------------------------------------- 1 | #import "CDRFunctions.h" 2 | #import "CDRSpecHelper.h" 3 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/CedarApplicationDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | // In some cases CDRIPhoneOTestRunner needs to spin up an instance of Cedar app. 4 | // It appears that SenTestingKit fails to start up the test when CedarApplicationDelegate 5 | // is used. Solution is to use a subclass of UIApplicaton. 6 | @interface CedarApplication : UIApplication 7 | @end 8 | 9 | // Needed for backwards compatibility with existing projects using CedarApplicationDelegate 10 | @interface CedarApplicationDelegate : NSObject 11 | @end 12 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/CedarComparators.h: -------------------------------------------------------------------------------- 1 | #import "ComparatorsBase.h" 2 | #import "ComparatorsContainer.h" 3 | 4 | #if TARGET_OS_IPHONE 5 | #import "UIKitComparatorsContainer.h" 6 | #endif 7 | 8 | #import "ComparatorsContainerConvenience.h" 9 | 10 | #ifdef CEDAR_CUSTOM_COMPARATORS 11 | #import CEDAR_CUSTOM_COMPARATORS 12 | #endif 13 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/CedarDouble.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | namespace Cedar { namespace Doubles { 4 | class StubbedMethod; 5 | class RejectedMethod; 6 | }} 7 | 8 | @protocol CedarDouble 9 | 10 | - (Cedar::Doubles::StubbedMethod &)add_stub:(const Cedar::Doubles::StubbedMethod &)stubbed_method; 11 | - (void)reject_method:(const Cedar::Doubles::RejectedMethod &)rejected_method; 12 | 13 | - (NSArray *)sent_messages; 14 | - (void)reset_sent_messages; 15 | 16 | - (BOOL)can_stub:(SEL)selector; 17 | - (BOOL)has_stubbed_method_for:(SEL)selector; 18 | - (BOOL)has_rejected_method_for:(SEL)selector; 19 | 20 | @end 21 | 22 | namespace Cedar { namespace Doubles { 23 | 24 | struct MethodStubbingMarker { 25 | const char *fileName; 26 | int lineNumber; 27 | }; 28 | 29 | id operator,(id, const MethodStubbingMarker &); 30 | 31 | void operator,(id, const StubbedMethod &); 32 | void operator,(id, const RejectedMethod &); 33 | }} 34 | 35 | #ifndef CEDAR_MATCHERS_DISALLOW_STUB_METHOD 36 | #define stub_method(x) ,(Cedar::Doubles::MethodStubbingMarker){__FILE__, __LINE__},Cedar::Doubles::StubbedMethod((x)) 37 | #define reject_method(x) ,(Cedar::Doubles::MethodStubbingMarker){__FILE__, __LINE__},Cedar::Doubles::RejectedMethod((x)) 38 | #endif 39 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/CedarDoubleImpl.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CedarDouble.h" 3 | #import "StubbedMethod.h" 4 | #import "RejectedMethod.h" 5 | 6 | typedef enum { 7 | CDRStubMethodNotStubbed = 0, 8 | CDRStubMethodInvoked, 9 | CDRStubWrongArguments, 10 | } CDRStubInvokeStatus; 11 | 12 | @interface CedarDoubleImpl : NSObject 13 | 14 | + (void)afterEach; 15 | 16 | - (id)initWithDouble:(NSObject *)parent_double; 17 | 18 | - (CDRStubInvokeStatus)invoke_stubbed_method:(NSInvocation *)invocation; 19 | - (void)record_method_invocation:(NSInvocation *)invocation; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/CedarDoubles.h: -------------------------------------------------------------------------------- 1 | #import "CDRSpy.h" 2 | #import "CDRFake.h" 3 | #import "CDRClassFake.h" 4 | #import "CDRProtocolFake.h" 5 | #import "HaveReceived.h" 6 | #import "StubbedMethod.h" 7 | #import "RejectedMethod.h" 8 | 9 | #import "Argument.h" 10 | #import "AnyArgument.h" 11 | #import "ValueArgument.h" 12 | #import "AnyInstanceOfClassArgument.h" 13 | #import "AnyInstanceConformingToProtocolArgument.h" 14 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/CedarMatchers.h: -------------------------------------------------------------------------------- 1 | // Base 2 | #import "Equal.h" 3 | #import "BeTruthy.h" 4 | #import "BeFalsy.h" 5 | #import "BeNil.h" 6 | #import "BeCloseTo.h" 7 | #import "BeSameInstanceAs.h" 8 | #import "BeInstanceOf.h" 9 | #import "BeGreaterThan.h" 10 | #import "BeGTE.h" 11 | #import "BeLessThan.h" 12 | #import "BeLTE.h" 13 | #import "RaiseException.h" 14 | #import "RespondTo.h" 15 | #import "ConformTo.h" 16 | 17 | // Container 18 | #import "BeEmpty.h" 19 | #import "AnInstanceOf.h" 20 | #import "Contain.h" 21 | 22 | // Verifiers 23 | #import "Exist.h" 24 | 25 | #ifdef CEDAR_CUSTOM_MATCHERS 26 | #import CEDAR_CUSTOM_MATCHERS 27 | #endif 28 | -------------------------------------------------------------------------------- /Specs/Frameworks/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 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/ComparatorsBase.h: -------------------------------------------------------------------------------- 1 | #import "CompareEqual.h" 2 | #import "CompareGreaterThan.h" 3 | #import "CompareCloseTo.h" 4 | 5 | #if TARGET_OS_IPHONE 6 | #import "UIGeometryCompareEqual.h" 7 | #else 8 | #import "OSXGeometryCompareEqual.h" 9 | #endif 10 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/ComparatorsContainerConvenience.h: -------------------------------------------------------------------------------- 1 | namespace Cedar { namespace Matchers { namespace Comparators { 2 | template 3 | bool compare_contains(const T & container, const U & element, contains_options options) { 4 | return compare_contains(container, element, options, [](const U & lhs, const U & rhs) { return compare_equal(lhs, rhs); }); 5 | } 6 | }}} 7 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/CompareCloseTo.h: -------------------------------------------------------------------------------- 1 | #import "CDRSpecFailure.h" 2 | 3 | namespace Cedar { namespace Matchers { namespace Comparators { 4 | inline bool compare_close_to(const double actualValue, const double expectedValue, const double threshold) { 5 | return actualValue > expectedValue - threshold && actualValue < expectedValue + threshold; 6 | } 7 | 8 | inline bool compare_close_to(const NSDecimal & actualValue, const NSDecimal & expectedValue, const double threshold) { 9 | NSDecimal decimalThreshold = [@(threshold) decimalValue]; 10 | NSDecimal maxExpectedValue; 11 | NSDecimal minExpectedValue; 12 | NSDecimalAdd(&maxExpectedValue, &expectedValue, &decimalThreshold, NSRoundPlain); 13 | NSDecimalSubtract(&minExpectedValue, &expectedValue, &decimalThreshold, NSRoundPlain); 14 | return NSDecimalCompare(&actualValue, &minExpectedValue) != NSOrderedAscending && NSDecimalCompare(&actualValue, &maxExpectedValue) != NSOrderedDescending; 15 | } 16 | 17 | inline bool compare_close_to(const id actualValue, const id expectedValue, const double threshold) { 18 | if ([expectedValue isKindOfClass:[NSNumber class]] && [actualValue isKindOfClass:[NSNumber class]]) { 19 | return compare_close_to([actualValue decimalValue], [expectedValue decimalValue], threshold); 20 | } 21 | if ([expectedValue isKindOfClass:[NSDate class]] && [actualValue isKindOfClass:[NSDate class]]) { 22 | return compare_close_to([actualValue timeIntervalSince1970], [expectedValue timeIntervalSince1970], threshold); 23 | } 24 | 25 | NSString *reason = [NSString stringWithFormat:@"Actual value <%@> (%@) is not a numeric value (NSNumber, NSDate, float, etc.)", 26 | actualValue, NSStringFromClass([actualValue class])]; 27 | [[CDRSpecFailure specFailureWithReason:reason] raise]; 28 | return false; 29 | } 30 | }}} 31 | -------------------------------------------------------------------------------- /Specs/Frameworks/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 NSDecimal 16 | inline bool compare_equal(const NSDecimal & actualValue, const NSDecimal & expectedValue) { 17 | return NSOrderedSame == NSDecimalCompare(&actualValue, &expectedValue); 18 | } 19 | 20 | #pragma mark C Strings 21 | template 22 | bool compare_equal(char *actualValue, const U & expectedValue) { 23 | return strcmp(actualValue, expectedValue) == 0; 24 | } 25 | 26 | template 27 | bool compare_equal(const char *actualValue, const U & expectedValue) { 28 | return strcmp(actualValue, expectedValue) == 0; 29 | } 30 | 31 | #pragma mark NSRange 32 | template 33 | bool compare_equal(const NSRange actualValue, const U & expectedValue) { 34 | return NSEqualRanges(actualValue, expectedValue); 35 | } 36 | }}} 37 | -------------------------------------------------------------------------------- /Specs/Frameworks/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 | 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 | id actualValueObject = [actualValueId nonretainedObjectValue]; 10 | id expectedValueObject = [expectedValueId nonretainedObjectValue]; 11 | if ([actualValueObject respondsToSelector:@selector(compare:)]) { 12 | return NSOrderedDescending == [actualValueObject compare:expectedValueObject]; 13 | } else if ([expectedValueObject respondsToSelector:@selector(compare:)]) { 14 | return NSOrderedAscending == [expectedValueObject compare:actualValueObject]; 15 | } 16 | return false; 17 | } else { 18 | return actualValue > expectedValue; 19 | } 20 | } 21 | 22 | #pragma mark NSDecimal 23 | inline bool compare_greater_than(const NSDecimal & actualValue, const NSDecimal & expectedValue) { 24 | return NSOrderedDescending == NSDecimalCompare(&actualValue, &expectedValue); 25 | } 26 | }}} 27 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/ConformTo.h: -------------------------------------------------------------------------------- 1 | #import "Base.h" 2 | 3 | #pragma mark - private interface 4 | namespace Cedar { namespace Matchers { namespace Private { 5 | 6 | class ConformTo : public Base<> { 7 | private: 8 | ConformTo & operator=(const ConformTo &); 9 | 10 | public: 11 | explicit ConformTo(const char *); 12 | ConformTo(Protocol *protocol); 13 | ~ConformTo(); 14 | // Allow default copy ctor. 15 | 16 | bool matches(const id) const; 17 | 18 | protected: 19 | virtual NSString * failure_message_end() const; 20 | 21 | private: 22 | const char *expectedProtocolName_; 23 | }; 24 | }}} 25 | 26 | #pragma mark - public interface 27 | namespace Cedar { namespace Matchers { 28 | using CedarConformTo = Cedar::Matchers::Private::ConformTo; 29 | inline CedarConformTo conform_to(Protocol *protocol) { 30 | return CedarConformTo(protocol); 31 | } 32 | 33 | inline CedarConformTo conform_to(const char *protocolName) { 34 | return CedarConformTo(protocolName); 35 | } 36 | }} 37 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/Exist.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Base.h" 3 | 4 | #pragma mark - private interface 5 | namespace Cedar { namespace Matchers { namespace Private { 6 | class Exist : public Base<> { 7 | public: 8 | virtual NSString * failure_message_end() const { 9 | return @"exist on the local filesystem"; 10 | } 11 | 12 | template 13 | bool matches(T * const &) const; 14 | 15 | bool matches(NSString * const path) const { 16 | return [[NSFileManager defaultManager] fileExistsAtPath:path]; 17 | } 18 | 19 | bool matches(NSURL * const URL) const { 20 | return matches([URL path]); 21 | } 22 | }; 23 | }}} 24 | 25 | #pragma mark - public interface 26 | namespace Cedar { namespace Matchers { 27 | using CedarExist = Cedar::Matchers::Private::Exist; 28 | static const CedarExist exist = CedarExist(); 29 | }} 30 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/InvocationMatcher.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "ValueArgument.h" 3 | 4 | namespace Cedar { namespace Doubles { 5 | 6 | class InvocationMatcher { 7 | public: 8 | typedef std::vector arguments_vector_t; 9 | enum { OBJC_DEFAULT_ARGUMENT_COUNT = 2 }; 10 | 11 | public: 12 | InvocationMatcher(const SEL); 13 | virtual ~InvocationMatcher() {} 14 | 15 | void add_argument(const Argument::shared_ptr_t argument); 16 | template 17 | void add_argument(const T &); 18 | 19 | bool matches(NSInvocation * const) const; 20 | NSString *mismatch_reason(); 21 | 22 | const SEL selector() const { return expectedSelector_; } 23 | const arguments_vector_t & arguments() const { return arguments_; } 24 | const bool match_any_arguments() const { return arguments_.empty(); } 25 | void verify_count_and_types_of_arguments(id instance) const; 26 | 27 | private: 28 | bool matches_arguments(NSInvocation * const) const; 29 | NSMethodSignature *method_signature_for_instance(id instance) const; 30 | void compare_argument_count_to_method_signature(NSMethodSignature * const methodSignature) const; 31 | void compare_argument_types_to_method_signature(NSMethodSignature * const methodSignature) const; 32 | 33 | private: 34 | const SEL expectedSelector_; 35 | arguments_vector_t arguments_; 36 | }; 37 | 38 | template 39 | void InvocationMatcher::add_argument(const T & value) { 40 | this->add_argument(Argument::shared_ptr_t(new ValueArgument(value))); 41 | } 42 | 43 | }} 44 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/NSInvocation+Cedar.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface NSInvocation (Cedar) 4 | 5 | - (void)copyBlockArguments; 6 | - (NSInvocation *)invocationWithoutCmdArgument; 7 | - (void)invokeUsingBlockWithoutSelfArgument:(id)block; 8 | 9 | - (NSArray *)arguments; 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/NSMethodSignature+Cedar.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface NSMethodSignature (Cedar) 4 | 5 | + (NSMethodSignature *)signatureFromBlock:(id)block; 6 | - (NSMethodSignature *)signatureWithoutSelectorArgument; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/RaiseException.h: -------------------------------------------------------------------------------- 1 | #import "Base.h" 2 | #import 3 | 4 | #pragma mark - private interface 5 | namespace Cedar { namespace Matchers { namespace Private { 6 | 7 | typedef void (^empty_block_t)(); 8 | 9 | struct RaiseExceptionMessageBuilder { 10 | static NSString * string_for_actual_value(empty_block_t value) { 11 | return [value description]; 12 | } 13 | }; 14 | 15 | class RaiseException : public Base { 16 | private: 17 | RaiseException & operator=(const RaiseException &); 18 | 19 | public: 20 | explicit RaiseException(NSObject * = nil, Class = nil, bool = false, NSString * = nil, NSString * = nil); 21 | ~RaiseException(); 22 | // Allow default copy ctor. 23 | 24 | RaiseException operator()() const; 25 | RaiseException operator()(Class) const; 26 | RaiseException operator()(NSObject *) const; 27 | 28 | RaiseException & or_subclass(); 29 | 30 | RaiseException & with_reason(NSString * const reason); 31 | RaiseException with_reason(NSString * const reason) const; 32 | 33 | RaiseException & with_name(NSString * const name); 34 | RaiseException with_name(NSString * const name) const; 35 | 36 | bool matches(empty_block_t) const; 37 | 38 | protected: 39 | virtual NSString * failure_message_end() const; 40 | 41 | private: 42 | bool exception_matches_expected_class(NSObject * const exception) const; 43 | bool exception_matches_expected_instance(NSObject * const exception) const; 44 | bool exception_matches_expected_reason(NSObject * const exception) const; 45 | bool exception_matches_expected_name(NSObject * const exception) const; 46 | 47 | private: 48 | const NSObject *expectedExceptionInstance_; 49 | const Class expectedExceptionClass_; 50 | bool allowSubclasses_; 51 | NSString *expectedReason_; 52 | NSString *expectedName_; 53 | }; 54 | }}} 55 | 56 | #pragma mark - public interface 57 | namespace Cedar { namespace Matchers { 58 | using CedarRaiseException = Cedar::Matchers::Private::RaiseException; 59 | static const CedarRaiseException raise_exception; 60 | }} 61 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/RejectedMethod.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import 4 | #import "InvocationMatcher.h" 5 | #import "Argument.h" 6 | #import "ReturnValue.h" 7 | 8 | namespace Cedar { namespace Doubles { 9 | 10 | class RejectedMethod : private InvocationMatcher { 11 | 12 | private: 13 | RejectedMethod & operator=(const RejectedMethod &); 14 | 15 | public: 16 | RejectedMethod(SEL); 17 | RejectedMethod(const char *); 18 | 19 | const SEL selector() const; 20 | }; 21 | }} 22 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/RespondTo.h: -------------------------------------------------------------------------------- 1 | #import "Base.h" 2 | 3 | #pragma mark - private interface 4 | namespace Cedar { namespace Matchers { namespace Private { 5 | 6 | class RespondTo : public Base<> { 7 | private: 8 | RespondTo & operator=(const RespondTo &); 9 | 10 | public: 11 | explicit RespondTo(const char *); 12 | RespondTo(SEL selector); 13 | ~RespondTo(); 14 | // Allow default copy ctor. 15 | 16 | bool matches(const id) const; 17 | 18 | protected: 19 | virtual NSString * failure_message_end() const; 20 | 21 | private: 22 | const char *expectedSelectorName_; 23 | }; 24 | }}} 25 | 26 | #pragma mark - public interface 27 | namespace Cedar { namespace Matchers { 28 | using CedarRespondTo = Cedar::Matchers::Private::RespondTo; 29 | 30 | inline CedarRespondTo respond_to(const SEL selector) { 31 | return CedarRespondTo(selector); 32 | } 33 | 34 | inline CedarRespondTo respond_to(const char *selectorName) { 35 | return CedarRespondTo(selectorName); 36 | } 37 | }} 38 | -------------------------------------------------------------------------------- /Specs/Frameworks/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 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/StringifiersBase.h: -------------------------------------------------------------------------------- 1 | #import 2 | #include 3 | 4 | namespace Cedar { namespace Matchers { namespace Stringifiers { 5 | NSString * object_description_for(const void *objectValue); 6 | 7 | template 8 | NSString * string_for(const U & value) { 9 | if (0 == strncmp(@encode(U), "@", 1)) { 10 | return object_description_for(&value); 11 | } else { 12 | std::stringstream temp; 13 | temp << value; 14 | return [NSString stringWithCString:temp.str().c_str() encoding:NSUTF8StringEncoding]; 15 | } 16 | } 17 | 18 | inline NSString * string_for(std::nullptr_t value) { 19 | return @"nil"; 20 | } 21 | 22 | inline NSString * string_for(const char value) { 23 | return string_for(static_cast(value)); 24 | } 25 | 26 | inline NSString * string_for(const Class & value) { 27 | return NSStringFromClass(value); 28 | } 29 | 30 | inline NSString * string_for(const BOOL value) { 31 | return value ? @"YES" : @"NO"; 32 | } 33 | 34 | inline NSString * string_for(NSNumber * const value) { 35 | if (!value) { 36 | return [NSString stringWithFormat:@"%@", value]; 37 | } 38 | 39 | return string_for([value floatValue]); 40 | } 41 | 42 | inline NSString * string_for(const NSDecimal value) { 43 | return NSDecimalString(&value, [NSLocale systemLocale]); 44 | } 45 | 46 | inline NSString * string_for(char *value) { 47 | if (value == NULL) { 48 | return @"NULL"; 49 | } 50 | return [NSString stringWithFormat:@"cstring(%s)", value]; 51 | } 52 | 53 | inline NSString * string_for(const char *value) { 54 | return string_for((char *)value); 55 | } 56 | 57 | inline NSString * string_for(NSRange value) { 58 | return NSStringFromRange(value); 59 | } 60 | 61 | inline NSString * string_for(NSDate *date) { 62 | return [NSString stringWithFormat:@"%@ (%f)", date, [date timeIntervalSince1970]]; 63 | } 64 | }}} 65 | -------------------------------------------------------------------------------- /Specs/Frameworks/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 | 16 | NSString * string = string_for(*it); 17 | [result appendString:[NSString stringWithFormat:@"\n %@", string]]; 18 | } 19 | return result; 20 | } 21 | } 22 | 23 | template 24 | NSString * string_for(const typename std::vector & container) { 25 | NSString * delimitedList = comma_and_newline_delimited_list(container); 26 | return [NSString stringWithFormat:@"(%@\n)", delimitedList]; 27 | } 28 | 29 | template 30 | NSString * string_for(const typename std::map & container) { 31 | NSMutableString *result = [NSMutableString stringWithString:@"{"]; 32 | 33 | for (typename std::map::const_iterator it = container.begin(); it != container.end(); ++it) { 34 | NSString * keyString = string_for(it->first); 35 | NSString * valueString = string_for(it->second); 36 | [result appendString:[NSString stringWithFormat:@"\n %@ = %@;", keyString, valueString]]; 37 | } 38 | [result appendString:@"\n}"]; 39 | return result; 40 | } 41 | 42 | template 43 | NSString * string_for(const typename std::set & container) { 44 | NSString * delimitedList = comma_and_newline_delimited_list(container); 45 | return [NSString stringWithFormat:@"{(%@\n)}", delimitedList]; 46 | } 47 | }}} 48 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/UIGeometryCompareEqual.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | #import "ComparatorsBase.h" 5 | #import "UIGeometryStringifiers.h" 6 | 7 | namespace Cedar { namespace Matchers { namespace Comparators { 8 | template 9 | bool compare_equal(CGRect const actualValue, const U & expectedValue) { 10 | return CGRectEqualToRect(actualValue, expectedValue); 11 | } 12 | 13 | template 14 | bool compare_equal(CGSize const actualValue, const U & expectedValue) { 15 | return CGSizeEqualToSize(actualValue, expectedValue); 16 | } 17 | 18 | template 19 | bool compare_equal(CGPoint const actualValue, const U & expectedValue) { 20 | return CGPointEqualToPoint(actualValue, expectedValue); 21 | } 22 | 23 | template 24 | bool compare_equal(UIEdgeInsets const actualValue, const U & expectedValue) { 25 | return UIEdgeInsetsEqualToEdgeInsets(actualValue, expectedValue); 26 | } 27 | 28 | template 29 | bool compare_equal(CGAffineTransform const actualValue, const U & expectedValue) { 30 | return CGAffineTransformEqualToTransform(actualValue, expectedValue); 31 | } 32 | 33 | template 34 | bool compare_equal(UIImage *actualImage, const U & expectedImage) { 35 | return [expectedImage isEqual:actualImage] || [UIImagePNGRepresentation(expectedImage) isEqual:UIImagePNGRepresentation(actualImage)]; 36 | } 37 | }}} 38 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/UIGeometryStringifiers.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "StringifiersBase.h" 3 | 4 | namespace Cedar { namespace Matchers { namespace Stringifiers { 5 | inline NSString * string_for(const CGRect value) { 6 | return NSStringFromCGRect(value); 7 | } 8 | 9 | inline NSString * string_for(const CGSize value) { 10 | return NSStringFromCGSize(value); 11 | } 12 | 13 | inline NSString * string_for(const CGPoint value) { 14 | return NSStringFromCGPoint(value); 15 | } 16 | 17 | inline NSString * string_for(const UIEdgeInsets value) { 18 | return NSStringFromUIEdgeInsets(value); 19 | } 20 | 21 | inline NSString * string_for(const CGAffineTransform value) { 22 | return NSStringFromCGAffineTransform(value); 23 | } 24 | }}} 25 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/A/Headers/UIKitComparatorsContainer.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | namespace Cedar { namespace Matchers { namespace Comparators { 5 | template 6 | bool compare_contains(UIView * const container, const U & element, contains_options options, F comparator) { 7 | return compare_contains(container, element, @"subviews", options, comparator); 8 | } 9 | 10 | template 11 | bool compare_contains(CALayer * const container, const U & element, contains_options options, F comparator) { 12 | return compare_contains(container, element, @"sublayers", options, comparator); 13 | } 14 | }}} 15 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/A/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CDRBuildVersionSHA 6 | 1d27d43597d7b65ac0dba7b1ffb82c45a5672412 7 | CFBundleDevelopmentRegion 8 | English 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | io.pivotal.$(PRODUCT_NAME:rfc1034identifier) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 0.11.2 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Cedar-iOS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rbobbins/animation-demo/53060507efaf9ec4c84f5abb105213e6a978cdb4/Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Cedar-iOS -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/AnyArgument.h: -------------------------------------------------------------------------------- 1 | #import "Argument.h" 2 | 3 | namespace Cedar { namespace Doubles { 4 | 5 | class AnyArgument : public Argument { 6 | private: 7 | AnyArgument & operator=(const AnyArgument &); 8 | 9 | public: 10 | AnyArgument() {}; 11 | virtual ~AnyArgument() {}; 12 | // Allow default copy ctor. 13 | 14 | virtual const char * const value_encoding() const { return ""; }; 15 | virtual void * value_bytes() const { return NULL; }; 16 | virtual NSString * value_string() const { return @"anything"; }; 17 | 18 | virtual bool matches_encoding(const char *) const { return true; } 19 | virtual bool matches_bytes(void *) const { return true; } 20 | virtual unsigned int specificity_ranking() const { return 0; } 21 | }; 22 | 23 | namespace Arguments { 24 | extern const Argument::shared_ptr_t anything; 25 | } 26 | 27 | }} 28 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/AnyInstanceArgument.h: -------------------------------------------------------------------------------- 1 | #import "Argument.h" 2 | 3 | namespace Cedar { namespace Doubles { 4 | 5 | class AnyInstanceArgument : public Argument { 6 | public: 7 | virtual ~AnyInstanceArgument() = 0; 8 | 9 | virtual const char * const value_encoding() const; 10 | virtual void * value_bytes() const { return NULL; } 11 | virtual NSString * value_string() const = 0; 12 | 13 | virtual bool matches_encoding(const char *) const; 14 | virtual bool matches_bytes(void *) const = 0; 15 | virtual unsigned int specificity_ranking() const { return 1; } 16 | }; 17 | }} 18 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/AnyInstanceConformingToProtocolArgument.h: -------------------------------------------------------------------------------- 1 | #import "AnyInstanceArgument.h" 2 | 3 | namespace Cedar { namespace Doubles { 4 | 5 | class AnyInstanceConformingToProtocolArgument : public AnyInstanceArgument { 6 | private: 7 | AnyInstanceConformingToProtocolArgument & operator=(const AnyInstanceConformingToProtocolArgument &); 8 | 9 | public: 10 | explicit AnyInstanceConformingToProtocolArgument(Protocol *); 11 | virtual ~AnyInstanceConformingToProtocolArgument(); 12 | // Allow default copy ctor. 13 | 14 | virtual NSString * value_string() const; 15 | virtual bool matches_bytes(void *) const; 16 | virtual bool matches(const Argument &) const; 17 | private: 18 | Protocol *protocol_; 19 | }; 20 | 21 | namespace Arguments { 22 | Argument::shared_ptr_t any(Protocol *); 23 | } 24 | }} 25 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/AnyInstanceOfClassArgument.h: -------------------------------------------------------------------------------- 1 | #import "AnyInstanceArgument.h" 2 | 3 | namespace Cedar { namespace Doubles { 4 | 5 | class AnyInstanceOfClassArgument : public AnyInstanceArgument { 6 | private: 7 | AnyInstanceOfClassArgument & operator=(const AnyInstanceOfClassArgument &); 8 | 9 | public: 10 | explicit AnyInstanceOfClassArgument(const Class); 11 | virtual ~AnyInstanceOfClassArgument(); 12 | // Allow default copy ctor. 13 | 14 | virtual NSString * value_string() const; 15 | virtual bool matches_bytes(void *) const; 16 | virtual bool matches(const Argument &) const; 17 | private: 18 | const Class class_; 19 | }; 20 | 21 | namespace Arguments { 22 | Argument::shared_ptr_t any(Class); 23 | } 24 | }} 25 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/Argument.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import 4 | 5 | namespace Cedar { namespace Doubles { 6 | 7 | #pragma mark - Argument 8 | class Argument { 9 | public: 10 | virtual ~Argument() = 0; 11 | 12 | virtual const char * const value_encoding() const = 0; 13 | virtual void * value_bytes() const = 0; 14 | virtual NSString * value_string() const = 0; 15 | 16 | virtual bool matches_encoding(const char *) const = 0; 17 | virtual bool matches_bytes(void *) const = 0; 18 | virtual unsigned int specificity_ranking() const = 0; 19 | 20 | typedef std::shared_ptr shared_ptr_t; 21 | virtual bool matches(const Argument &other_argument) const { 22 | return ((this->matches_encoding(other_argument.value_encoding()) && this->matches_bytes(other_argument.value_bytes())) || 23 | (other_argument.matches_encoding(this->value_encoding()) && other_argument.matches_bytes(this->value_bytes()))); 24 | } 25 | 26 | bool operator==(const Argument &other_argument) const { 27 | return typeid(*this) == typeid(other_argument) && this->matches(other_argument); 28 | } 29 | 30 | bool operator!=(const Argument &other_argument) const { 31 | return !(*this == other_argument); 32 | } 33 | }; 34 | 35 | inline /* virtual */ Argument::~Argument() {} 36 | 37 | }} 38 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/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 | NSString * failureMessageEnd = this->failure_message_end(); 45 | NSString * actualValueString = MessageBuilder_::string_for_actual_value(value); 46 | return [NSString stringWithFormat:@"Expected <%@> to %@", actualValueString, failureMessageEnd]; 47 | } 48 | 49 | template template 50 | NSString * Base::negative_failure_message_for(const U & value) const { 51 | NSString * failureMessageEnd = this->failure_message_end(); 52 | NSString * actualValueString = MessageBuilder_::string_for_actual_value(value); 53 | return [NSString stringWithFormat:@"Expected <%@> to not %@", actualValueString, failureMessageEnd]; 54 | } 55 | }} 56 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/BeEmpty.h: -------------------------------------------------------------------------------- 1 | #import "Base.h" 2 | 3 | #pragma mark - private interface 4 | namespace Cedar { namespace Matchers { namespace Private { 5 | class BeEmpty : public Base<> { 6 | private: 7 | BeEmpty & operator=(const BeEmpty &); 8 | 9 | public: 10 | inline BeEmpty() : Base<>() {} 11 | inline ~BeEmpty() {} 12 | // Allow default copy ctor. 13 | 14 | inline const BeEmpty & 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 @"be empty"; } 21 | }; 22 | 23 | #pragma mark Generic 24 | template 25 | bool BeEmpty::matches(const U & actualValue) const { 26 | return Comparators::compare_empty(actualValue); 27 | } 28 | }}} 29 | 30 | #pragma mark - public interface 31 | namespace Cedar { namespace Matchers { 32 | using CedarBeEmpty = Cedar::Matchers::Private::BeEmpty; 33 | static const CedarBeEmpty be_empty = CedarBeEmpty(); 34 | }} 35 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/BeFalsy.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Base.h" 3 | 4 | #pragma mark - private interface 5 | namespace Cedar { namespace Matchers { namespace Private { 6 | class BeFalsy : public Base<> { 7 | private: 8 | BeFalsy & operator=(const BeFalsy &); 9 | 10 | public: 11 | inline BeFalsy() : Base<>() {} 12 | inline ~BeFalsy() {} 13 | // Allow default copy ctor. 14 | 15 | inline const BeFalsy & operator()() const { return *this; } 16 | 17 | template 18 | bool matches(const U &) const; 19 | 20 | protected: 21 | inline /*virtual*/ NSString * failure_message_end() const { return @"evaluate to false"; } 22 | }; 23 | 24 | static const BeFalsy be_falsy = BeFalsy(); 25 | 26 | #pragma mark Generic 27 | template 28 | bool BeFalsy::matches(const U & actualValue) const { 29 | return !actualValue; 30 | } 31 | 32 | }}} 33 | 34 | #pragma mark - public interface 35 | namespace Cedar { namespace Matchers { 36 | using CedarBeFalsy = Cedar::Matchers::Private::BeFalsy; 37 | static const CedarBeFalsy be_falsy = CedarBeFalsy(); 38 | }} 39 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/BeGreaterThan.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Base.h" 3 | 4 | namespace Cedar { namespace Matchers { namespace Private { 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::BeGreaterThan(const T & expectedValue) 28 | : Base<>(), expectedValue_(expectedValue) { 29 | } 30 | 31 | template 32 | BeGreaterThan::~BeGreaterThan() { 33 | } 34 | 35 | template 36 | /*virtual*/ NSString * BeGreaterThan::failure_message_end() const { 37 | NSString * expectedValueString = Stringifiers::string_for(expectedValue_); 38 | return [NSString stringWithFormat:@"be greater than <%@>", expectedValueString]; 39 | } 40 | 41 | template template 42 | bool BeGreaterThan::matches(const U & actualValue) const { 43 | return Comparators::compare_greater_than(actualValue, expectedValue_); 44 | } 45 | }}} 46 | 47 | #pragma mark - public interface 48 | namespace Cedar { namespace Matchers { 49 | template 50 | using CedarBeGreaterThan = Cedar::Matchers::Private::BeGreaterThan; 51 | 52 | template 53 | CedarBeGreaterThan be_greater_than(const T & expectedValue) { 54 | return CedarBeGreaterThan(expectedValue); 55 | } 56 | 57 | #pragma mark operators 58 | template 59 | bool operator>(const ActualValue & actualValue, const U & expectedValue) { 60 | return actualValue.to > expectedValue; 61 | } 62 | 63 | template 64 | bool operator>(const ActualValueMatchProxy & actualValueMatchProxy, const U & expectedValue) { 65 | actualValueMatchProxy(be_greater_than(expectedValue)); 66 | return true; 67 | } 68 | }} 69 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/BeLTE.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Base.h" 3 | 4 | #pragma mark - private interface 5 | namespace Cedar { namespace Matchers { namespace Private { 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::BeLTE(const T & expectedValue) 28 | : Base<>(), expectedValue_(expectedValue) { 29 | } 30 | 31 | template 32 | BeLTE::~BeLTE() { 33 | } 34 | 35 | template 36 | /*virtual*/ NSString * BeLTE::failure_message_end() const { 37 | NSString * expectedValueString = Stringifiers::string_for(expectedValue_); 38 | return [NSString stringWithFormat:@"be less than or equal to <%@>", expectedValueString]; 39 | } 40 | 41 | template template 42 | bool BeLTE::matches(const U & actualValue) const { 43 | return !Comparators::compare_greater_than(actualValue, expectedValue_); 44 | } 45 | }}} 46 | 47 | #pragma mark - public interface 48 | namespace Cedar { namespace Matchers { 49 | template 50 | using CedarBeLTE = Cedar::Matchers::Private::BeLTE; 51 | 52 | template 53 | CedarBeLTE be_lte(const T & expectedValue) { 54 | return CedarBeLTE(expectedValue); 55 | } 56 | 57 | template 58 | CedarBeLTE be_less_than_or_equal_to(const T & expectedValue) { 59 | return be_lte(expectedValue); 60 | } 61 | 62 | #pragma mark operators 63 | template 64 | bool operator<=(const ActualValue & actualValue, const U & expectedValue) { 65 | return actualValue.to <= expectedValue; 66 | } 67 | 68 | template 69 | bool operator<=(const ActualValueMatchProxy & actualValueMatchProxy, const U & expectedValue) { 70 | actualValueMatchProxy(be_lte(expectedValue)); 71 | return true; 72 | } 73 | }} 74 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/BeLessThan.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Base.h" 3 | 4 | #pragma mark - private interface 5 | namespace Cedar { namespace Matchers { namespace Private { 6 | 7 | template 8 | class BeLessThan : public Base<> { 9 | private: 10 | BeLessThan & operator=(const BeLessThan &); 11 | 12 | public: 13 | explicit BeLessThan(const T & expectedValue); 14 | ~BeLessThan(); 15 | // Allow default copy ctor. 16 | 17 | template 18 | bool matches(const U &) const; 19 | 20 | protected: 21 | virtual NSString * failure_message_end() const; 22 | 23 | private: 24 | const T & expectedValue_; 25 | }; 26 | 27 | template 28 | BeLessThan::BeLessThan(const T & expectedValue) 29 | : Base<>(), expectedValue_(expectedValue) { 30 | } 31 | 32 | template 33 | BeLessThan::~BeLessThan() { 34 | } 35 | 36 | template 37 | /*virtual*/ NSString * BeLessThan::failure_message_end() const { 38 | NSString * expectedValueString = Stringifiers::string_for(expectedValue_); 39 | return [NSString stringWithFormat:@"be less than <%@>", expectedValueString]; 40 | } 41 | 42 | template template 43 | bool BeLessThan::matches(const U & actualValue) const { 44 | return !Comparators::compare_greater_than(actualValue, expectedValue_) && !Comparators::compare_equal(actualValue, expectedValue_); 45 | } 46 | 47 | }}} 48 | 49 | #pragma mark - public interface 50 | namespace Cedar { namespace Matchers { 51 | template 52 | using CedarBeLessThan = Cedar::Matchers::Private::BeLessThan; 53 | 54 | template 55 | CedarBeLessThan be_less_than(const T & expectedValue) { 56 | return CedarBeLessThan(expectedValue); 57 | } 58 | 59 | #pragma mark operators 60 | template 61 | bool operator<(const ActualValue & actualValue, const U & expectedValue) { 62 | return actualValue.to < expectedValue; 63 | } 64 | 65 | template 66 | bool operator<(const ActualValueMatchProxy & actualValueMatchProxy, const U & expectedValue) { 67 | actualValueMatchProxy(be_less_than(expectedValue)); 68 | return true; 69 | } 70 | }} 71 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/BeTruthy.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Base.h" 3 | 4 | #pragma mark - private interface 5 | namespace Cedar { namespace Matchers { namespace Private { 6 | class BeTruthy : public Base<> { 7 | private: 8 | BeTruthy & operator=(const BeTruthy &); 9 | 10 | public: 11 | inline BeTruthy() : Base<>() {} 12 | inline ~BeTruthy() {} 13 | // Allow default copy ctor. 14 | 15 | inline const BeTruthy & operator()() const { return *this; } 16 | 17 | template 18 | bool matches(const U &) const; 19 | 20 | protected: 21 | inline /*virtual*/ NSString * failure_message_end() const { return @"evaluate to true"; } 22 | }; 23 | 24 | static const BeTruthy be_truthy = BeTruthy(); 25 | 26 | #pragma mark Generic 27 | template 28 | bool BeTruthy::matches(const U & actualValue) const { 29 | return !!actualValue; 30 | } 31 | }}} 32 | 33 | #pragma mark - public interface 34 | namespace Cedar { namespace Matchers { 35 | using CedarBeTruthy = Cedar::Matchers::Private::BeTruthy; 36 | static const CedarBeTruthy be_truthy = CedarBeTruthy(); 37 | }} 38 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/CDRClassFake.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CDRFake.h" 3 | #import "CedarDouble.h" 4 | 5 | @interface CDRClassFake : CDRFake 6 | 7 | @end 8 | 9 | id CDR_fake_for(BOOL require_explicit_stubs, Class klass, ...); 10 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/CDRColorizedReporter.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CDRDefaultReporter.h" 3 | 4 | @interface CDRColorizedReporter : CDRDefaultReporter 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/CDRExample.h: -------------------------------------------------------------------------------- 1 | #import "CDRExampleBase.h" 2 | #import "CDRSpecFailure.h" 3 | 4 | @interface CDRExample : CDRExampleBase { 5 | CDRSpecBlock block_; 6 | CDRExampleState state_; 7 | CDRSpecFailure *failure_; 8 | } 9 | 10 | @property (nonatomic, retain) CDRSpecFailure *failure; 11 | 12 | + (id)exampleWithText:(NSString *)text andBlock:(CDRSpecBlock)block; 13 | - (id)initWithText:(NSString *)text andBlock:(CDRSpecBlock)block; 14 | - (BOOL)isPending; 15 | 16 | @end 17 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/CDRExampleBase.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CDRExampleParent.h" 3 | 4 | @class CDRSpec, CDRReportDispatcher; 5 | typedef NS_ENUM(NSInteger, CDRExampleState) { 6 | CDRExampleStateIncomplete = 0x00, 7 | CDRExampleStateSkipped = 0x01, 8 | CDRExampleStatePassed = 0x03, 9 | CDRExampleStatePending = 0x07, 10 | CDRExampleStateFailed = 0x0F, 11 | CDRExampleStateError = 0x1F 12 | }; 13 | 14 | @interface CDRExampleBase : NSObject { 15 | NSString *text_; 16 | NSObject *parent_; 17 | CDRSpec *spec_; 18 | BOOL focused_; 19 | NSUInteger stackAddress_; 20 | NSDate *startDate_; 21 | NSDate *endDate_; 22 | } 23 | 24 | @property (nonatomic, readonly) NSString *text; 25 | @property (nonatomic, assign) NSObject *parent; 26 | @property (nonatomic, assign) CDRSpec *spec; 27 | @property (nonatomic, assign, getter=isFocused) BOOL focused; 28 | @property (nonatomic) NSUInteger stackAddress; 29 | @property (nonatomic, readonly) NSDate *startDate; 30 | @property (nonatomic, readonly) NSDate *endDate; 31 | 32 | - (id)initWithText:(NSString *)text; 33 | 34 | 35 | - (void)runWithDispatcher:(CDRReportDispatcher *)dispatcher; 36 | - (BOOL)shouldRun; 37 | 38 | - (BOOL)hasChildren; 39 | - (BOOL)hasFocusedExamples; 40 | 41 | - (NSString *)message; 42 | - (NSString *)fullText; 43 | - (NSMutableArray *)fullTextInPieces; 44 | 45 | - (NSTimeInterval)runTime; 46 | - (CDRExampleState)state; 47 | @end 48 | 49 | @interface CDRExampleBase (RunReporting) 50 | - (float)progress; 51 | @end 52 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/CDRExampleGroup.h: -------------------------------------------------------------------------------- 1 | #import "CDRExampleBase.h" 2 | 3 | @interface CDRExampleGroup : CDRExampleBase { 4 | NSMutableArray *beforeBlocks_, *examples_, *afterBlocks_; 5 | BOOL isRoot_; 6 | CDRSpecBlock subjectActionBlock_; 7 | } 8 | 9 | @property (nonatomic, copy) CDRSpecBlock subjectActionBlock; 10 | @property (nonatomic, readonly) NSArray *examples; 11 | 12 | + (id)groupWithText:(NSString *)text; 13 | 14 | - (id)initWithText:(NSString *)text isRoot:(BOOL)isRoot; 15 | - (void)add:(CDRExampleBase *)example; 16 | - (void)addBefore:(CDRSpecBlock)block; 17 | - (void)addAfter:(CDRSpecBlock)block; 18 | 19 | @end 20 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/CDRExampleParent.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | typedef void (^CDRSpecBlock)(void); 4 | 5 | @protocol CDRExampleParent 6 | 7 | - (BOOL)shouldRun; 8 | 9 | - (void)setUp; 10 | - (CDRSpecBlock)subjectActionBlock; 11 | - (void)tearDown; 12 | 13 | @optional 14 | - (BOOL)hasFullText; 15 | - (NSString *)fullText; 16 | - (NSMutableArray *)fullTextInPieces; 17 | 18 | - (NSUInteger)stackAddress; 19 | @end 20 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/CDRExampleReporter.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class CDRExample, CDRExampleGroup, CDRSpec; 4 | 5 | @protocol CDRExampleReporter 6 | 7 | - (void)runWillStartWithGroups:(NSArray *)groups andRandomSeed:(unsigned int)seed; 8 | - (void)runDidComplete; 9 | - (int)result; 10 | 11 | // new methods to use instead of KVO 12 | @required 13 | - (void)runWillStartExample:(CDRExample *)example; 14 | - (void)runDidFinishExample:(CDRExample *)example; 15 | 16 | - (void)runWillStartExampleGroup:(CDRExampleGroup *)exampleGroup; 17 | - (void)runDidFinishExampleGroup:(CDRExampleGroup *)exampleGroup; 18 | 19 | - (void)runWillStartSpec:(CDRSpec *)spec; 20 | - (void)runDidFinishSpec:(CDRSpec *)spec; 21 | 22 | @end 23 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/CDRFake.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CedarDouble.h" 3 | 4 | @interface CDRFake : NSObject 5 | 6 | @property (nonatomic, assign) Class klass; 7 | @property (nonatomic, assign) BOOL requiresExplicitStubs; 8 | 9 | - (id)initWithClass:(Class)klass requireExplicitStubs:(BOOL)requireExplicitStubs; 10 | 11 | @end 12 | 13 | #ifndef CEDAR_DOUBLES_COMPATIBILITY_MODE 14 | #define fake_for(...) CDR_fake_for(YES, __VA_ARGS__, nil) 15 | #define nice_fake_for(...) CDR_fake_for(NO, __VA_ARGS__, nil) 16 | #endif 17 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/CDRFunctions.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NSArray *CDRReportersFromEnv(const char*defaultReporterClassName); 4 | 5 | int CDRRunSpecs(); 6 | OBJC_EXPORT void CDRInjectIntoXCTestRunner(); 7 | int CDRRunSpecsWithCustomExampleReporters(NSArray *reporters); 8 | NSArray *CDRShuffleItemsInArrayWithSeed(NSArray *sortedItems, unsigned int seed); 9 | NSArray *CDRReportersToRun(); 10 | NSString *CDRGetTestBundleExtension(); 11 | void CDRSuppressStandardPipesWhileLoadingClasses(); 12 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/CDRHooks.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @protocol CDRHooks 4 | 5 | @optional 6 | 7 | + (void)beforeEach; 8 | + (void)afterEach; 9 | 10 | @end 11 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/CDRProtocolFake.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CedarDouble.h" 3 | #import "CDRFake.h" 4 | 5 | #import 6 | #import 7 | 8 | @interface CDRProtocolFake : CDRFake 9 | 10 | - (id)initWithClass:(Class)klass forProtocols:(NSArray *)protocols requireExplicitStubs:(BOOL)requireExplicitStubs; 11 | 12 | @end 13 | 14 | id CDR_fake_for(BOOL require_explicit_stubs, Protocol *protocol, ...); 15 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/CDRSharedExampleGroupPool.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | #define CDR_OVERLOADABLE __attribute__((overloadable)) 4 | 5 | @protocol CDRSharedExampleGroupPool 6 | @end 7 | 8 | typedef void (^CDRSharedExampleGroupBlock)(NSDictionary *); 9 | typedef void (^CDRSharedExampleContextProviderBlock)(NSMutableDictionary *); 10 | 11 | #ifdef __cplusplus 12 | extern "C" { 13 | #endif 14 | void sharedExamplesFor(NSString *, CDRSharedExampleGroupBlock); 15 | CDR_OVERLOADABLE void itShouldBehaveLike(NSString *); 16 | CDR_OVERLOADABLE void itShouldBehaveLike(NSString *, CDRSharedExampleContextProviderBlock); 17 | #ifdef __cplusplus 18 | } 19 | #endif 20 | 21 | @interface CDRSharedExampleGroupPool : NSObject 22 | @end 23 | 24 | @interface CDRSharedExampleGroupPool (SharedExampleGroupDeclaration) 25 | - (void)declareSharedExampleGroups; 26 | @end 27 | 28 | #define SHARED_EXAMPLE_GROUPS_BEGIN(name) \ 29 | @interface SharedExampleGroupPoolFor##name : CDRSharedExampleGroupPool \ 30 | @end \ 31 | @implementation SharedExampleGroupPoolFor##name \ 32 | - (void)declareSharedExampleGroups { 33 | 34 | #define SHARED_EXAMPLE_GROUPS_END \ 35 | } \ 36 | @end 37 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/CDRSlowTestStatistics.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface CDRSlowTestStatistics : NSObject 4 | 5 | - (void)printStatsForExampleGroups:(NSArray *)groups; 6 | 7 | @end 8 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/CDRSpec.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CDRExampleBase.h" 3 | 4 | @protocol CDRExampleReporter; 5 | @class CDRExampleGroup, CDRExample, CDRSpecHelper, CDRSymbolicator; 6 | @class CDRReportDispatcher; 7 | 8 | @protocol CDRSpec 9 | @end 10 | 11 | extern const CDRSpecBlock PENDING; 12 | 13 | #ifdef __cplusplus 14 | extern "C" { 15 | #endif 16 | void beforeEach(CDRSpecBlock); 17 | void afterEach(CDRSpecBlock); 18 | 19 | CDRExampleGroup * describe(NSString *, CDRSpecBlock); 20 | extern CDRExampleGroup* (*context)(NSString *, CDRSpecBlock); 21 | 22 | CDRExample * it(NSString *, CDRSpecBlock); 23 | 24 | CDRExampleGroup * xdescribe(NSString *, CDRSpecBlock); 25 | extern CDRExampleGroup* (*xcontext)(NSString *, CDRSpecBlock); 26 | void subjectAction(CDRSpecBlock); 27 | CDRExample * xit(NSString *, CDRSpecBlock); 28 | 29 | CDRExampleGroup * fdescribe(NSString *, CDRSpecBlock); 30 | extern CDRExampleGroup* (*fcontext)(NSString *, CDRSpecBlock); 31 | CDRExample * fit(NSString *, CDRSpecBlock); 32 | 33 | void fail(NSString *); 34 | #ifdef __cplusplus 35 | } 36 | 37 | #import "ActualValue.h" 38 | #import "ShouldSyntax.h" 39 | #import "CedarComparators.h" 40 | #import "CedarMatchers.h" 41 | #import "CedarDoubles.h" 42 | 43 | #endif // __cplusplus 44 | 45 | @interface CDRSpec : NSObject { 46 | CDRExampleGroup *rootGroup_; 47 | CDRExampleGroup *currentGroup_; 48 | NSString *fileName_; 49 | CDRSymbolicator *symbolicator_; 50 | } 51 | 52 | @property (nonatomic, retain) CDRExampleGroup *currentGroup, *rootGroup; 53 | @property (nonatomic, retain) NSString *fileName; 54 | @property (nonatomic, retain) CDRSymbolicator *symbolicator; 55 | 56 | - (void)defineBehaviors; 57 | - (void)markAsFocusedClosestToLineNumber:(NSUInteger)lineNumber; 58 | - (NSArray *)allChildren; 59 | @end 60 | 61 | @interface CDRSpec (XCTestSupport) 62 | - (id)testSuiteWithRandomSeed:(unsigned int)seed dispatcher:(CDRReportDispatcher *)dispatcher; 63 | @end 64 | 65 | @interface CDRSpec (SpecDeclaration) 66 | - (void)declareBehaviors; 67 | @end 68 | 69 | #define SPEC_BEGIN(name) \ 70 | @interface name : CDRSpec \ 71 | @end \ 72 | @implementation name \ 73 | - (void)declareBehaviors { \ 74 | self.fileName = [NSString stringWithUTF8String:__FILE__]; 75 | 76 | #define SPEC_END \ 77 | } \ 78 | @end 79 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/CDRSpecFailure.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface CDRSpecFailure : NSException { 4 | NSString *fileName_; 5 | int lineNumber_; 6 | NSArray *callStackReturnAddresses_; 7 | } 8 | 9 | @property (nonatomic, retain, readonly) NSString *fileName; 10 | @property (nonatomic, assign, readonly) int lineNumber; 11 | @property (copy, readonly) NSArray *callStackReturnAddresses; 12 | 13 | + (id)specFailureWithReason:(NSString *)reason; 14 | + (id)specFailureWithReason:(NSString *)reason fileName:(NSString *)fileName lineNumber:(int)lineNumber; 15 | + (id)specFailureWithRaisedObject:(NSObject *)object; 16 | 17 | - (id)initWithReason:(NSString *)reason; 18 | - (id)initWithReason:(NSString *)reason fileName:(NSString *)fileName lineNumber:(int)lineNumber; 19 | - (id)initWithRaisedObject:(NSObject *)object; 20 | 21 | - (NSString *)callStackSymbolicatedSymbols:(NSError **)error; 22 | 23 | @end 24 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/CDRSpecHelper.h: -------------------------------------------------------------------------------- 1 | #import "CDRSpec.h" 2 | #import "CDRHooks.h" 3 | #import "CDRSharedExampleGroupPool.h" 4 | #import "CDRExampleParent.h" 5 | 6 | @interface CDRSpecHelper : NSObject { 7 | NSMutableDictionary *sharedExampleContext_, *sharedExampleGroups_; 8 | NSArray *globalBeforeEachClasses_, *globalAfterEachClasses_; 9 | BOOL shouldOnlyRunFocused_; 10 | } 11 | 12 | @property (nonatomic, retain, readonly) NSMutableDictionary *sharedExampleContext; 13 | @property (nonatomic, retain) NSArray *globalBeforeEachClasses, *globalAfterEachClasses; 14 | 15 | @property (nonatomic, assign) BOOL shouldOnlyRunFocused; 16 | 17 | + (CDRSpecHelper *)specHelper; 18 | 19 | @end 20 | 21 | @compatibility_alias SpecHelper CDRSpecHelper; 22 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/CDRSpy.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CedarDouble.h" 3 | 4 | @interface CDRSpy : NSProxy 5 | 6 | + (void)interceptMessagesForInstance:(id)instance; 7 | + (void)stopInterceptingMessagesForInstance:(id)instance; 8 | 9 | @end 10 | 11 | namespace Cedar { namespace Doubles { 12 | inline void CDR_spy_on(id instance) { 13 | [CDRSpy interceptMessagesForInstance:instance]; 14 | } 15 | 16 | inline void CDR_stop_spying_on(id instance) { 17 | [CDRSpy stopInterceptingMessagesForInstance:instance]; 18 | } 19 | }} 20 | 21 | #ifndef CEDAR_DOUBLES_COMPATIBILITY_MODE 22 | #define spy_on(x) CDR_spy_on((x)) 23 | #define stop_spying_on(x) CDR_stop_spying_on((x)) 24 | #endif 25 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/CDRSpyInfo.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class CedarDoubleImpl; 4 | 5 | @interface CDRSpyInfo : NSObject 6 | 7 | @property (nonatomic, assign) Class publicClass; 8 | @property (nonatomic, assign) Class spiedClass; 9 | @property (nonatomic, retain) CedarDoubleImpl *cedarDouble; 10 | 11 | + (void)storeSpyInfoForObject:(id)object; 12 | + (BOOL)clearSpyInfoForObject:(id)object; 13 | 14 | + (CDRSpyInfo *)spyInfoForObject:(id)object; 15 | + (CedarDoubleImpl *)cedarDoubleForObject:(id)object; 16 | + (Class)publicClassForObject:(id)object; 17 | 18 | - (IMP)impForSelector:(SEL)selector; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/CDRSymbolicator.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NSUInteger CDRCallerStackAddress(); 4 | 5 | extern NSString *kCDRSymbolicatorErrorDomain; 6 | extern NSString *kCDRSymbolicatorErrorMessageKey; 7 | 8 | typedef enum { 9 | kCDRSymbolicatorErrorNotAvailable = 100, 10 | kCDRSymbolicatorErrorNotSuccessful, 11 | kCDRSymbolicatorErrorNoAddresses, 12 | } kCDRSymbolicatorError; 13 | 14 | @interface CDRSymbolicator : NSObject 15 | - (BOOL)symbolicateAddresses:(NSArray *)addresses error:(NSError **)error; 16 | - (NSString *)fileNameForStackAddress:(NSUInteger)address; 17 | - (NSUInteger)lineNumberForStackAddress:(NSUInteger)address; 18 | @end 19 | 20 | 21 | @interface CDRAtosTask : NSObject { 22 | NSString *executablePath_; 23 | long slide_; 24 | NSArray *addresses_; 25 | NSArray *outputLines_; 26 | } 27 | 28 | @property (retain, nonatomic) NSString *executablePath; 29 | @property (assign, nonatomic) long slide; 30 | @property (retain, nonatomic) NSArray *addresses; 31 | 32 | - (id)initWithExecutablePath:(NSString *)executablePath slide:(long)slide addresses:(NSArray *)addresses; 33 | - (void)launch; 34 | - (void)valuesOnLineNumber:(NSUInteger)line fileName:(NSString **)fileName lineNumber:(NSNumber **)lineNumber; 35 | @end 36 | 37 | @interface CDRAtosTask (CurrentTestExecutable) 38 | + (CDRAtosTask *)taskForCurrentTestExecutable; 39 | @end 40 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/CDRVersion.h: -------------------------------------------------------------------------------- 1 | NSString *CDRVersion = @"0.11.2"; 2 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/Cedar-iOS.h: -------------------------------------------------------------------------------- 1 | #import "Cedar.h" 2 | #import "CedarApplicationDelegate.h" 3 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/Cedar.h: -------------------------------------------------------------------------------- 1 | #import "CDRFunctions.h" 2 | #import "CDRSpecHelper.h" 3 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/CedarApplicationDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | // In some cases CDRIPhoneOTestRunner needs to spin up an instance of Cedar app. 4 | // It appears that SenTestingKit fails to start up the test when CedarApplicationDelegate 5 | // is used. Solution is to use a subclass of UIApplicaton. 6 | @interface CedarApplication : UIApplication 7 | @end 8 | 9 | // Needed for backwards compatibility with existing projects using CedarApplicationDelegate 10 | @interface CedarApplicationDelegate : NSObject 11 | @end 12 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/CedarComparators.h: -------------------------------------------------------------------------------- 1 | #import "ComparatorsBase.h" 2 | #import "ComparatorsContainer.h" 3 | 4 | #if TARGET_OS_IPHONE 5 | #import "UIKitComparatorsContainer.h" 6 | #endif 7 | 8 | #import "ComparatorsContainerConvenience.h" 9 | 10 | #ifdef CEDAR_CUSTOM_COMPARATORS 11 | #import CEDAR_CUSTOM_COMPARATORS 12 | #endif 13 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/CedarDouble.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | namespace Cedar { namespace Doubles { 4 | class StubbedMethod; 5 | class RejectedMethod; 6 | }} 7 | 8 | @protocol CedarDouble 9 | 10 | - (Cedar::Doubles::StubbedMethod &)add_stub:(const Cedar::Doubles::StubbedMethod &)stubbed_method; 11 | - (void)reject_method:(const Cedar::Doubles::RejectedMethod &)rejected_method; 12 | 13 | - (NSArray *)sent_messages; 14 | - (void)reset_sent_messages; 15 | 16 | - (BOOL)can_stub:(SEL)selector; 17 | - (BOOL)has_stubbed_method_for:(SEL)selector; 18 | - (BOOL)has_rejected_method_for:(SEL)selector; 19 | 20 | @end 21 | 22 | namespace Cedar { namespace Doubles { 23 | 24 | struct MethodStubbingMarker { 25 | const char *fileName; 26 | int lineNumber; 27 | }; 28 | 29 | id operator,(id, const MethodStubbingMarker &); 30 | 31 | void operator,(id, const StubbedMethod &); 32 | void operator,(id, const RejectedMethod &); 33 | }} 34 | 35 | #ifndef CEDAR_MATCHERS_DISALLOW_STUB_METHOD 36 | #define stub_method(x) ,(Cedar::Doubles::MethodStubbingMarker){__FILE__, __LINE__},Cedar::Doubles::StubbedMethod((x)) 37 | #define reject_method(x) ,(Cedar::Doubles::MethodStubbingMarker){__FILE__, __LINE__},Cedar::Doubles::RejectedMethod((x)) 38 | #endif 39 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/CedarDoubleImpl.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "CedarDouble.h" 3 | #import "StubbedMethod.h" 4 | #import "RejectedMethod.h" 5 | 6 | typedef enum { 7 | CDRStubMethodNotStubbed = 0, 8 | CDRStubMethodInvoked, 9 | CDRStubWrongArguments, 10 | } CDRStubInvokeStatus; 11 | 12 | @interface CedarDoubleImpl : NSObject 13 | 14 | + (void)afterEach; 15 | 16 | - (id)initWithDouble:(NSObject *)parent_double; 17 | 18 | - (CDRStubInvokeStatus)invoke_stubbed_method:(NSInvocation *)invocation; 19 | - (void)record_method_invocation:(NSInvocation *)invocation; 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/CedarDoubles.h: -------------------------------------------------------------------------------- 1 | #import "CDRSpy.h" 2 | #import "CDRFake.h" 3 | #import "CDRClassFake.h" 4 | #import "CDRProtocolFake.h" 5 | #import "HaveReceived.h" 6 | #import "StubbedMethod.h" 7 | #import "RejectedMethod.h" 8 | 9 | #import "Argument.h" 10 | #import "AnyArgument.h" 11 | #import "ValueArgument.h" 12 | #import "AnyInstanceOfClassArgument.h" 13 | #import "AnyInstanceConformingToProtocolArgument.h" 14 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/CedarMatchers.h: -------------------------------------------------------------------------------- 1 | // Base 2 | #import "Equal.h" 3 | #import "BeTruthy.h" 4 | #import "BeFalsy.h" 5 | #import "BeNil.h" 6 | #import "BeCloseTo.h" 7 | #import "BeSameInstanceAs.h" 8 | #import "BeInstanceOf.h" 9 | #import "BeGreaterThan.h" 10 | #import "BeGTE.h" 11 | #import "BeLessThan.h" 12 | #import "BeLTE.h" 13 | #import "RaiseException.h" 14 | #import "RespondTo.h" 15 | #import "ConformTo.h" 16 | 17 | // Container 18 | #import "BeEmpty.h" 19 | #import "AnInstanceOf.h" 20 | #import "Contain.h" 21 | 22 | // Verifiers 23 | #import "Exist.h" 24 | 25 | #ifdef CEDAR_CUSTOM_MATCHERS 26 | #import CEDAR_CUSTOM_MATCHERS 27 | #endif 28 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/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 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/ComparatorsBase.h: -------------------------------------------------------------------------------- 1 | #import "CompareEqual.h" 2 | #import "CompareGreaterThan.h" 3 | #import "CompareCloseTo.h" 4 | 5 | #if TARGET_OS_IPHONE 6 | #import "UIGeometryCompareEqual.h" 7 | #else 8 | #import "OSXGeometryCompareEqual.h" 9 | #endif 10 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/ComparatorsContainerConvenience.h: -------------------------------------------------------------------------------- 1 | namespace Cedar { namespace Matchers { namespace Comparators { 2 | template 3 | bool compare_contains(const T & container, const U & element, contains_options options) { 4 | return compare_contains(container, element, options, [](const U & lhs, const U & rhs) { return compare_equal(lhs, rhs); }); 5 | } 6 | }}} 7 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/CompareCloseTo.h: -------------------------------------------------------------------------------- 1 | #import "CDRSpecFailure.h" 2 | 3 | namespace Cedar { namespace Matchers { namespace Comparators { 4 | inline bool compare_close_to(const double actualValue, const double expectedValue, const double threshold) { 5 | return actualValue > expectedValue - threshold && actualValue < expectedValue + threshold; 6 | } 7 | 8 | inline bool compare_close_to(const NSDecimal & actualValue, const NSDecimal & expectedValue, const double threshold) { 9 | NSDecimal decimalThreshold = [@(threshold) decimalValue]; 10 | NSDecimal maxExpectedValue; 11 | NSDecimal minExpectedValue; 12 | NSDecimalAdd(&maxExpectedValue, &expectedValue, &decimalThreshold, NSRoundPlain); 13 | NSDecimalSubtract(&minExpectedValue, &expectedValue, &decimalThreshold, NSRoundPlain); 14 | return NSDecimalCompare(&actualValue, &minExpectedValue) != NSOrderedAscending && NSDecimalCompare(&actualValue, &maxExpectedValue) != NSOrderedDescending; 15 | } 16 | 17 | inline bool compare_close_to(const id actualValue, const id expectedValue, const double threshold) { 18 | if ([expectedValue isKindOfClass:[NSNumber class]] && [actualValue isKindOfClass:[NSNumber class]]) { 19 | return compare_close_to([actualValue decimalValue], [expectedValue decimalValue], threshold); 20 | } 21 | if ([expectedValue isKindOfClass:[NSDate class]] && [actualValue isKindOfClass:[NSDate class]]) { 22 | return compare_close_to([actualValue timeIntervalSince1970], [expectedValue timeIntervalSince1970], threshold); 23 | } 24 | 25 | NSString *reason = [NSString stringWithFormat:@"Actual value <%@> (%@) is not a numeric value (NSNumber, NSDate, float, etc.)", 26 | actualValue, NSStringFromClass([actualValue class])]; 27 | [[CDRSpecFailure specFailureWithReason:reason] raise]; 28 | return false; 29 | } 30 | }}} 31 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/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 NSDecimal 16 | inline bool compare_equal(const NSDecimal & actualValue, const NSDecimal & expectedValue) { 17 | return NSOrderedSame == NSDecimalCompare(&actualValue, &expectedValue); 18 | } 19 | 20 | #pragma mark C Strings 21 | template 22 | bool compare_equal(char *actualValue, const U & expectedValue) { 23 | return strcmp(actualValue, expectedValue) == 0; 24 | } 25 | 26 | template 27 | bool compare_equal(const char *actualValue, const U & expectedValue) { 28 | return strcmp(actualValue, expectedValue) == 0; 29 | } 30 | 31 | #pragma mark NSRange 32 | template 33 | bool compare_equal(const NSRange actualValue, const U & expectedValue) { 34 | return NSEqualRanges(actualValue, expectedValue); 35 | } 36 | }}} 37 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/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 | 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 | id actualValueObject = [actualValueId nonretainedObjectValue]; 10 | id expectedValueObject = [expectedValueId nonretainedObjectValue]; 11 | if ([actualValueObject respondsToSelector:@selector(compare:)]) { 12 | return NSOrderedDescending == [actualValueObject compare:expectedValueObject]; 13 | } else if ([expectedValueObject respondsToSelector:@selector(compare:)]) { 14 | return NSOrderedAscending == [expectedValueObject compare:actualValueObject]; 15 | } 16 | return false; 17 | } else { 18 | return actualValue > expectedValue; 19 | } 20 | } 21 | 22 | #pragma mark NSDecimal 23 | inline bool compare_greater_than(const NSDecimal & actualValue, const NSDecimal & expectedValue) { 24 | return NSOrderedDescending == NSDecimalCompare(&actualValue, &expectedValue); 25 | } 26 | }}} 27 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/ConformTo.h: -------------------------------------------------------------------------------- 1 | #import "Base.h" 2 | 3 | #pragma mark - private interface 4 | namespace Cedar { namespace Matchers { namespace Private { 5 | 6 | class ConformTo : public Base<> { 7 | private: 8 | ConformTo & operator=(const ConformTo &); 9 | 10 | public: 11 | explicit ConformTo(const char *); 12 | ConformTo(Protocol *protocol); 13 | ~ConformTo(); 14 | // Allow default copy ctor. 15 | 16 | bool matches(const id) const; 17 | 18 | protected: 19 | virtual NSString * failure_message_end() const; 20 | 21 | private: 22 | const char *expectedProtocolName_; 23 | }; 24 | }}} 25 | 26 | #pragma mark - public interface 27 | namespace Cedar { namespace Matchers { 28 | using CedarConformTo = Cedar::Matchers::Private::ConformTo; 29 | inline CedarConformTo conform_to(Protocol *protocol) { 30 | return CedarConformTo(protocol); 31 | } 32 | 33 | inline CedarConformTo conform_to(const char *protocolName) { 34 | return CedarConformTo(protocolName); 35 | } 36 | }} 37 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/Exist.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "Base.h" 3 | 4 | #pragma mark - private interface 5 | namespace Cedar { namespace Matchers { namespace Private { 6 | class Exist : public Base<> { 7 | public: 8 | virtual NSString * failure_message_end() const { 9 | return @"exist on the local filesystem"; 10 | } 11 | 12 | template 13 | bool matches(T * const &) const; 14 | 15 | bool matches(NSString * const path) const { 16 | return [[NSFileManager defaultManager] fileExistsAtPath:path]; 17 | } 18 | 19 | bool matches(NSURL * const URL) const { 20 | return matches([URL path]); 21 | } 22 | }; 23 | }}} 24 | 25 | #pragma mark - public interface 26 | namespace Cedar { namespace Matchers { 27 | using CedarExist = Cedar::Matchers::Private::Exist; 28 | static const CedarExist exist = CedarExist(); 29 | }} 30 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/InvocationMatcher.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "ValueArgument.h" 3 | 4 | namespace Cedar { namespace Doubles { 5 | 6 | class InvocationMatcher { 7 | public: 8 | typedef std::vector arguments_vector_t; 9 | enum { OBJC_DEFAULT_ARGUMENT_COUNT = 2 }; 10 | 11 | public: 12 | InvocationMatcher(const SEL); 13 | virtual ~InvocationMatcher() {} 14 | 15 | void add_argument(const Argument::shared_ptr_t argument); 16 | template 17 | void add_argument(const T &); 18 | 19 | bool matches(NSInvocation * const) const; 20 | NSString *mismatch_reason(); 21 | 22 | const SEL selector() const { return expectedSelector_; } 23 | const arguments_vector_t & arguments() const { return arguments_; } 24 | const bool match_any_arguments() const { return arguments_.empty(); } 25 | void verify_count_and_types_of_arguments(id instance) const; 26 | 27 | private: 28 | bool matches_arguments(NSInvocation * const) const; 29 | NSMethodSignature *method_signature_for_instance(id instance) const; 30 | void compare_argument_count_to_method_signature(NSMethodSignature * const methodSignature) const; 31 | void compare_argument_types_to_method_signature(NSMethodSignature * const methodSignature) const; 32 | 33 | private: 34 | const SEL expectedSelector_; 35 | arguments_vector_t arguments_; 36 | }; 37 | 38 | template 39 | void InvocationMatcher::add_argument(const T & value) { 40 | this->add_argument(Argument::shared_ptr_t(new ValueArgument(value))); 41 | } 42 | 43 | }} 44 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/NSInvocation+Cedar.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface NSInvocation (Cedar) 4 | 5 | - (void)copyBlockArguments; 6 | - (NSInvocation *)invocationWithoutCmdArgument; 7 | - (void)invokeUsingBlockWithoutSelfArgument:(id)block; 8 | 9 | - (NSArray *)arguments; 10 | 11 | @end 12 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/NSMethodSignature+Cedar.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface NSMethodSignature (Cedar) 4 | 5 | + (NSMethodSignature *)signatureFromBlock:(id)block; 6 | - (NSMethodSignature *)signatureWithoutSelectorArgument; 7 | 8 | @end 9 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/RaiseException.h: -------------------------------------------------------------------------------- 1 | #import "Base.h" 2 | #import 3 | 4 | #pragma mark - private interface 5 | namespace Cedar { namespace Matchers { namespace Private { 6 | 7 | typedef void (^empty_block_t)(); 8 | 9 | struct RaiseExceptionMessageBuilder { 10 | static NSString * string_for_actual_value(empty_block_t value) { 11 | return [value description]; 12 | } 13 | }; 14 | 15 | class RaiseException : public Base { 16 | private: 17 | RaiseException & operator=(const RaiseException &); 18 | 19 | public: 20 | explicit RaiseException(NSObject * = nil, Class = nil, bool = false, NSString * = nil, NSString * = nil); 21 | ~RaiseException(); 22 | // Allow default copy ctor. 23 | 24 | RaiseException operator()() const; 25 | RaiseException operator()(Class) const; 26 | RaiseException operator()(NSObject *) const; 27 | 28 | RaiseException & or_subclass(); 29 | 30 | RaiseException & with_reason(NSString * const reason); 31 | RaiseException with_reason(NSString * const reason) const; 32 | 33 | RaiseException & with_name(NSString * const name); 34 | RaiseException with_name(NSString * const name) const; 35 | 36 | bool matches(empty_block_t) const; 37 | 38 | protected: 39 | virtual NSString * failure_message_end() const; 40 | 41 | private: 42 | bool exception_matches_expected_class(NSObject * const exception) const; 43 | bool exception_matches_expected_instance(NSObject * const exception) const; 44 | bool exception_matches_expected_reason(NSObject * const exception) const; 45 | bool exception_matches_expected_name(NSObject * const exception) const; 46 | 47 | private: 48 | const NSObject *expectedExceptionInstance_; 49 | const Class expectedExceptionClass_; 50 | bool allowSubclasses_; 51 | NSString *expectedReason_; 52 | NSString *expectedName_; 53 | }; 54 | }}} 55 | 56 | #pragma mark - public interface 57 | namespace Cedar { namespace Matchers { 58 | using CedarRaiseException = Cedar::Matchers::Private::RaiseException; 59 | static const CedarRaiseException raise_exception; 60 | }} 61 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/RejectedMethod.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import 4 | #import "InvocationMatcher.h" 5 | #import "Argument.h" 6 | #import "ReturnValue.h" 7 | 8 | namespace Cedar { namespace Doubles { 9 | 10 | class RejectedMethod : private InvocationMatcher { 11 | 12 | private: 13 | RejectedMethod & operator=(const RejectedMethod &); 14 | 15 | public: 16 | RejectedMethod(SEL); 17 | RejectedMethod(const char *); 18 | 19 | const SEL selector() const; 20 | }; 21 | }} 22 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/RespondTo.h: -------------------------------------------------------------------------------- 1 | #import "Base.h" 2 | 3 | #pragma mark - private interface 4 | namespace Cedar { namespace Matchers { namespace Private { 5 | 6 | class RespondTo : public Base<> { 7 | private: 8 | RespondTo & operator=(const RespondTo &); 9 | 10 | public: 11 | explicit RespondTo(const char *); 12 | RespondTo(SEL selector); 13 | ~RespondTo(); 14 | // Allow default copy ctor. 15 | 16 | bool matches(const id) const; 17 | 18 | protected: 19 | virtual NSString * failure_message_end() const; 20 | 21 | private: 22 | const char *expectedSelectorName_; 23 | }; 24 | }}} 25 | 26 | #pragma mark - public interface 27 | namespace Cedar { namespace Matchers { 28 | using CedarRespondTo = Cedar::Matchers::Private::RespondTo; 29 | 30 | inline CedarRespondTo respond_to(const SEL selector) { 31 | return CedarRespondTo(selector); 32 | } 33 | 34 | inline CedarRespondTo respond_to(const char *selectorName) { 35 | return CedarRespondTo(selectorName); 36 | } 37 | }} 38 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/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 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/StringifiersBase.h: -------------------------------------------------------------------------------- 1 | #import 2 | #include 3 | 4 | namespace Cedar { namespace Matchers { namespace Stringifiers { 5 | NSString * object_description_for(const void *objectValue); 6 | 7 | template 8 | NSString * string_for(const U & value) { 9 | if (0 == strncmp(@encode(U), "@", 1)) { 10 | return object_description_for(&value); 11 | } else { 12 | std::stringstream temp; 13 | temp << value; 14 | return [NSString stringWithCString:temp.str().c_str() encoding:NSUTF8StringEncoding]; 15 | } 16 | } 17 | 18 | inline NSString * string_for(std::nullptr_t value) { 19 | return @"nil"; 20 | } 21 | 22 | inline NSString * string_for(const char value) { 23 | return string_for(static_cast(value)); 24 | } 25 | 26 | inline NSString * string_for(const Class & value) { 27 | return NSStringFromClass(value); 28 | } 29 | 30 | inline NSString * string_for(const BOOL value) { 31 | return value ? @"YES" : @"NO"; 32 | } 33 | 34 | inline NSString * string_for(NSNumber * const value) { 35 | if (!value) { 36 | return [NSString stringWithFormat:@"%@", value]; 37 | } 38 | 39 | return string_for([value floatValue]); 40 | } 41 | 42 | inline NSString * string_for(const NSDecimal value) { 43 | return NSDecimalString(&value, [NSLocale systemLocale]); 44 | } 45 | 46 | inline NSString * string_for(char *value) { 47 | if (value == NULL) { 48 | return @"NULL"; 49 | } 50 | return [NSString stringWithFormat:@"cstring(%s)", value]; 51 | } 52 | 53 | inline NSString * string_for(const char *value) { 54 | return string_for((char *)value); 55 | } 56 | 57 | inline NSString * string_for(NSRange value) { 58 | return NSStringFromRange(value); 59 | } 60 | 61 | inline NSString * string_for(NSDate *date) { 62 | return [NSString stringWithFormat:@"%@ (%f)", date, [date timeIntervalSince1970]]; 63 | } 64 | }}} 65 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/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 | 16 | NSString * string = string_for(*it); 17 | [result appendString:[NSString stringWithFormat:@"\n %@", string]]; 18 | } 19 | return result; 20 | } 21 | } 22 | 23 | template 24 | NSString * string_for(const typename std::vector & container) { 25 | NSString * delimitedList = comma_and_newline_delimited_list(container); 26 | return [NSString stringWithFormat:@"(%@\n)", delimitedList]; 27 | } 28 | 29 | template 30 | NSString * string_for(const typename std::map & container) { 31 | NSMutableString *result = [NSMutableString stringWithString:@"{"]; 32 | 33 | for (typename std::map::const_iterator it = container.begin(); it != container.end(); ++it) { 34 | NSString * keyString = string_for(it->first); 35 | NSString * valueString = string_for(it->second); 36 | [result appendString:[NSString stringWithFormat:@"\n %@ = %@;", keyString, valueString]]; 37 | } 38 | [result appendString:@"\n}"]; 39 | return result; 40 | } 41 | 42 | template 43 | NSString * string_for(const typename std::set & container) { 44 | NSString * delimitedList = comma_and_newline_delimited_list(container); 45 | return [NSString stringWithFormat:@"{(%@\n)}", delimitedList]; 46 | } 47 | }}} 48 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/UIGeometryCompareEqual.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | #import "ComparatorsBase.h" 5 | #import "UIGeometryStringifiers.h" 6 | 7 | namespace Cedar { namespace Matchers { namespace Comparators { 8 | template 9 | bool compare_equal(CGRect const actualValue, const U & expectedValue) { 10 | return CGRectEqualToRect(actualValue, expectedValue); 11 | } 12 | 13 | template 14 | bool compare_equal(CGSize const actualValue, const U & expectedValue) { 15 | return CGSizeEqualToSize(actualValue, expectedValue); 16 | } 17 | 18 | template 19 | bool compare_equal(CGPoint const actualValue, const U & expectedValue) { 20 | return CGPointEqualToPoint(actualValue, expectedValue); 21 | } 22 | 23 | template 24 | bool compare_equal(UIEdgeInsets const actualValue, const U & expectedValue) { 25 | return UIEdgeInsetsEqualToEdgeInsets(actualValue, expectedValue); 26 | } 27 | 28 | template 29 | bool compare_equal(CGAffineTransform const actualValue, const U & expectedValue) { 30 | return CGAffineTransformEqualToTransform(actualValue, expectedValue); 31 | } 32 | 33 | template 34 | bool compare_equal(UIImage *actualImage, const U & expectedImage) { 35 | return [expectedImage isEqual:actualImage] || [UIImagePNGRepresentation(expectedImage) isEqual:UIImagePNGRepresentation(actualImage)]; 36 | } 37 | }}} 38 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/UIGeometryStringifiers.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "StringifiersBase.h" 3 | 4 | namespace Cedar { namespace Matchers { namespace Stringifiers { 5 | inline NSString * string_for(const CGRect value) { 6 | return NSStringFromCGRect(value); 7 | } 8 | 9 | inline NSString * string_for(const CGSize value) { 10 | return NSStringFromCGSize(value); 11 | } 12 | 13 | inline NSString * string_for(const CGPoint value) { 14 | return NSStringFromCGPoint(value); 15 | } 16 | 17 | inline NSString * string_for(const UIEdgeInsets value) { 18 | return NSStringFromUIEdgeInsets(value); 19 | } 20 | 21 | inline NSString * string_for(const CGAffineTransform value) { 22 | return NSStringFromCGAffineTransform(value); 23 | } 24 | }}} 25 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Headers/UIKitComparatorsContainer.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | namespace Cedar { namespace Matchers { namespace Comparators { 5 | template 6 | bool compare_contains(UIView * const container, const U & element, contains_options options, F comparator) { 7 | return compare_contains(container, element, @"subviews", options, comparator); 8 | } 9 | 10 | template 11 | bool compare_contains(CALayer * const container, const U & element, contains_options options, F comparator) { 12 | return compare_contains(container, element, @"sublayers", options, comparator); 13 | } 14 | }}} 15 | -------------------------------------------------------------------------------- /Specs/Frameworks/Cedar-iOS.framework/Versions/Current/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CDRBuildVersionSHA 6 | 1d27d43597d7b65ac0dba7b1ffb82c45a5672412 7 | CFBundleDevelopmentRegion 8 | English 9 | CFBundleExecutable 10 | ${EXECUTABLE_NAME} 11 | CFBundleIdentifier 12 | io.pivotal.$(PRODUCT_NAME:rfc1034identifier) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 0.11.2 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Specs/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | bobbypins.$(PRODUCT_NAME:rfc1034identifier) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /Specs/Specs-Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | CFBundleDisplayName 5 | 6 | -------------------------------------------------------------------------------- /Specs/Specs-Prefix.pch: -------------------------------------------------------------------------------- 1 | #import 2 | -------------------------------------------------------------------------------- /Specs/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | int main(int argc, char * argv[]) 4 | { 5 | @autoreleasepool { 6 | return UIApplicationMain(argc, argv, nil, @"CedarApplicationDelegate"); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /SuperFold/SuperFold.h: -------------------------------------------------------------------------------- 1 | #import "UIView+Fold.h" -------------------------------------------------------------------------------- /SuperFold/UIView+Fold.h: -------------------------------------------------------------------------------- 1 | // 2 | // UIView+Fold.h 3 | // AnimationDemo 4 | // 5 | // Created by Rachel Bobbins on 1/31/15. 6 | // Copyright (c) 2015 Rachel Bobbins. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | @interface UIView (Fold) 12 | 13 | - (void)foldOpenWithTransparency:(BOOL)withTransparency 14 | withCompletionBlock:(void (^)(void))completionBlock; 15 | 16 | - (void)foldClosedWithTransparency:(BOOL)withTransparency 17 | withCompletionBlock:(void (^)(void))completionBlock; 18 | @end 19 | -------------------------------------------------------------------------------- /Superfold.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | 3 | s.name = "SuperFold" 4 | s.version = "1.1.4" 5 | s.summary = "A clever category for folding and unfolding UIViews" 6 | s.homepage = "https://github.com/rbobbins/animation-demo" 7 | s.author = { "Rachel Bobbins" => "rachelheidi@gmail.com" } 8 | s.platform = :ios 9 | s.ios.deployment_target = "7.0" 10 | s.source = { :git => "https://github.com/rbobbins/animation-demo.git" } 11 | s.source_files = "Superfold", "Superfold/**/*.{h,m}" 12 | 13 | end 14 | -------------------------------------------------------------------------------- /screenshots/fold.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rbobbins/animation-demo/53060507efaf9ec4c84f5abb105213e6a978cdb4/screenshots/fold.png -------------------------------------------------------------------------------- /screenshots/video_demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/rbobbins/animation-demo/53060507efaf9ec4c84f5abb105213e6a978cdb4/screenshots/video_demo.gif --------------------------------------------------------------------------------