Last active
August 29, 2015 14:06
-
-
Save ArtFeel/a28d01727fd3275c4a94 to your computer and use it in GitHub Desktop.
Shorthand for Cedar BeInstanceOf matcher
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// BeInstanceOfShorthand | |
// | |
// Created by Philip Vasilchenko on 25.09.14. | |
// Copyright (c) 2014 Okolodev. All rights reserved. | |
// | |
#import <Cedar/Base.h> | |
namespace Cedar { | |
namespace Matchers { | |
inline BeInstanceOf BeString() { | |
return be_instance_of([NSString class]).or_any_subclass(); | |
} | |
static const BeInstanceOf be_string = BeString(); | |
inline BeInstanceOf BeNumber() { | |
return be_instance_of([NSNumber class]).or_any_subclass(); | |
} | |
static const BeInstanceOf be_number = BeNumber(); | |
inline BeInstanceOf BeArray() { | |
return be_instance_of([NSArray class]).or_any_subclass(); | |
} | |
static const BeInstanceOf be_array = BeArray(); | |
inline BeInstanceOf BeDictionary() { | |
return be_instance_of([NSDictionary class]).or_any_subclass(); | |
} | |
static const BeInstanceOf be_dictionary = BeDictionary(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment