├── .gitignore
├── .ruby-version
├── Gemfile
├── Guardfile
├── LICENSE
├── README.md
├── Rakefile
├── bin
└── xcoder
├── examples
├── Cedar
│ ├── Specs
│ │ ├── Specs-Info.plist
│ │ ├── Specs-Prefix.pch
│ │ ├── en.lproj
│ │ │ └── InfoPlist.strings
│ │ └── main.m
│ └── Vendor
│ │ └── Frameworks
│ │ └── Cedar-iPhone.framework
│ │ ├── Cedar-iPhone
│ │ ├── Headers
│ │ ├── Resources
│ │ └── Versions
│ │ ├── A
│ │ ├── Cedar-iPhone
│ │ └── Headers
│ │ │ ├── ActualValue.h
│ │ │ ├── Base.h
│ │ │ ├── BeCloseTo.h
│ │ │ ├── BeEmpty.h
│ │ │ ├── BeGTE.h
│ │ │ ├── BeGreaterThan.h
│ │ │ ├── BeInstanceOf.h
│ │ │ ├── BeLTE.h
│ │ │ ├── BeLessThan.h
│ │ │ ├── BeNil.h
│ │ │ ├── BeSameInstanceAs.h
│ │ │ ├── BeTruthy.h
│ │ │ ├── CDRColorizedReporter.h
│ │ │ ├── CDRExampleBase.h
│ │ │ ├── CDRExampleDetailsViewController.h
│ │ │ ├── CDRExampleParent.h
│ │ │ ├── CDRExampleReporter.h
│ │ │ ├── CDRExampleReporterViewController.h
│ │ │ ├── CDRFunctions.h
│ │ │ ├── CDRSharedExampleGroupPool.h
│ │ │ ├── CDRSpec.h
│ │ │ ├── CDRSpecFailure.h
│ │ │ ├── Cedar.h
│ │ │ ├── CedarApplicationDelegate.h
│ │ │ ├── CedarComparators.h
│ │ │ ├── CedarMatchers.h
│ │ │ ├── CedarStringifiers.h
│ │ │ ├── ComparatorsBase.h
│ │ │ ├── ComparatorsContainer.h
│ │ │ ├── CompareEqual.h
│ │ │ ├── CompareGreaterThan.h
│ │ │ ├── Contain.h
│ │ │ ├── Equal.h
│ │ │ ├── RaiseException.h
│ │ │ ├── ShouldSyntax.h
│ │ │ ├── SpecHelper.h
│ │ │ ├── StringifiersBase.h
│ │ │ └── StringifiersContainer.h
│ │ └── Current
├── EGORefreshTableHeaderView
│ └── Vendor
│ │ └── EGORefreshTableHeaderView
│ │ ├── EGORefreshTableHeaderView.h
│ │ └── EGORefreshTableHeaderView.m
└── Reachability
│ └── Vendor
│ └── Reachability
│ ├── Reachability.h
│ └── Reachability.m
├── lib
├── xcode
│ ├── build_file.rb
│ ├── build_phase.rb
│ ├── builder.rb
│ ├── builder
│ │ ├── base_builder.rb
│ │ ├── build_parser.rb
│ │ ├── project_target_config_builder.rb
│ │ └── scheme_builder.rb
│ ├── buildspec.rb
│ ├── configuration.rb
│ ├── configuration_list.rb
│ ├── configuration_owner.rb
│ ├── configurations
│ │ ├── array_property.rb
│ │ ├── boolean_property.rb
│ │ ├── enumeration_property.rb
│ │ ├── key_value_array_property.rb
│ │ ├── space_delimited_string_property.rb
│ │ ├── string_property.rb
│ │ └── targeted_device_family_property.rb
│ ├── container_item_proxy.rb
│ ├── core_ext
│ │ ├── array.rb
│ │ ├── boolean.rb
│ │ ├── fixnum.rb
│ │ ├── hash.rb
│ │ └── string.rb
│ ├── deploy
│ │ ├── ftp.rb
│ │ ├── kickfolio.rb
│ │ ├── s3.rb
│ │ ├── ssh.rb
│ │ ├── templates
│ │ │ ├── index.rhtml
│ │ │ └── manifest.rhtml
│ │ ├── testflight.rb
│ │ └── web_assets.rb
│ ├── file_reference.rb
│ ├── group.rb
│ ├── info_plist.rb
│ ├── keychain.rb
│ ├── parsers
│ │ └── plutil_project_parser.rb
│ ├── platform.rb
│ ├── project.rb
│ ├── project_reference.rb
│ ├── provisioning_profile.rb
│ ├── registry.rb
│ ├── resource.rb
│ ├── scheme.rb
│ ├── shell
│ │ └── command.rb
│ ├── simple_identifier_generator.rb
│ ├── target.rb
│ ├── target_dependency.rb
│ ├── terminal_output.rb
│ ├── test
│ │ ├── formatters
│ │ │ ├── junit_formatter.rb
│ │ │ └── stdout_formatter.rb
│ │ ├── parsers
│ │ │ ├── kif_parser.rb
│ │ │ └── ocunit_parser.rb
│ │ ├── report.rb
│ │ └── report
│ │ │ ├── suite_result.rb
│ │ │ └── test_result.rb
│ ├── variant_group.rb
│ ├── version.rb
│ └── workspace.rb
├── xcoder.rb
└── xcoder
│ └── rake_task.rb
├── spec
├── Provisioning
│ ├── AdHoc.mobileprovision
│ ├── AppStore.mobileprovision
│ ├── Test.keychain
│ └── TestUser.p12
├── TestProject
│ ├── ApplicationTests
│ │ ├── ApplicationTests-Info.plist
│ │ ├── ApplicationTests-Prefix.pch
│ │ ├── ApplicationTests.h
│ │ ├── ApplicationTests.m
│ │ └── en.lproj
│ │ │ └── InfoPlist.strings
│ ├── Buildfile
│ ├── Default-568h@2x.png
│ ├── LogicTests
│ │ ├── AnotherTest.h
│ │ ├── AnotherTest.m
│ │ ├── TestProjectTests-Info.plist
│ │ ├── TestProjectTests.h
│ │ ├── TestProjectTests.m
│ │ └── en.lproj
│ │ │ └── InfoPlist.strings
│ ├── TestProject.xcodeproj
│ │ ├── project.pbxproj
│ │ └── xcshareddata
│ │ │ └── xcschemes
│ │ │ └── TestProject.xcscheme
│ └── TestProject
│ │ ├── AppDelegate.h
│ │ ├── AppDelegate.m
│ │ ├── TestProject-Info.plist
│ │ ├── TestProject-Prefix.pch
│ │ ├── en.lproj
│ │ └── InfoPlist.strings
│ │ └── main.m
├── TestWorkspace.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── WorkspaceScheme.xcscheme
├── TestWorkspace2.xcworkspace
│ └── contents.xcworkspacedata
├── build_phase_spec.rb
├── builder_spec.rb
├── configuration_list_spec.rb
├── configuration_spec.rb
├── deploy_spec.rb
├── group_spec.rb
├── integration
│ ├── builder_spec.rb
│ ├── cedar_install_spec.rb
│ ├── pull_to_refresh_install_spec.rb
│ ├── reachability_install_spec.rb
│ └── universal_framework_spec.rb
├── keychain_spec.rb
├── ocunit_parser_spec.rb
├── parsers
│ ├── plutil_project_parser.rb
│ └── spec_helper.rb
├── project_spec.rb
├── provisioning_profile_spec.rb
├── registry_spec.rb
├── scheme_spec.rb
├── spec_helper.rb
├── target_spec.rb
├── workspace_spec.rb
└── xcode_spec.rb
└── xcoder.gemspec
/.gitignore:
--------------------------------------------------------------------------------
1 | # Mac
2 | .DS_Store
3 |
4 | # Dependency management
5 |
6 | .bundle
7 | Gemfile.lock
8 |
9 | # Documentation
10 |
11 | .yardoc
12 | doc/
13 |
14 | # Gem creation and packaging
15 |
16 | pkg/*
17 | *.gem
18 |
19 | # Tests and Test Related Files
20 |
21 | spec/TestProject/TestProject.xcodeproj/xcuserdata
22 | spec/TestProject/TestProject.xcodeproj/project.xcworkspace/
23 | spec/TestProject/build
24 | spec/test-reports
25 |
26 | # local vendor/bundle
27 | vendor/bundle/*
28 |
29 | # RubyMine project
30 | .idea/*
31 |
32 |
--------------------------------------------------------------------------------
/.ruby-version:
--------------------------------------------------------------------------------
1 | 2.0.0
2 |
--------------------------------------------------------------------------------
/Gemfile:
--------------------------------------------------------------------------------
1 | source "http://rubygems.org"
2 |
3 | gemspec
4 | gem 'rake'
5 |
6 | gem 'builder'
7 | gem 'multi_json'
8 | gem 'plist'
9 | gem 'rest-client'
10 |
11 | # Documentation
12 | gem 'yard'
13 | gem 'redcarpet'
14 |
15 | # Deployment
16 | gem 'net-ssh'
17 | gem 'net-scp'
18 | gem 'aws-sdk'
19 |
20 | group :test do
21 | gem 'rspec'
22 | gem 'guard'
23 | gem 'guard-rspec'
24 | end
25 |
--------------------------------------------------------------------------------
/Guardfile:
--------------------------------------------------------------------------------
1 | # A sample Guardfile
2 | # More info at https://github.com/guard/guard#readme
3 |
4 | guard 'rspec', :version => 2, :cli => "--color --format d --tag ~integration" do
5 |
6 | watch(%r{^spec/.+_spec\.rb$})
7 | # As the registry and resource file affect most every file, the entire
8 | # suite should be run when they are changed
9 | watch(%r{^lib/xcode/(?:registry|resource)\.rb$}) { "spec" }
10 | watch(%r{^lib/xcode/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
11 | watch('spec/spec_helper.rb') { "spec" }
12 |
13 | end
14 |
15 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2012 cisimple
2 |
3 | MIT License
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining
6 | a copy of this software and associated documentation files (the
7 | "Software"), to deal in the Software without restriction, including
8 | without limitation the rights to use, copy, modify, merge, publish,
9 | distribute, sublicense, and/or sell copies of the Software, and to
10 | permit persons to whom the Software is furnished to do so, subject to
11 | the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be
14 | included in all copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23 |
24 |
--------------------------------------------------------------------------------
/Rakefile:
--------------------------------------------------------------------------------
1 | require "bundler/gem_tasks"
2 | require "yard"
3 | require "yard/rake/yardoc_task"
4 |
5 | task :default => [:specs, :build]
6 |
7 | desc "Run specs"
8 | task :specs do
9 | system "rspec --color --format d --tag ~integration"
10 | end
11 |
12 | desc "Run integration tests"
13 | task :integration => :reset do
14 | system "rspec --color --format d --tag integration"
15 | end
16 |
17 | namespace :doc do
18 | desc "Generate YARD docs"
19 | YARD::Rake::YardocTask.new(:generate) do |t|
20 | t.files = ['lib/**/*.rb', '-', 'README.md'] # optional
21 | # t.options = ["-o ../xcoder-doc"]
22 | end
23 | end
24 |
25 | task :reset => ['test_project:reset']
26 |
27 | namespace :test_project do
28 |
29 | task :reset do
30 | puts "Reseting the TestProject Project File"
31 | system "git checkout -- spec/TestProject"
32 | puts "Removing any User schemes generated in the project"
33 | system "rm -rf spec/TestProject/TestProject.xcodeproj/xcuserdata"
34 | puts "Removing any installed files"
35 | system "git clean -df spec/TestProject"
36 | end
37 |
38 | end
39 |
40 |
41 | require './lib/xcoder/rake_task'
42 |
43 | Xcode::RakeTask.new :xcode do |xcoder|
44 | xcoder.directory = 'spec'
45 | end
46 |
--------------------------------------------------------------------------------
/bin/xcoder:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env ruby
2 | require 'xcoder'
3 | require 'optparse'
4 |
5 | require 'xcode/buildspec'
6 |
7 | options = {}
8 | OptionParser.new do |opts|
9 | opts.banner = "Usage: xcoder [options]"
10 |
11 |
12 | opts.separator ""
13 | opts.separator "Specific options:"
14 |
15 | opts.on("-d", "--describe", "Dump the structure of the projects/workspaces in the working directory") do |v|
16 | Xcode.workspaces.each do |w|
17 | puts w.describe
18 | end
19 |
20 | Xcode.projects.each do |p|
21 | puts p.describe
22 | end
23 | # options[:verbose] = v
24 | end
25 |
26 | opts.on("--install-profile [PROFILE]", "Install the given profile into ~/Library") do |profile|
27 | Xcode::ProvisioningProfile.new(profile).install
28 | end
29 |
30 | opts.on("--show-sdks", "Show the available SDKs") do
31 | Xcode::Platforms.supported.each do |p|
32 | puts "#{p.name}: #{p.platform}, #{p.version}"
33 | end
34 | end
35 |
36 | opts.separator ""
37 | opts.separator "Buildspec options:"
38 |
39 | opts.on("-r", "--run [task]", "Run the Buildspec with the given task, defaults to 'deploy'") do |task|
40 | Xcode::Buildspec.parse
41 | task = 'deploy' if task.nil?
42 | Rake::Task[task].invoke
43 | end
44 |
45 | opts.on("-T", "--tasks", "List the available Buildspec tasks") do
46 | Xcode::Buildspec.parse
47 | puts Rake.application.tasks
48 | end
49 |
50 | opts.separator ""
51 | opts.separator "Common options:"
52 |
53 | opts.on_tail("-h", "--help", "Show this message") do
54 | puts opts
55 | exit
56 | end
57 |
58 | opts.on_tail("-l", "--loglevel LEVEL", "Show only output at LEVEL or below " + Xcode::TerminalOutput::LEVELS.join(", ")) do |level|
59 | Xcode::TerminalOutput.log_level = level.to_sym
60 | end
61 |
62 | # opts.on_tail("-vv", "Show VERY verbose (debug level) output") do
63 | # Xcode::TerminalOutput.log_level = :debug
64 | # end
65 |
66 | opts.on_tail("-q", "Hide all output except errors (equivilent to -l :error") do
67 | Xcode::TerminalOutput.log_level = :error
68 | end
69 |
70 | opts.on_tail("--version", "Show version") do
71 | puts "Xcoder #{Xcode::VERSION}"
72 | exit
73 | end
74 | end.parse!
--------------------------------------------------------------------------------
/examples/Cedar/Specs/Specs-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleDisplayName
8 | ${PRODUCT_NAME}
9 | CFBundleExecutable
10 | ${EXECUTABLE_NAME}
11 | CFBundleIconFiles
12 |
13 | CFBundleIdentifier
14 | company.${PRODUCT_NAME:rfc1034identifier}
15 | CFBundleInfoDictionaryVersion
16 | 6.0
17 | CFBundleName
18 | ${PRODUCT_NAME}
19 | CFBundlePackageType
20 | APPL
21 | CFBundleShortVersionString
22 | 1.0
23 | CFBundleSignature
24 | ????
25 | CFBundleVersion
26 | 1.0
27 | LSRequiresIPhoneOS
28 |
29 | UIRequiredDeviceCapabilities
30 |
31 | armv7
32 |
33 | UISupportedInterfaceOrientations
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationLandscapeLeft
37 | UIInterfaceOrientationLandscapeRight
38 |
39 | UISupportedInterfaceOrientations~ipad
40 |
41 | UIInterfaceOrientationPortrait
42 | UIInterfaceOrientationPortraitUpsideDown
43 | UIInterfaceOrientationLandscapeLeft
44 | UIInterfaceOrientationLandscapeRight
45 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/examples/Cedar/Specs/Specs-Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header for all source files of the 'Specs' target in the 'Specs' project
3 | //
4 |
5 | #import
6 |
7 | #ifndef __IPHONE_3_0
8 | #warning "This project uses features only available in iOS SDK 3.0 and later."
9 | #endif
10 |
11 | #ifdef __OBJC__
12 | #import
13 | #import
14 | #endif
15 |
--------------------------------------------------------------------------------
/examples/Cedar/Specs/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/examples/Cedar/Specs/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // Specs
4 | //
5 | // Created by Franklin Webber on 2/8/12.
6 | // Copyright (c) 2012 __MyCompanyName__. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | int main(int argc, char *argv[]) {
13 | NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
14 |
15 | int retVal = UIApplicationMain(argc, argv, nil, @"CedarApplicationDelegate");
16 | [pool release];
17 | return retVal;
18 | }
--------------------------------------------------------------------------------
/examples/Cedar/Vendor/Frameworks/Cedar-iPhone.framework/Cedar-iPhone:
--------------------------------------------------------------------------------
1 | Versions/Current/Cedar-iPhone
--------------------------------------------------------------------------------
/examples/Cedar/Vendor/Frameworks/Cedar-iPhone.framework/Headers:
--------------------------------------------------------------------------------
1 | Versions/Current/Headers
--------------------------------------------------------------------------------
/examples/Cedar/Vendor/Frameworks/Cedar-iPhone.framework/Resources:
--------------------------------------------------------------------------------
1 | Versions/Current/Resources
--------------------------------------------------------------------------------
/examples/Cedar/Vendor/Frameworks/Cedar-iPhone.framework/Versions/A/Cedar-iPhone:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/rayh/xcoder/0affa3e8f0a5c138ea25c004341d62b23c6b6711/examples/Cedar/Vendor/Frameworks/Cedar-iPhone.framework/Versions/A/Cedar-iPhone
--------------------------------------------------------------------------------
/examples/Cedar/Vendor/Frameworks/Cedar-iPhone.framework/Versions/A/Headers/ActualValue.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | #import "StringifiersBase.h"
5 | #import "CDRSpecFailure.h"
6 |
7 | namespace Cedar { namespace Matchers {
8 |
9 | void CDR_fail(const char *fileName, int lineNumber, NSString * reason);
10 |
11 | template class ActualValue;
12 |
13 | #pragma mark class ActualValueMatchProxy
14 | template
15 | class ActualValueMatchProxy {
16 | private:
17 | template
18 | ActualValueMatchProxy(const ActualValueMatchProxy &);
19 | template
20 | ActualValueMatchProxy & operator=(const ActualValueMatchProxy &);
21 |
22 | public:
23 | explicit ActualValueMatchProxy(const ActualValue &, bool negate = false);
24 | ActualValueMatchProxy();
25 |
26 | template void operator()(const MatcherType &) const;
27 | ActualValueMatchProxy negate() const;
28 |
29 | private:
30 | const ActualValue & actualValue_;
31 | bool negate_;
32 | };
33 |
34 | template
35 | ActualValueMatchProxy::ActualValueMatchProxy(const ActualValue & actualValue, bool negate /*= false */)
36 | : actualValue_(actualValue), negate_(negate) {}
37 |
38 | template template
39 | void ActualValueMatchProxy::operator()(const MatcherType & matcher) const {
40 | if (negate_) {
41 | actualValue_.execute_negative_match(matcher);
42 | } else {
43 | actualValue_.execute_positive_match(matcher);
44 | }
45 | }
46 |
47 | template
48 | ActualValueMatchProxy ActualValueMatchProxy::negate() const {
49 | return ActualValueMatchProxy(actualValue_, !negate_);
50 | }
51 |
52 | #pragma mark class ActualValue
53 | template
54 | class ActualValue {
55 | private:
56 | template
57 | ActualValue(const ActualValue &);
58 | template
59 | ActualValue & operator=(const ActualValue &);
60 |
61 | public:
62 | explicit ActualValue(const char *, int, const T &);
63 | ~ActualValue();
64 |
65 | ActualValueMatchProxy to;
66 | ActualValueMatchProxy to_not;
67 |
68 | private:
69 | template void execute_positive_match(const MatcherType &) const;
70 | template void execute_negative_match(const MatcherType &) const;
71 | friend class ActualValueMatchProxy;
72 |
73 | private:
74 | const T & value_;
75 | std::string fileName_;
76 | int lineNumber_;
77 | };
78 |
79 | template
80 | ActualValue::ActualValue(const char *fileName, int lineNumber, const T & value) : fileName_(fileName), lineNumber_(lineNumber), value_(value), to(*this), to_not(*this, true) {
81 | }
82 |
83 | template
84 | ActualValue::~ActualValue() {
85 | }
86 |
87 | template template
88 | void ActualValue::execute_positive_match(const MatcherType & matcher) const {
89 | if (!matcher.matches(value_)) {
90 | CDR_fail(fileName_.c_str(), lineNumber_, matcher.failure_message_for(value_));
91 | }
92 | }
93 |
94 | template template
95 | void ActualValue::execute_negative_match(const MatcherType & matcher) const {
96 | if (matcher.matches(value_)) {
97 | CDR_fail(fileName_.c_str(), lineNumber_, matcher.negative_failure_message_for(value_));
98 | }
99 | }
100 |
101 | template
102 | const ActualValue CDR_expect(const char *fileName, int lineNumber, const T & actualValue) {
103 | return ActualValue(fileName, lineNumber, actualValue);
104 | }
105 |
106 | inline void CDR_fail(const char *fileName, int lineNumber, NSString * reason) {
107 | [[CDRSpecFailure specFailureWithReason:reason
108 | fileName:[NSString stringWithUTF8String:fileName]
109 | lineNumber:lineNumber] raise];
110 | }
111 |
112 | }}
113 |
114 | #ifndef CEDAR_MATCHERS_COMPATIBILITY_MODE
115 | #define expect(x) CDR_expect(__FILE__, __LINE__, (x))
116 | #define fail(x) CDR_fail(__FILE__, __LINE__, (x))
117 | #endif
118 |
--------------------------------------------------------------------------------
/examples/Cedar/Vendor/Frameworks/Cedar-iPhone.framework/Versions/A/Headers/Base.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | #import "CedarStringifiers.h"
5 |
6 | namespace Cedar { namespace Matchers {
7 | struct BaseMessageBuilder {
8 | template
9 | static NSString * string_for_actual_value(const U & value) {
10 | return Stringifiers::string_for(value);
11 | }
12 | };
13 |
14 | /**
15 | * Basic functionality for all matchers. Meant to be used as a convenience base class for
16 | * matcher classes.
17 | */
18 | template
19 | class Base {
20 | private:
21 | Base & operator=(const Base &);
22 |
23 | public:
24 | Base();
25 | virtual ~Base() = 0;
26 | // Allow default copy ctor.
27 |
28 | template
29 | NSString * failure_message_for(const U &) const;
30 | template
31 | NSString * negative_failure_message_for(const U &) const;
32 |
33 | protected:
34 | virtual NSString * failure_message_end() const = 0;
35 | };
36 |
37 | template
38 | Base::Base() {}
39 | template
40 | Base::~Base() {}
41 |
42 | template template
43 | NSString * Base::failure_message_for(const U & value) const {
44 | return [NSString stringWithFormat:@"Expected <%@> to %@", MessageBuilder_::string_for_actual_value(value), this->failure_message_end()];
45 | }
46 |
47 | template template
48 | NSString * Base::negative_failure_message_for(const U & value) const {
49 | return [NSString stringWithFormat:@"Expected <%@> to not %@", MessageBuilder_::string_for_actual_value(value), this->failure_message_end()];
50 | }
51 | }}
52 |
--------------------------------------------------------------------------------
/examples/Cedar/Vendor/Frameworks/Cedar-iPhone.framework/Versions/A/Headers/BeCloseTo.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import "Base.h"
3 |
4 | namespace Cedar { namespace Matchers {
5 | template
6 | class BeCloseTo : public Base<> {
7 | private:
8 | BeCloseTo & operator=(const BeCloseTo &);
9 |
10 | public:
11 | explicit BeCloseTo(const T & expectedValue);
12 | ~BeCloseTo();
13 | // Allow default copy ctor.
14 |
15 | BeCloseTo & within(float threshold);
16 |
17 | template
18 | bool matches(const U &) const;
19 | bool matches(NSNumber * const &) const;
20 |
21 | protected:
22 | virtual NSString * failure_message_end() const;
23 |
24 | private:
25 | template
26 | bool subtractable_types_match(const U &, const V &) const;
27 |
28 | private:
29 | const T & expectedValue_;
30 | float threshold_;
31 | };
32 |
33 | template
34 | BeCloseTo be_close_to(const T & expectedValue) {
35 | return BeCloseTo(expectedValue);
36 | }
37 |
38 | template
39 | BeCloseTo::BeCloseTo(const T & expectedValue)
40 | : Base<>(), expectedValue_(expectedValue), threshold_(0.01) {
41 | }
42 |
43 | template
44 | BeCloseTo::~BeCloseTo() {
45 | }
46 |
47 | template
48 | BeCloseTo & BeCloseTo::within(float threshold) {
49 | threshold_ = threshold;
50 | return *this;
51 | }
52 |
53 | template
54 | /*virtual*/ NSString * BeCloseTo::failure_message_end() const {
55 | return [NSString stringWithFormat:@"be close to <%@> (within %@)", Stringifiers::string_for(expectedValue_), Stringifiers::string_for(threshold_)];
56 | }
57 |
58 | template template
59 | bool BeCloseTo::subtractable_types_match(const U & actualValue, const V & expectedValue) const {
60 | return actualValue > expectedValue - threshold_ && actualValue < expectedValue + threshold_;
61 | }
62 |
63 | #pragma mark Generic
64 | template template
65 | bool BeCloseTo::matches(const U & actualValue) const {
66 | return this->subtractable_types_match(actualValue, expectedValue_);
67 | }
68 |
69 | #pragma mark NSNumber
70 | template
71 | bool BeCloseTo::matches(NSNumber * const & actualValue) const {
72 | return this->matches([actualValue floatValue]);
73 | }
74 |
75 | template<> template
76 | bool BeCloseTo::matches(const U & actualValue) const {
77 | return this->subtractable_types_match(actualValue, [expectedValue_ floatValue]);
78 | }
79 | }}
80 |
--------------------------------------------------------------------------------
/examples/Cedar/Vendor/Frameworks/Cedar-iPhone.framework/Versions/A/Headers/BeEmpty.h:
--------------------------------------------------------------------------------
1 | #import "Base.h"
2 |
3 | namespace Cedar { namespace Matchers {
4 | class BeEmpty : public Base<> {
5 | private:
6 | BeEmpty & operator=(const BeEmpty &);
7 |
8 | public:
9 | inline BeEmpty() : Base<>() {}
10 | inline ~BeEmpty() {}
11 | // Allow default copy ctor.
12 |
13 | inline const BeEmpty & operator()() const { return *this; }
14 |
15 | template
16 | bool matches(const U &) const;
17 |
18 | protected:
19 | inline /*virtual*/ NSString * failure_message_end() const { return @"be empty"; }
20 | };
21 |
22 | static const BeEmpty be_empty = BeEmpty();
23 |
24 | #pragma mark Generic
25 | template
26 | bool BeEmpty::matches(const U & actualValue) const {
27 | return Comparators::compare_empty(actualValue);
28 | }
29 | }}
30 |
--------------------------------------------------------------------------------
/examples/Cedar/Vendor/Frameworks/Cedar-iPhone.framework/Versions/A/Headers/BeGTE.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import "Base.h"
3 |
4 | namespace Cedar { namespace Matchers {
5 |
6 | template
7 | class BeGTE : public Base<> {
8 | private:
9 | BeGTE & operator=(const BeGTE &);
10 |
11 | public:
12 | explicit BeGTE(const T & expectedValue);
13 | ~BeGTE();
14 | // Allow default copy ctor.
15 |
16 | template
17 | bool matches(const U &) const;
18 |
19 | protected:
20 | virtual NSString * failure_message_end() const;
21 |
22 | private:
23 | const T & expectedValue_;
24 | };
25 |
26 | template
27 | BeGTE be_gte(const T & expectedValue) {
28 | return BeGTE(expectedValue);
29 | }
30 |
31 | template
32 | BeGTE be_greater_than_or_equal_to(const T & expectedValue) {
33 | return be_gte(expectedValue);
34 | }
35 |
36 | template
37 | BeGTE::BeGTE(const T & expectedValue)
38 | : Base<>(), expectedValue_(expectedValue) {
39 | }
40 |
41 | template
42 | BeGTE::~BeGTE() {
43 | }
44 |
45 | template
46 | /*virtual*/ NSString * BeGTE::failure_message_end() const {
47 | return [NSString stringWithFormat:@"be greater than or equal to <%@>", Stringifiers::string_for(expectedValue_)];
48 | }
49 |
50 | template template
51 | bool BeGTE::matches(const U & actualValue) const {
52 | return Comparators::compare_greater_than(actualValue, expectedValue_) || Comparators::compare_equal(actualValue, expectedValue_);
53 | }
54 |
55 | #pragma mark operators
56 | template
57 | bool operator>=(const ActualValue & actualValue, const U & expectedValue) {
58 | return actualValue.to >= expectedValue;
59 | }
60 |
61 | template
62 | bool operator>=(const ActualValueMatchProxy & actualValueMatchProxy, const U & expectedValue) {
63 | actualValueMatchProxy(be_gte(expectedValue));
64 | return true;
65 | }
66 | }}
67 |
--------------------------------------------------------------------------------
/examples/Cedar/Vendor/Frameworks/Cedar-iPhone.framework/Versions/A/Headers/BeGreaterThan.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import "Base.h"
3 |
4 | namespace Cedar { namespace Matchers {
5 |
6 | template
7 | class BeGreaterThan : public Base<> {
8 | private:
9 | BeGreaterThan & operator=(const BeGreaterThan &);
10 |
11 | public:
12 | explicit BeGreaterThan(const T & expectedValue);
13 | ~BeGreaterThan();
14 | // Allow default copy ctor.
15 |
16 | template
17 | bool matches(const U &) const;
18 |
19 | protected:
20 | virtual NSString * failure_message_end() const;
21 |
22 | private:
23 | const T & expectedValue_;
24 | };
25 |
26 | template
27 | BeGreaterThan be_greater_than(const T & expectedValue) {
28 | return BeGreaterThan(expectedValue);
29 | }
30 |
31 | template
32 | BeGreaterThan::BeGreaterThan(const T & expectedValue)
33 | : Base<>(), expectedValue_(expectedValue) {
34 | }
35 |
36 | template
37 | BeGreaterThan::~BeGreaterThan() {
38 | }
39 |
40 | template
41 | /*virtual*/ NSString * BeGreaterThan::failure_message_end() const {
42 | return [NSString stringWithFormat:@"be greater than <%@>", Stringifiers::string_for(expectedValue_)];
43 | }
44 |
45 | template template
46 | bool BeGreaterThan::matches(const U & actualValue) const {
47 | return Comparators::compare_greater_than(actualValue, expectedValue_);
48 | }
49 |
50 | #pragma mark operators
51 | template
52 | bool operator>(const ActualValue & actualValue, const U & expectedValue) {
53 | return actualValue.to > expectedValue;
54 | }
55 |
56 | template
57 | bool operator>(const ActualValueMatchProxy & actualValueMatchProxy, const U & expectedValue) {
58 | actualValueMatchProxy(be_greater_than(expectedValue));
59 | return true;
60 | }
61 | }}
62 |
--------------------------------------------------------------------------------
/examples/Cedar/Vendor/Frameworks/Cedar-iPhone.framework/Versions/A/Headers/BeInstanceOf.h:
--------------------------------------------------------------------------------
1 | #import "Base.h"
2 |
3 | namespace Cedar { namespace Matchers {
4 | struct BeInstanceOfMessageBuilder {
5 | template
6 | static NSString * string_for_actual_value(const U & value) {
7 | return [NSString stringWithFormat:@"%@ (%@)", value, [value class]];
8 | }
9 | };
10 |
11 | class BeInstanceOf : public Base {
12 | private:
13 | BeInstanceOf & operator=(const BeInstanceOf &);
14 |
15 | public:
16 | explicit BeInstanceOf(const Class expectedValue);
17 | ~BeInstanceOf();
18 | // Allow default copy ctor.
19 |
20 | template
21 | bool matches(const U &) const;
22 |
23 | BeInstanceOf & or_any_subclass();
24 |
25 | protected:
26 | virtual NSString * failure_message_end() const;
27 |
28 | private:
29 | const Class expectedClass_;
30 | bool includeSubclasses_;
31 | };
32 |
33 | inline BeInstanceOf be_instance_of(const Class expectedValue) {
34 | return BeInstanceOf(expectedValue);
35 | }
36 |
37 | inline BeInstanceOf::BeInstanceOf(const Class expectedClass)
38 | : Base(), expectedClass_(expectedClass), includeSubclasses_(false) {}
39 |
40 | inline BeInstanceOf::~BeInstanceOf() {}
41 |
42 | inline BeInstanceOf & BeInstanceOf::or_any_subclass() {
43 | includeSubclasses_ = true;
44 | return *this;
45 | }
46 |
47 | inline /*virtual*/ NSString * BeInstanceOf::failure_message_end() const {
48 | NSMutableString *messageEnd = [NSMutableString stringWithFormat:@"be an instance of class <%@>", expectedClass_];
49 | if (includeSubclasses_) {
50 | [messageEnd appendString:@", or any of its subclasses"];
51 | }
52 | return messageEnd;
53 | }
54 |
55 | #pragma mark Generic
56 | template
57 | bool BeInstanceOf::matches(const U & actualValue) const {
58 | if (includeSubclasses_) {
59 | return [actualValue isKindOfClass:expectedClass_];
60 | } else {
61 | return [actualValue isMemberOfClass:expectedClass_];
62 | }
63 | }
64 | }}
65 |
--------------------------------------------------------------------------------
/examples/Cedar/Vendor/Frameworks/Cedar-iPhone.framework/Versions/A/Headers/BeLTE.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import "Base.h"
3 |
4 | namespace Cedar { namespace Matchers {
5 |
6 | template
7 | class BeLTE : public Base<> {
8 | private:
9 | BeLTE & operator=(const BeLTE &);
10 |
11 | public:
12 | explicit BeLTE(const T & expectedValue);
13 | ~BeLTE();
14 | // Allow default copy ctor.
15 |
16 | template
17 | bool matches(const U &) const;
18 |
19 | protected:
20 | virtual NSString * failure_message_end() const;
21 |
22 | private:
23 | const T & expectedValue_;
24 | };
25 |
26 | template
27 | BeLTE be_lte(const T & expectedValue) {
28 | return BeLTE(expectedValue);
29 | }
30 |
31 | template
32 | BeLTE be_less_than_or_equal_to(const T & expectedValue) {
33 | return be_lte(expectedValue);
34 | }
35 |
36 | template
37 | BeLTE::BeLTE(const T & expectedValue)
38 | : Base<>(), expectedValue_(expectedValue) {
39 | }
40 |
41 | template
42 | BeLTE::~BeLTE() {
43 | }
44 |
45 | template
46 | /*virtual*/ NSString * BeLTE::failure_message_end() const {
47 | return [NSString stringWithFormat:@"be less than or equal to <%@>", Stringifiers::string_for(expectedValue_)];
48 | }
49 |
50 | template template
51 | bool BeLTE::matches(const U & actualValue) const {
52 | return !Comparators::compare_greater_than(actualValue, expectedValue_);
53 | }
54 |
55 | #pragma mark operators
56 | template
57 | bool operator<=(const ActualValue & actualValue, const U & expectedValue) {
58 | return actualValue.to <= expectedValue;
59 | }
60 |
61 | template
62 | bool operator<=(const ActualValueMatchProxy & actualValueMatchProxy, const U & expectedValue) {
63 | actualValueMatchProxy(be_lte(expectedValue));
64 | return true;
65 | }
66 | }}
67 |
--------------------------------------------------------------------------------
/examples/Cedar/Vendor/Frameworks/Cedar-iPhone.framework/Versions/A/Headers/BeLessThan.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import "Base.h"
3 |
4 | namespace Cedar { namespace Matchers {
5 |
6 | template
7 | class BeLessThan : public Base<> {
8 | private:
9 | BeLessThan & operator=(const BeLessThan &);
10 |
11 | public:
12 | explicit BeLessThan(const T & expectedValue);
13 | ~BeLessThan();
14 | // Allow default copy ctor.
15 |
16 | template
17 | bool matches(const U &) const;
18 |
19 | protected:
20 | virtual NSString * failure_message_end() const;
21 |
22 | private:
23 | const T & expectedValue_;
24 | };
25 |
26 | template
27 | BeLessThan be_less_than(const T & expectedValue) {
28 | return BeLessThan(expectedValue);
29 | }
30 |
31 | template
32 | BeLessThan::BeLessThan(const T & expectedValue)
33 | : Base<>(), expectedValue_(expectedValue) {
34 | }
35 |
36 | template
37 | BeLessThan::~BeLessThan() {
38 | }
39 |
40 | template
41 | /*virtual*/ NSString * BeLessThan::failure_message_end() const {
42 | return [NSString stringWithFormat:@"be less than <%@>", Stringifiers::string_for(expectedValue_)];
43 | }
44 |
45 | template template
46 | bool BeLessThan::matches(const U & actualValue) const {
47 | return !Comparators::compare_greater_than(actualValue, expectedValue_) && !Comparators::compare_equal(actualValue, expectedValue_);
48 | }
49 |
50 | #pragma mark operators
51 | template
52 | bool operator<(const ActualValue & actualValue, const U & expectedValue) {
53 | return actualValue.to < expectedValue;
54 | }
55 |
56 | template
57 | bool operator<(const ActualValueMatchProxy & actualValueMatchProxy, const U & expectedValue) {
58 | actualValueMatchProxy(be_less_than(expectedValue));
59 | return true;
60 | }
61 | }}
62 |
--------------------------------------------------------------------------------
/examples/Cedar/Vendor/Frameworks/Cedar-iPhone.framework/Versions/A/Headers/BeNil.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import "Base.h"
3 | #import "CDRSpecFailure.h"
4 |
5 | #include
6 |
7 | namespace Cedar { namespace Matchers {
8 | struct BeNilMessageBuilder {
9 | template
10 | static NSString * string_for_actual_value(const U & value) {
11 | throw std::logic_error("Should never generate a failure message for a nil comparison to non-pointer type.");
12 | }
13 |
14 | template
15 | static NSString * string_for_actual_value(U * const & value) {
16 | return value ? [NSString stringWithFormat:@"%p", value] : @"nil";
17 | }
18 | };
19 |
20 | class BeNil : public Base {
21 | private:
22 | BeNil & operator=(const BeNil &);
23 |
24 | public:
25 | inline BeNil() : Base() {}
26 | inline ~BeNil() {}
27 | // Allow default copy ctor.
28 |
29 | inline const BeNil & operator()() const { return *this; }
30 |
31 | template
32 | bool matches(const U &) const;
33 |
34 | template
35 | bool matches(U * const &) const;
36 |
37 | protected:
38 | inline /*virtual*/ NSString * failure_message_end() const { return @"be nil"; }
39 | };
40 |
41 | static const BeNil be_nil = BeNil();
42 |
43 | #pragma mark Generic
44 | template
45 | bool BeNil::matches(const U & actualValue) const {
46 | [[CDRSpecFailure specFailureWithReason:@"Attempt to compare non-pointer type to nil"] raise];
47 | return NO;
48 | }
49 |
50 | template
51 | bool BeNil::matches(U * const & actualValue) const {
52 | return !actualValue;
53 | }
54 |
55 | }}
56 |
--------------------------------------------------------------------------------
/examples/Cedar/Vendor/Frameworks/Cedar-iPhone.framework/Versions/A/Headers/BeSameInstanceAs.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import "Base.h"
3 |
4 | namespace Cedar { namespace Matchers {
5 | template
6 | class BeSameInstanceAs : public Base<> {
7 | private:
8 | BeSameInstanceAs & operator=(const BeSameInstanceAs &);
9 |
10 | public:
11 | explicit BeSameInstanceAs(T * const expectedValue);
12 | ~BeSameInstanceAs();
13 | // Allow default copy ctor.
14 |
15 | template
16 | bool matches(const U &) const;
17 |
18 | template
19 | bool matches(U * const &) const;
20 |
21 | protected:
22 | virtual NSString * failure_message_end() const;
23 |
24 | private:
25 | const T * expectedValue_;
26 | };
27 |
28 | template
29 | BeSameInstanceAs be_same_instance_as(T * const expectedValue) {
30 | return BeSameInstanceAs(expectedValue);
31 | }
32 |
33 | template
34 | BeSameInstanceAs::BeSameInstanceAs(T * const expectedValue)
35 | : Base<>(), expectedValue_(expectedValue) {
36 | }
37 |
38 | template
39 | BeSameInstanceAs::~BeSameInstanceAs() {
40 | }
41 |
42 | template
43 | /*virtual*/ NSString * BeSameInstanceAs::failure_message_end() const {
44 | return [NSString stringWithFormat:@"be same instance as <%p>", expectedValue_];
45 | }
46 |
47 | #pragma mark Generic
48 | template template
49 | bool BeSameInstanceAs::matches(const U & actualValue) const {
50 | [[CDRSpecFailure specFailureWithReason:@"Attempt to compare non-pointer type for sameness."] raise];
51 | return NO;
52 | }
53 |
54 | template template
55 | bool BeSameInstanceAs::matches(U * const & actualValue) const {
56 | return actualValue == expectedValue_;
57 | }
58 |
59 | }}
60 |
--------------------------------------------------------------------------------
/examples/Cedar/Vendor/Frameworks/Cedar-iPhone.framework/Versions/A/Headers/BeTruthy.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import "Base.h"
3 |
4 | namespace Cedar { namespace Matchers {
5 | class BeTruthy : public Base<> {
6 | private:
7 | BeTruthy & operator=(const BeTruthy &);
8 |
9 | public:
10 | inline BeTruthy() : Base<>() {}
11 | inline ~BeTruthy() {}
12 | // Allow default copy ctor.
13 |
14 | inline const BeTruthy & operator()() const { return *this; }
15 |
16 | template
17 | bool matches(const U &) const;
18 |
19 | protected:
20 | inline /*virtual*/ NSString * failure_message_end() const { return @"evaluate to true"; }
21 | };
22 |
23 | static const BeTruthy be_truthy = BeTruthy();
24 |
25 | #pragma mark Generic
26 | template
27 | bool BeTruthy::matches(const U & actualValue) const {
28 | return !!actualValue;
29 | }
30 |
31 | }}
32 |
--------------------------------------------------------------------------------
/examples/Cedar/Vendor/Frameworks/Cedar-iPhone.framework/Versions/A/Headers/CDRColorizedReporter.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import "CDRDefaultReporter.h"
3 |
4 | @interface CDRColorizedReporter : CDRDefaultReporter
5 |
6 | @end
7 |
--------------------------------------------------------------------------------
/examples/Cedar/Vendor/Frameworks/Cedar-iPhone.framework/Versions/A/Headers/CDRExampleBase.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import "CDRExampleParent.h"
3 |
4 | @protocol CDRExampleReporter;
5 |
6 | typedef void (^CDRSpecBlock)(void);
7 |
8 | enum CDRExampleState {
9 | CDRExampleStateIncomplete = 0x00,
10 | CDRExampleStateSkipped = 0x01,
11 | CDRExampleStatePassed = 0x03,
12 | CDRExampleStatePending = 0x07,
13 | CDRExampleStateFailed = 0x0F,
14 | CDRExampleStateError = 0x1F
15 | };
16 | typedef enum CDRExampleState CDRExampleState;
17 |
18 | @interface CDRExampleBase : NSObject {
19 | NSString *text_;
20 | id parent_;
21 | BOOL focused_;
22 | }
23 |
24 | @property (nonatomic, readonly) NSString *text;
25 | @property (nonatomic, assign) id parent;
26 | @property (nonatomic, assign, getter=isFocused) BOOL focused;
27 |
28 | - (id)initWithText:(NSString *)text;
29 |
30 | - (void)run;
31 | - (BOOL)shouldRun;
32 |
33 | - (BOOL)hasChildren;
34 | - (BOOL)hasFocusedExamples;
35 |
36 | - (NSString *)message;
37 | - (NSString *)fullText;
38 | - (NSMutableArray *)fullTextInPieces;
39 | @end
40 |
41 | @interface CDRExampleBase (RunReporting)
42 | - (CDRExampleState)state;
43 | - (float)progress;
44 | @end
45 |
--------------------------------------------------------------------------------
/examples/Cedar/Vendor/Frameworks/Cedar-iPhone.framework/Versions/A/Headers/CDRExampleDetailsViewController.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @class CDRExampleBase;
4 |
5 | @interface CDRExampleDetailsViewController : UIViewController
6 |
7 | @property (nonatomic, assign) UINavigationBar *navigationBar;
8 | @property (nonatomic, assign) UILabel *fullTextLabel, *messageLabel;
9 |
10 | - (id)initWithExample:(CDRExampleBase *)example;
11 |
12 | @end
13 |
--------------------------------------------------------------------------------
/examples/Cedar/Vendor/Frameworks/Cedar-iPhone.framework/Versions/A/Headers/CDRExampleParent.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @protocol CDRExampleParent
4 |
5 | - (BOOL)shouldRun;
6 |
7 | - (void)setUp;
8 | - (void)tearDown;
9 |
10 | @optional
11 | - (BOOL)hasFullText;
12 | - (NSString *)fullText;
13 | - (NSMutableArray *)fullTextInPieces;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/examples/Cedar/Vendor/Frameworks/Cedar-iPhone.framework/Versions/A/Headers/CDRExampleReporter.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @protocol CDRExampleReporter
4 |
5 | - (void)runWillStartWithGroups:(NSArray *)groups;
6 | - (void)runDidComplete;
7 | - (int)result;
8 |
9 | @end
10 |
--------------------------------------------------------------------------------
/examples/Cedar/Vendor/Frameworks/Cedar-iPhone.framework/Versions/A/Headers/CDRExampleReporterViewController.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import "CDRExampleReporter.h"
3 |
4 | @interface CDRExampleReporterViewController : UINavigationController {
5 | }
6 |
7 | @end
8 |
--------------------------------------------------------------------------------
/examples/Cedar/Vendor/Frameworks/Cedar-iPhone.framework/Versions/A/Headers/CDRFunctions.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | NSArray *CDRReportersFromEnv(const char*defaultReporterClassName);
4 |
5 | int runSpecs();
6 | int runAllSpecs() __attribute__((deprecated));
7 | int runSpecsWithCustomExampleReporters(NSArray *reporters);
8 | NSArray *specClassesToRun();
9 |
--------------------------------------------------------------------------------
/examples/Cedar/Vendor/Frameworks/Cedar-iPhone.framework/Versions/A/Headers/CDRSharedExampleGroupPool.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @protocol CDRSharedExampleGroupPool
4 | @end
5 |
6 | typedef void (^CDRSharedExampleGroupBlock)(NSDictionary *);
7 |
8 | #ifdef __cplusplus
9 | extern "C" {
10 | #endif
11 | void sharedExamplesFor(NSString *, CDRSharedExampleGroupBlock);
12 | void itShouldBehaveLike(NSString *);
13 | #ifdef __cplusplus
14 | }
15 | #endif
16 |
17 | @interface CDRSharedExampleGroupPool : NSObject
18 | @end
19 |
20 | @interface CDRSharedExampleGroupPool (SharedExampleGroupDeclaration)
21 | - (void)declareSharedExampleGroups;
22 | @end
23 |
24 | #define SHARED_EXAMPLE_GROUPS_BEGIN(name) \
25 | @interface SharedExampleGroupPoolFor##name : CDRSharedExampleGroupPool \
26 | @end \
27 | @implementation SharedExampleGroupPoolFor##name \
28 | - (void)declareSharedExampleGroups {
29 |
30 | #define SHARED_EXAMPLE_GROUPS_END \
31 | } \
32 | @end
33 |
--------------------------------------------------------------------------------
/examples/Cedar/Vendor/Frameworks/Cedar-iPhone.framework/Versions/A/Headers/CDRSpec.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import "CDRExampleBase.h"
3 |
4 | @protocol CDRExampleReporter;
5 | @class CDRExampleGroup, CDRExample, SpecHelper;
6 |
7 | @protocol CDRSpec
8 | @end
9 |
10 | extern const CDRSpecBlock PENDING;
11 |
12 | #ifdef __cplusplus
13 | extern "C" {
14 | #endif
15 | void beforeEach(CDRSpecBlock);
16 | void afterEach(CDRSpecBlock);
17 |
18 | CDRExampleGroup * describe(NSString *, CDRSpecBlock);
19 | CDRExampleGroup * context(NSString *, CDRSpecBlock);
20 | CDRExample * it(NSString *, CDRSpecBlock);
21 |
22 | CDRExampleGroup * xcontext(NSString *, CDRSpecBlock);
23 | CDRExampleGroup * xdescribe(NSString *, CDRSpecBlock);
24 | CDRExample * xit(NSString *, CDRSpecBlock);
25 |
26 | CDRExampleGroup * fdescribe(NSString *, CDRSpecBlock);
27 | CDRExampleGroup * fcontext(NSString *, CDRSpecBlock);
28 | CDRExample * fit(NSString *, CDRSpecBlock);
29 |
30 | void fail(NSString *);
31 | #ifdef __cplusplus
32 | }
33 |
34 | #import "ActualValue.h"
35 | #import "ShouldSyntax.h"
36 | #import "CedarComparators.h"
37 | #import "CedarMatchers.h"
38 |
39 | #endif // __cplusplus
40 |
41 | @interface CDRSpec : NSObject {
42 | CDRExampleGroup *rootGroup_;
43 | CDRExampleGroup *currentGroup_;
44 | }
45 |
46 | @property (nonatomic, retain) CDRExampleGroup *currentGroup, *rootGroup;
47 | - (void)defineBehaviors;
48 | @end
49 |
50 | @interface CDRSpec (SpecDeclaration)
51 | - (void)declareBehaviors;
52 | @end
53 |
54 | #define SPEC_BEGIN(name) \
55 | @interface name : CDRSpec \
56 | @end \
57 | @implementation name \
58 | - (void)declareBehaviors {
59 |
60 | #define SPEC_END \
61 | } \
62 | @end
63 |
--------------------------------------------------------------------------------
/examples/Cedar/Vendor/Frameworks/Cedar-iPhone.framework/Versions/A/Headers/CDRSpecFailure.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @interface CDRSpecFailure : NSException {
4 | NSString *fileName_;
5 | int lineNumber_;
6 | }
7 |
8 | @property (nonatomic, retain, readonly) NSString *fileName;
9 | @property (nonatomic, assign, readonly) int lineNumber;
10 |
11 | + (id)specFailureWithReason:(NSString *)reason;
12 | + (id)specFailureWithReason:(NSString *)reason fileName:(NSString *)fileName lineNumber:(int)lineNumber;
13 | + (id)specFailureWithRaisedObject:(NSObject *)object;
14 |
15 | - (id)initWithReason:(NSString *)reason;
16 | - (id)initWithReason:(NSString *)reason fileName:(NSString *)fileName lineNumber:(int)lineNumber;
17 | - (id)initWithRaisedObject:(NSObject *)object;
18 |
19 | @end
20 |
--------------------------------------------------------------------------------
/examples/Cedar/Vendor/Frameworks/Cedar-iPhone.framework/Versions/A/Headers/Cedar.h:
--------------------------------------------------------------------------------
1 | #if TARGET_OS_IPHONE
2 | #import "CDRFunctions.h"
3 | #import "CedarApplicationDelegate.h"
4 | #import "CDRExampleReporterViewController.h"
5 | #else
6 | #import "CDRFunctions.h"
7 | #endif
8 |
--------------------------------------------------------------------------------
/examples/Cedar/Vendor/Frameworks/Cedar-iPhone.framework/Versions/A/Headers/CedarApplicationDelegate.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | int runSpecsWithinUIApplication();
4 | void exitWithStatusFromUIApplication(int status);
5 |
6 | @class CDRExampleReporterViewController;
7 |
8 | // In some cases CDRIPhoneOTestRunner needs to spin up an instance of Cedar app.
9 | // It appears that SenTestingKit fails to start up the test when CedarApplicationDelegate
10 | // is used. Solution is to use a subclass of UIApplicaton.
11 | @interface CedarApplication : UIApplication {
12 | UIWindow *window_;
13 | CDRExampleReporterViewController *viewController_;
14 | }
15 | @end
16 |
17 | // Needed for backwards compatibility with existing projects using CedarApplicationDelegate
18 | @interface CedarApplicationDelegate : NSObject {
19 | UIWindow *window_;
20 | CDRExampleReporterViewController *viewController_;
21 | }
22 | @end
23 |
--------------------------------------------------------------------------------
/examples/Cedar/Vendor/Frameworks/Cedar-iPhone.framework/Versions/A/Headers/CedarComparators.h:
--------------------------------------------------------------------------------
1 | #import "ComparatorsBase.h"
2 | #import "ComparatorsContainer.h"
3 |
4 | #ifdef CEDAR_CUSTOM_COMPARATORS
5 | #import CEDAR_CUSTOM_COMPARATORS
6 | #endif
7 |
--------------------------------------------------------------------------------
/examples/Cedar/Vendor/Frameworks/Cedar-iPhone.framework/Versions/A/Headers/CedarMatchers.h:
--------------------------------------------------------------------------------
1 | // Base
2 | #import "Equal.h"
3 | #import "BeTruthy.h"
4 | #import "BeNil.h"
5 | #import "BeCloseTo.h"
6 | #import "BeSameInstanceAs.h"
7 | #import "BeInstanceOf.h"
8 | #import "BeGreaterThan.h"
9 | #import "BeGTE.h"
10 | #import "BeLessThan.h"
11 | #import "BeLTE.h"
12 | #import "RaiseException.h"
13 |
14 | // Container
15 | #import "BeEmpty.h"
16 | #import "Contain.h"
17 |
18 | #ifdef CEDAR_CUSTOM_MATCHERS
19 | #import CEDAR_CUSTOM_MATCHERS
20 | #endif
21 |
--------------------------------------------------------------------------------
/examples/Cedar/Vendor/Frameworks/Cedar-iPhone.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 |
--------------------------------------------------------------------------------
/examples/Cedar/Vendor/Frameworks/Cedar-iPhone.framework/Versions/A/Headers/ComparatorsBase.h:
--------------------------------------------------------------------------------
1 | #import "CompareEqual.h"
2 | #import "CompareGreaterThan.h"
3 |
--------------------------------------------------------------------------------
/examples/Cedar/Vendor/Frameworks/Cedar-iPhone.framework/Versions/A/Headers/ComparatorsContainer.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import