Skip to content

Instantly share code, notes, and snippets.

@ArtFeel
Last active August 29, 2015 14:06
Show Gist options
  • Save ArtFeel/a28d01727fd3275c4a94 to your computer and use it in GitHub Desktop.
Save ArtFeel/a28d01727fd3275c4a94 to your computer and use it in GitHub Desktop.
Shorthand for Cedar BeInstanceOf matcher
//
// 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