Permalink
Browse files

Merge branch 'issue-10' (fixing #19, #20)

  • Loading branch information...
2 parents c7ccc15 + 156c6e2 commit 0232cb19f91600e5f057dee10140b3152d547aef Tae Won Ha committed Jan 12, 2014
Showing with 8,192 additions and 3,151 deletions.
  1. +1 −0 Frameworks/OCHamcrest.framework/Headers
  2. +1 −0 Frameworks/OCHamcrest.framework/OCHamcrest
  3. +1 −0 Frameworks/OCHamcrest.framework/Resources
  4. +45 −0 Frameworks/OCHamcrest.framework/Versions/A/Headers/HCAllOf.h
  5. +45 −0 Frameworks/OCHamcrest.framework/Versions/A/Headers/HCAnyOf.h
  6. +42 −0 Frameworks/OCHamcrest.framework/Versions/A/Headers/HCAssertThat.h
  7. +33 −0 Frameworks/OCHamcrest.framework/Versions/A/Headers/HCBaseDescription.h
  8. +27 −0 Frameworks/OCHamcrest.framework/Versions/A/Headers/HCBaseMatcher.h
  9. +20 −0 Frameworks/OCHamcrest.framework/Versions/A/Headers/HCClassMatcher.h
  10. +23 −0 Frameworks/OCHamcrest.framework/Versions/A/Headers/HCCollectMatchers.h
  11. +42 −0 Frameworks/OCHamcrest.framework/Versions/A/Headers/HCConformsToProtocol.h
  12. +50 −0 Frameworks/OCHamcrest.framework/Versions/A/Headers/HCDescribedAs.h
  13. +48 −0 Frameworks/OCHamcrest.framework/Versions/A/Headers/HCDescription.h
  14. +63 −0 Frameworks/OCHamcrest.framework/Versions/A/Headers/HCHasCount.h
  15. +44 −0 Frameworks/OCHamcrest.framework/Versions/A/Headers/HCHasDescription.h
  16. +49 −0 Frameworks/OCHamcrest.framework/Versions/A/Headers/HCHasProperty.h
  17. +57 −0 Frameworks/OCHamcrest.framework/Versions/A/Headers/HCInvocationMatcher.h
  18. +54 −0 Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIs.h
  19. +63 −0 Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsAnything.h
  20. +47 −0 Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsCloseTo.h
  21. +69 −0 Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsCollectionContaining.h
  22. +47 −0 Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsCollectionContainingInAnyOrder.h
  23. +45 −0 Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsCollectionContainingInOrder.h
  24. +52 −0 Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsCollectionOnlyContaining.h
  25. +54 −0 Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsDictionaryContaining.h
  26. +53 −0 Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsDictionaryContainingEntries.h
  27. +49 −0 Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsDictionaryContainingKey.h
  28. +49 −0 Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsDictionaryContainingValue.h
  29. +36 −0 Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsEmptyCollection.h
  30. +44 −0 Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsEqual.h
  31. +49 −0 Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsEqualIgnoringCase.h
  32. +50 −0 Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsEqualIgnoringWhiteSpace.h
  33. +331 −0 Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsEqualToNumber.h
  34. +42 −0 Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsIn.h
  35. +41 −0 Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsInstanceOf.h
  36. +47 −0 Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsNil.h
  37. +47 −0 Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsNot.h
  38. +42 −0 Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsSame.h
  39. +40 −0 Frameworks/OCHamcrest.framework/Versions/A/Headers/HCIsTypeOf.h
  40. +56 −0 Frameworks/OCHamcrest.framework/Versions/A/Headers/HCMatcher.h
  41. +359 −0 Frameworks/OCHamcrest.framework/Versions/A/Headers/HCNumberAssert.h
  42. +115 −0 Frameworks/OCHamcrest.framework/Versions/A/Headers/HCOrderingComparison.h
  43. +19 −0 Frameworks/OCHamcrest.framework/Versions/A/Headers/HCRequireNonNilObject.h
  44. +32 −0 Frameworks/OCHamcrest.framework/Versions/A/Headers/HCSelfDescribing.h
  45. +45 −0 Frameworks/OCHamcrest.framework/Versions/A/Headers/HCStringContains.h
  46. +50 −0 Frameworks/OCHamcrest.framework/Versions/A/Headers/HCStringContainsInOrder.h
  47. +43 −0 Frameworks/OCHamcrest.framework/Versions/A/Headers/HCStringDescription.h
  48. +45 −0 Frameworks/OCHamcrest.framework/Versions/A/Headers/HCStringEndsWith.h
  49. +45 −0 Frameworks/OCHamcrest.framework/Versions/A/Headers/HCStringStartsWith.h
  50. +20 −0 Frameworks/OCHamcrest.framework/Versions/A/Headers/HCSubstringMatcher.h
  51. +21 −0 Frameworks/OCHamcrest.framework/Versions/A/Headers/HCTestFailure.h
  52. +20 −0 Frameworks/OCHamcrest.framework/Versions/A/Headers/HCTestFailureHandler.h
  53. +12 −0 Frameworks/OCHamcrest.framework/Versions/A/Headers/HCTestFailureHandlerChain.h
  54. +22 −0 Frameworks/OCHamcrest.framework/Versions/A/Headers/HCWrapInMatcher.h
  55. +141 −0 Frameworks/OCHamcrest.framework/Versions/A/Headers/OCHamcrest.h
  56. BIN Frameworks/OCHamcrest.framework/Versions/A/OCHamcrest
  57. +42 −0 Frameworks/OCHamcrest.framework/Versions/A/Resources/Info.plist
  58. +1 −0 Frameworks/OCHamcrest.framework/Versions/Current
  59. +18 −0 Frameworks/OCMockito.framework/Headers/MKTArgumentCaptor.h
  60. +17 −0 Frameworks/OCMockito.framework/Headers/MKTBaseMockObject.h
  61. +22 −0 Frameworks/OCMockito.framework/Headers/MKTClassObjectMock.h
  62. +20 −0 Frameworks/OCMockito.framework/Headers/MKTObjectAndProtocolMock.h
  63. +22 −0 Frameworks/OCMockito.framework/Headers/MKTObjectMock.h
  64. +77 −0 Frameworks/OCMockito.framework/Headers/MKTOngoingStubbing.h
  65. +50 −0 Frameworks/OCMockito.framework/Headers/MKTPrimitiveArgumentMatching.h
  66. +23 −0 Frameworks/OCMockito.framework/Headers/MKTProtocolMock.h
  67. +219 −0 Frameworks/OCMockito.framework/Headers/OCMockito.h
  68. BIN Frameworks/OCMockito.framework/OCMockito
  69. +42 −0 Frameworks/OCMockito.framework/Resources/Info.plist
  70. +18 −0 Frameworks/OCMockito.framework/Versions/A/Headers/MKTArgumentCaptor.h
  71. +17 −0 Frameworks/OCMockito.framework/Versions/A/Headers/MKTBaseMockObject.h
  72. +22 −0 Frameworks/OCMockito.framework/Versions/A/Headers/MKTClassObjectMock.h
  73. +20 −0 Frameworks/OCMockito.framework/Versions/A/Headers/MKTObjectAndProtocolMock.h
  74. +22 −0 Frameworks/OCMockito.framework/Versions/A/Headers/MKTObjectMock.h
  75. +77 −0 Frameworks/OCMockito.framework/Versions/A/Headers/MKTOngoingStubbing.h
  76. +50 −0 Frameworks/OCMockito.framework/Versions/A/Headers/MKTPrimitiveArgumentMatching.h
  77. +23 −0 Frameworks/OCMockito.framework/Versions/A/Headers/MKTProtocolMock.h
  78. +219 −0 Frameworks/OCMockito.framework/Versions/A/Headers/OCMockito.h
  79. BIN Frameworks/OCMockito.framework/Versions/A/OCMockito
  80. +42 −0 Frameworks/OCMockito.framework/Versions/A/Resources/Info.plist
  81. +18 −0 Frameworks/OCMockito.framework/Versions/Current/Headers/MKTArgumentCaptor.h
  82. +17 −0 Frameworks/OCMockito.framework/Versions/Current/Headers/MKTBaseMockObject.h
  83. +22 −0 Frameworks/OCMockito.framework/Versions/Current/Headers/MKTClassObjectMock.h
  84. +20 −0 Frameworks/OCMockito.framework/Versions/Current/Headers/MKTObjectAndProtocolMock.h
  85. +22 −0 Frameworks/OCMockito.framework/Versions/Current/Headers/MKTObjectMock.h
  86. +77 −0 Frameworks/OCMockito.framework/Versions/Current/Headers/MKTOngoingStubbing.h
  87. +50 −0 Frameworks/OCMockito.framework/Versions/Current/Headers/MKTPrimitiveArgumentMatching.h
  88. +23 −0 Frameworks/OCMockito.framework/Versions/Current/Headers/MKTProtocolMock.h
  89. +219 −0 Frameworks/OCMockito.framework/Versions/Current/Headers/OCMockito.h
  90. BIN Frameworks/OCMockito.framework/Versions/Current/OCMockito
  91. +42 −0 Frameworks/OCMockito.framework/Versions/Current/Resources/Info.plist
  92. +15 −20 Meta/Cell Layout.graffle
  93. +380 −150 Meta/Cell Test Cases.graffle
  94. +83 −71 Qmind.xcodeproj/project.pbxproj
  95. +29 −1 Qmind.xcodeproj/xcshareddata/xcschemes/Qmind.xcscheme
  96. +4 −14 Qmind.xcodeproj/xcshareddata/xcschemes/{Tests.xcscheme → QmindLook.xcscheme}
  97. +3 −0 Qmind/QMAppSettings.h
  98. +124 −92 Qmind/QMAppSettings.m
  99. +17 −0 Qmind/QMBorderedView.h
  100. +60 −0 Qmind/QMBorderedView.m
  101. +5 −0 Qmind/QMCell.h
  102. +6 −4 Qmind/QMCellDrawer.h
  103. +97 −95 Qmind/QMCellDrawer.m
  104. +9 −5 Qmind/QMCellEditor.h
  105. +116 −160 Qmind/QMCellEditor.m
  106. +3 −2 Qmind/QMCellEditorDelegate.h
  107. +1 −3 Qmind/QMCellSelector.h
  108. +3 −2 Qmind/QMCellSizeManager.h
  109. +7 −0 Qmind/QMCellSizeManager.m
  110. +3 −16 Qmind/QMFontManager.m
  111. +4 −0 Qmind/QMIcon.h
  112. +61 −43 Qmind/QMIcon.m
  113. +4 −4 Qmind/QMIdGenerator.h
  114. +10 −8 Qmind/QMIdGenerator.m
  115. +1 −1 Qmind/QMMindmapReader.h
  116. +5 −2 Qmind/QMMindmapView.h
  117. +946 −934 Qmind/QMMindmapView.m
  118. +3 −0 Qmind/QMNode.h
  119. +10 −0 Qmind/QMNode.m
  120. +1 −0 Qmind/QMTypes.h
  121. +3 −3 Qmind/Qmind-Info.plist
  122. +24 −0 Qmind/Resources/Fontawesome/fontawesome-ie7.css
  123. +85 −0 Qmind/Resources/Fontawesome/fontawesome-ie7.less
  124. +22 −0 Qmind/Resources/Fontawesome/fontawesome-webfont.afm
  125. BIN Qmind/Resources/Fontawesome/fontawesome-webfont.eot
  126. BIN Qmind/Resources/Fontawesome/fontawesome-webfont.ttf
  127. BIN Qmind/Resources/Fontawesome/fontawesome-webfont.woff
  128. +273 −0 Qmind/Resources/Fontawesome/fontawesome.css
  129. +272 −0 Qmind/Resources/Fontawesome/fontawesome.less
  130. +264 −0 Qmind/Resources/Fontawesome/fontawesome.sass
  131. +266 −0 Qmind/Resources/Fontawesome/fontawesome.scss
  132. +31 −0 Qmind/Resources/Fontawesome/icon-reference.html
  133. BIN Qmind/Resources/fontawesome-webfont.ttf
  134. +249 −1,451 Qmind/en.lproj/Document.xib
  135. +32 −34 QmindTest/CellEditorTest.m
  136. +1 −1 QmindTest/DocumentTest.m
  137. +19 −15 QmindTest/MindmapReaderTest.m
  138. +1 −0 QmindTest/MindmapWriterTest.m
  139. +3 −3 QmindTest/QMBaseTestCase.h
  140. +27 −2 QmindTest/{CellSizeManagerTest.m → QMCellSizeManagerTest.m}
  141. +4 −4 QmindTest/{CellTest.m → QMCellTest.m}
  142. +21 −3 QmindTest/{IconTest.m → QMIconTest.m}
  143. +7 −0 QmindTest/QMMindmapViewComponentTest.m
  144. +12 −2 QmindTest/{NodeTest.m → QMNodeTest.m}
  145. +3 −3 QmindTest/Resources/mindmap-reader-test.mm
  146. +1 −1 QmindTest/Resources/mindmap-writer-test.mm
  147. +1 −1 qkit
  148. +1 −1 tbcacao
@@ -0,0 +1,45 @@
+//
+// OCHamcrest - HCAllOf.h
+// Copyright 2013 hamcrest.org. See LICENSE.txt
+//
+// Created by: Jon Reid, http://qualitycoding.org/
+// Docs: http://hamcrest.github.com/OCHamcrest/
+// Source: https://github.com/hamcrest/OCHamcrest
+//
+
+#import <OCHamcrest/HCBaseMatcher.h>
+
+
+@interface HCAllOf : HCBaseMatcher
+{
+ NSArray *matchers;
+}
+
++ (instancetype)allOf:(NSArray *)theMatchers;
+- (instancetype)initWithMatchers:(NSArray *)theMatchers;
+
+@end
+
+
+OBJC_EXPORT id HC_allOf(id match, ...) NS_REQUIRES_NIL_TERMINATION;
+
+/**
+ allOf(firstMatcher, ...) -
+ Matches if all of the given matchers evaluate to @c YES.
+
+ @param firstMatcher,... A comma-separated list of matchers ending with @c nil.
+
+ The matchers are evaluated from left to right using short-circuit evaluation, so evaluation
+ stops as soon as a matcher returns @c NO.
+
+ Any argument that is not a matcher is implicitly wrapped in an @ref equalTo matcher to check for
+ equality.
+
+ (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym
+ @c HC_allOf instead.)
+
+ @ingroup logical_matchers
+ */
+#ifdef HC_SHORTHAND
+ #define allOf HC_allOf
+#endif
@@ -0,0 +1,45 @@
+//
+// OCHamcrest - HCAnyOf.h
+// Copyright 2013 hamcrest.org. See LICENSE.txt
+//
+// Created by: Jon Reid, http://qualitycoding.org/
+// Docs: http://hamcrest.github.com/OCHamcrest/
+// Source: https://github.com/hamcrest/OCHamcrest
+//
+
+#import <OCHamcrest/HCBaseMatcher.h>
+
+
+@interface HCAnyOf : HCBaseMatcher
+{
+ NSArray *matchers;
+}
+
++ (instancetype)anyOf:(NSArray *)theMatchers;
+- (instancetype)initWithMatchers:(NSArray *)theMatchers;
+
+@end
+
+
+OBJC_EXPORT id HC_anyOf(id match, ...) NS_REQUIRES_NIL_TERMINATION;
+
+/**
+ anyOf(firstMatcher, ...) -
+ Matches if any of the given matchers evaluate to @c YES.
+
+ @param firstMatcher,... A comma-separated list of matchers ending with @c nil.
+
+ The matchers are evaluated from left to right using short-circuit evaluation, so evaluation
+ stops as soon as a matcher returns @c YES.
+
+ Any argument that is not a matcher is implicitly wrapped in an @ref equalTo matcher to check for
+ equality.
+
+ (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym
+ @c HC_anyOf instead.)
+
+ @ingroup logical_matchers
+ */
+#ifdef HC_SHORTHAND
+ #define anyOf HC_anyOf
+#endif
@@ -0,0 +1,42 @@
+//
+// OCHamcrest - HCAssertThat.h
+// Copyright 2013 hamcrest.org. See LICENSE.txt
+//
+// Created by: Jon Reid, http://qualitycoding.org/
+// Docs: http://hamcrest.github.com/OCHamcrest/
+// Source: https://github.com/hamcrest/OCHamcrest
+//
+
+#import <objc/objc-api.h>
+
+@protocol HCMatcher;
+
+
+OBJC_EXPORT void HC_assertThatWithLocation(id testCase, id actual, id <HCMatcher> matcher,
+ const char *fileName, int lineNumber);
+
+#define HC_assertThat(actual, matcher) \
+ HC_assertThatWithLocation(self, actual, matcher, __FILE__, __LINE__)
+
+/**
+ assertThat(actual, matcher) -
+ Asserts that actual value satisfies matcher.
+
+ @param actual The object to evaluate as the actual value.
+ @param matcher The matcher to satisfy as the expected condition.
+
+ @c assertThat passes the actual value to the matcher for evaluation. If the matcher is not
+ satisfied, an exception is thrown describing the mismatch.
+
+ @c assertThat is designed to integrate well with OCUnit and other unit testing frameworks.
+ Unmet assertions are reported as test failures. In Xcode, these failures can be clicked to
+ reveal the line of the assertion.
+
+ In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym
+ @c HC_assertThat instead.
+
+ @ingroup integration
+ */
+#ifdef HC_SHORTHAND
+ #define assertThat HC_assertThat
+#endif
@@ -0,0 +1,33 @@
+//
+// OCHamcrest - HCBaseDescription.h
+// Copyright 2013 hamcrest.org. See LICENSE.txt
+//
+// Created by: Jon Reid, http://qualitycoding.org/
+// Docs: http://hamcrest.github.com/OCHamcrest/
+// Source: https://github.com/hamcrest/OCHamcrest
+//
+
+#import <Foundation/Foundation.h>
+#import <OCHamcrest/HCDescription.h>
+
+
+/**
+ Base class for all HCDescription implementations.
+
+ @ingroup core
+ */
+@interface HCBaseDescription : NSObject <HCDescription>
+@end
+
+
+/**
+ Methods that must be provided by subclasses of HCBaseDescription.
+ */
+@interface HCBaseDescription (SubclassMustImplement)
+
+/**
+ Append the string @a str to the description.
+ */
+- (void)append:(NSString *)str;
+
+@end
@@ -0,0 +1,27 @@
+//
+// OCHamcrest - HCBaseMatcher.h
+// Copyright 2013 hamcrest.org. See LICENSE.txt
+//
+// Created by: Jon Reid, http://qualitycoding.org/
+// Docs: http://hamcrest.github.com/OCHamcrest/
+// Source: https://github.com/hamcrest/OCHamcrest
+//
+
+#import <Foundation/Foundation.h>
+#import <OCHamcrest/HCMatcher.h>
+
+#import <objc/objc-api.h> // Convenience header, to provide OBJC_EXPORT
+
+
+/**
+ Base class for all HCMatcher implementations.
+
+ Most implementations can just implement @c -matches: and let
+ <code>-matches:describingMismatchTo:</code> call it. But if it makes more sense to generate the
+ mismatch description during the matching, override <code>-matches:describingMismatchTo:</code>
+ and have @c -matches: call it with a @c nil description.
+
+ @ingroup core
+ */
+@interface HCBaseMatcher : NSObject <HCMatcher>
+@end
@@ -0,0 +1,20 @@
+//
+// OCHamcrest - HCClassMatcher.h
+// Copyright 2013 hamcrest.org. See LICENSE.txt
+//
+// Created by: Jon Reid, http://qualitycoding.org/
+// Docs: http://hamcrest.github.com/OCHamcrest/
+// Source: https://github.com/hamcrest/OCHamcrest
+//
+
+#import <OCHamcrest/HCBaseMatcher.h>
+
+
+@interface HCClassMatcher : HCBaseMatcher
+{
+ Class theClass;
+}
+
+- (instancetype)initWithType:(Class)type;
+
+@end
@@ -0,0 +1,23 @@
+//
+// OCHamcrest - HCCollectMatchers.h
+// Copyright 2013 hamcrest.org. See LICENSE.txt
+//
+// Created by: Jon Reid, http://qualitycoding.org/
+// Docs: http://hamcrest.github.com/OCHamcrest/
+// Source: https://github.com/hamcrest/OCHamcrest
+//
+
+#import <Foundation/Foundation.h>
+#import <objc/objc-api.h>
+
+#import <stdarg.h>
+
+@protocol HCMatcher;
+
+
+/**
+ Returns an array of matchers from a variable-length comma-separated list terminated by @c nil.
+
+ @ingroup helpers
+*/
+OBJC_EXPORT NSMutableArray *HCCollectMatchers(id item1, va_list args);
@@ -0,0 +1,42 @@
+//
+// OCHamcrest - HCConformsToProtocol.h
+// Copyright 2013 hamcrest.org. See LICENSE.txt
+//
+// Created by: Todd Farrell
+//
+
+#import <OCHamcrest/HCBaseMatcher.h>
+
+
+@interface HCConformsToProtocol : HCBaseMatcher
+{
+ Protocol *theProtocol;
+}
+
++ (instancetype)conformsTo:(Protocol *)protocol;
+- (instancetype)initWithProtocol:(Protocol *)protocol;
+
+@end
+
+
+OBJC_EXPORT id HC_conformsTo(Protocol *aProtocol);
+
+/**
+ conformsTo(aProtocol) -
+ Matches if object conforms to a given protocol.
+
+ @param aProtocol The protocol to compare against as the expected protocol.
+
+ This matcher checks whether the evaluated object conforms to @a aProtocol.
+
+ Example:
+ @li @ref conformsTo(\@protocol(NSObject))
+
+ (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym
+ @c HC_conformsTo instead.)
+
+ @ingroup object_matchers
+ */
+#ifdef HC_SHORTHAND
+ #define conformsTo HC_conformsTo
+#endif
@@ -0,0 +1,50 @@
+//
+// OCHamcrest - HCDescribedAs.h
+// Copyright 2013 hamcrest.org. See LICENSE.txt
+//
+// Created by: Jon Reid, http://qualitycoding.org/
+// Docs: http://hamcrest.github.com/OCHamcrest/
+// Source: https://github.com/hamcrest/OCHamcrest
+//
+
+#import <OCHamcrest/HCBaseMatcher.h>
+
+
+@interface HCDescribedAs : HCBaseMatcher
+{
+ NSString *descriptionTemplate;
+ id <HCMatcher> matcher;
+ NSArray *values;
+}
+
++ (instancetype)describedAs:(NSString *)description
+ forMatcher:(id <HCMatcher>)aMatcher
+ overValues:(NSArray *)templateValues;
+
+- (instancetype)initWithDescription:(NSString *)description
+ forMatcher:(id <HCMatcher>)aMatcher
+ overValues:(NSArray *)templateValues;
+
+@end
+
+
+OBJC_EXPORT id HC_describedAs(NSString *description, id <HCMatcher> matcher, ...) NS_REQUIRES_NIL_TERMINATION;
+
+/**
+ describedAs(description, matcher, ...) -
+ Adds custom failure description to a given matcher.
+
+ @param description Overrides the matcher's description.
+ @param matcher,... The matcher to satisfy, followed by a comma-separated list of substitution values ending with @c nil.
+
+ The description may contain substitution placeholders \%0, \%1, etc. These will be replaced by
+ any values that follow the matcher.
+
+ (In the event of a name clash, don't \#define @c HC_SHORTHAND and use the synonym
+ @c HC_describedAs instead.)
+
+ @ingroup decorator_matchers
+ */
+#ifdef HC_SHORTHAND
+ #define describedAs HC_describedAs
+#endif
@@ -0,0 +1,48 @@
+//
+// OCHamcrest - HCDescription.h
+// Copyright 2013 hamcrest.org. See LICENSE.txt
+//
+// Created by: Jon Reid, http://qualitycoding.org/
+// Docs: http://hamcrest.github.com/OCHamcrest/
+// Source: https://github.com/hamcrest/OCHamcrest
+//
+
+#import <Foundation/Foundation.h>
+
+
+/**
+ A description of an HCMatcher.
+
+ An HCMatcher will describe itself to a description which can later be used for reporting.
+
+ @ingroup core
+ */
+@protocol HCDescription <NSObject>
+
+/**
+ Appends some plain text to the description.
+
+ @return @c self, for chaining.
+ */
+- (id<HCDescription>)appendText:(NSString *)text;
+
+/**
+ Appends description of given value to @c self.
+
+ If the value implements the @ref HCSelfDescribing protocol, then it will be used.
+
+ @return @c self, for chaining.
+ */
+- (id<HCDescription>)appendDescriptionOf:(id)value;
+
+/**
+ Appends a list of objects to the description.
+
+ @return @c self, for chaining.
+ */
+- (id<HCDescription>)appendList:(NSArray *)values
+ start:(NSString *)start
+ separator:(NSString *)separator
+ end:(NSString *)end;
+
+@end
Oops, something went wrong. Retry.

0 comments on commit 0232cb1

Please sign in to comment.