Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Cleanup availability macros mess

  • Loading branch information...
commit eee34030681b204a71a22b471b0eb441c70b0b15 1 parent 9862285
@groue authored
Showing with 54 additions and 120 deletions.
  1. +6 −52 Classes/GRMustacheAvailabilityMacros.h
  2. +1 −1  Classes/GRMustacheContext.h
  3. +3 −3 Classes/GRMustacheLambda.h
  4. +1 −2  Tests/v1.0/GRBoolean_v1_0_Test.h
  5. +1 −2  Tests/v1.0/GRDotKeyTest.h
  6. +1 −2  Tests/v1.0/GRMustacheLambdaMakeTest.h
  7. +1 −2  Tests/v1.0/GRMustacheSpec_v1_0_Test.h
  8. +1 −2  Tests/v1.0/GRMustacheTemplateLoaderSubclassTest.h
  9. +1 −2  Tests/v1.0/GRMustacheTemplate_v1_0_Test.h
  10. +1 −2  Tests/v1.0/GRMustacheTestSuite_v1_0_Test.h
  11. +1 −2  Tests/v1.0/GRPartialTest.h
  12. +1 −2  Tests/v1.1/GRBoolean_v1_1_Test.h
  13. +1 −2  Tests/v1.3/GRMustacheLambdaBlockMakeTest.h
  14. +1 −2  Tests/v1.3/GRMustacheSelectorHelper_v1_3_Test.h
  15. +19 −16 Tests/v1.3/GRMustacheSelectorHelper_v1_3_Test.m
  16. +1 −2  Tests/v1.4/GRMustacheTemplate_v1_4_Test.h
  17. +1 −2  Tests/v1.4/GRMustacheTestSuite_v1_4_Test.h
  18. +1 −1  Tests/v1.4/GRMustacheTestSuite_v1_4_Test.m
  19. +1 −2  Tests/v1.5/GRMustacheBlockHelperTest.h
  20. +1 −2  Tests/v1.5/GRMustacheSelectorHelper_v1_5_Test.h
  21. +1 −2  Tests/v1.7/GRManagedObjectTest.h
  22. +1 −2  Tests/v1.7/GRMustacheTemplate_v1_7_Test.h
  23. +1 −2  Tests/v1.8/GRMustacheDefaultTemplateOptionsTest.h
  24. +1 −2  Tests/v1.8/GRMustacheTestSuite_v1_8_Test.h
  25. +1 −2  Tests/v1.9/GRMustacheDateFormatterHelperTest.h
  26. +1 −2  Tests/v1.9/GRMustacheHelperTest.h
  27. +1 −2  Tests/v1.9/GRMustacheNumberFormatterHelperTest.h
  28. +2 −3 guides/forking.md
View
58 Classes/GRMustacheAvailabilityMacros.h
@@ -39,21 +39,17 @@
/*
- * If min GRMustacheVersion not specified, assume 1.0
+ * If max GRMustacheVersion not specified, assume 1.10
*/
-#ifndef GRMUSTACHE_VERSION_MIN_REQUIRED
-#define GRMUSTACHE_VERSION_MIN_REQUIRED GRMUSTACHE_VERSION_1_0
+#ifndef GRMUSTACHE_VERSION_MAX_ALLOWED
+#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_1_10
#endif
/*
- * if max GRMustacheVersion not specified, assume largerof(1.10, min)
+ * if min GRMustacheVersion not specified, assume max
*/
-#ifndef GRMUSTACHE_VERSION_MAX_ALLOWED
-#if GRMUSTACHE_VERSION_MIN_REQUIRED > GRMUSTACHE_VERSION_1_10
-#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_MIN_REQUIRED
-#else
-#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_1_10
-#endif
+#ifndef GRMUSTACHE_VERSION_MIN_REQUIRED
+#define GRMUSTACHE_VERSION_MIN_REQUIRED GRMUSTACHE_VERSION_MAX_ALLOWED
#endif
@@ -76,13 +72,6 @@
#define AVAILABLE_GRMUSTACHE_VERSION_1_0_AND_LATER
/*
- * TYPE_AVAILABLE_GRMUSTACHE_VERSION_1_0_AND_LATER
- *
- * Used on functions introduced in GRMustache 1.0
- */
-#define TYPE_AVAILABLE_GRMUSTACHE_VERSION_1_0_AND_LATER
-
-/*
* AVAILABLE_GRMUSTACHE_VERSION_1_0_AND_LATER_BUT_DEPRECATED
*
* Used on functions introduced in GRMustache 1.0,
@@ -287,17 +276,6 @@
#endif
/*
- * TYPE_AVAILABLE_GRMUSTACHE_VERSION_1_3_AND_LATER
- *
- * Used on declarations introduced in GRMustache 1.3
- */
-#if GRMUSTACHE_VERSION_MAX_ALLOWED < GRMUSTACHE_VERSION_1_3
-#define TYPE_AVAILABLE_GRMUSTACHE_VERSION_1_3_AND_LATER UNAVAILABLE_ATTRIBUTE
-#else
-#define TYPE_AVAILABLE_GRMUSTACHE_VERSION_1_3_AND_LATER
-#endif
-
-/*
* AVAILABLE_GRMUSTACHE_VERSION_1_3_AND_LATER_BUT_DEPRECATED
*
* Used on declarations introduced in GRMustache 1.3,
@@ -322,18 +300,6 @@
#endif
/*
- * TYPE_AVAILABLE_GRMUSTACHE_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_1_3
- *
- * Used on declarations introduced in GRMustache 1.0,
- * but later deprecated in GRMustache 1.3
- */
-#if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_1_3
-#define TYPE_AVAILABLE_GRMUSTACHE_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_1_3 DEPRECATED_ATTRIBUTE
-#else
-#define TYPE_AVAILABLE_GRMUSTACHE_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_1_3 TYPE_AVAILABLE_GRMUSTACHE_VERSION_1_0_AND_LATER
-#endif
-
-/*
* AVAILABLE_GRMUSTACHE_VERSION_1_1_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_1_3
*
* Used on declarations introduced in GRMustache 1.1,
@@ -536,18 +502,6 @@
#endif
/*
- * TYPE_AVAILABLE_GRMUSTACHE_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_1_5
- *
- * Used on declarations introduced in GRMustache 1.3,
- * but later deprecated in GRMustache 1.5
- */
-#if GRMUSTACHE_VERSION_MIN_REQUIRED >= GRMUSTACHE_VERSION_1_5
-#define TYPE_AVAILABLE_GRMUSTACHE_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_1_5 DEPRECATED_ATTRIBUTE
-#else
-#define TYPE_AVAILABLE_GRMUSTACHE_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_1_5 TYPE_AVAILABLE_GRMUSTACHE_VERSION_1_3_AND_LATER
-#endif
-
-/*
* AVAILABLE_GRMUSTACHE_VERSION_1_4_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_1_5
*
* Used on declarations introduced in GRMustache 1.4,
View
2  Classes/GRMustacheContext.h
@@ -31,7 +31,7 @@
@since v1.3
@deprecated v1.5
*/
-TYPE_AVAILABLE_GRMUSTACHE_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_1_5 @interface GRMustacheContext: NSObject {
+DEPRECATED_IN_GRMUSTACHE_VERSION_1_5_AND_LATER @interface GRMustacheContext: NSObject {
@private
id _object;
GRMustacheContext *_parent;
View
6 Classes/GRMustacheLambda.h
@@ -39,10 +39,10 @@
+ (id)helperWithBlock:(NSString *(^)(GRMustacheSection* section, id context))block AVAILABLE_GRMUSTACHE_VERSION_1_5_AND_LATER;
@end
-typedef NSString *(^GRMustacheRenderingBlock)(GRMustacheSection*, GRMustacheContext*) TYPE_AVAILABLE_GRMUSTACHE_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_1_5;
+typedef NSString *(^GRMustacheRenderingBlock)(GRMustacheSection*, GRMustacheContext*) DEPRECATED_IN_GRMUSTACHE_VERSION_1_5_AND_LATER;
id GRMustacheLambdaBlockMake(GRMustacheRenderingBlock block) AVAILABLE_GRMUSTACHE_VERSION_1_3_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_1_5;
-typedef NSString *(^GRMustacheRenderer)(id object) TYPE_AVAILABLE_GRMUSTACHE_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_1_3;
-typedef id GRMustacheLambda TYPE_AVAILABLE_GRMUSTACHE_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_1_3;
+typedef NSString *(^GRMustacheRenderer)(id object) DEPRECATED_IN_GRMUSTACHE_VERSION_1_3_AND_LATER;
+typedef id GRMustacheLambda DEPRECATED_IN_GRMUSTACHE_VERSION_1_3_AND_LATER;
GRMustacheLambda GRMustacheLambdaMake(NSString *(^block)(NSString *(^)(id object), id, NSString *)) AVAILABLE_GRMUSTACHE_VERSION_1_0_AND_LATER_BUT_DEPRECATED_IN_GRMUSTACHE_VERSION_1_3;
#endif
View
3  Tests/v1.0/GRBoolean_v1_0_Test.h
@@ -20,8 +20,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#define GRMUSTACHE_VERSION_MIN_REQUIRED GRMUSTACHE_VERSION_1_0
-#define GRMUSTACHE_VERSION_MAX_REQUIRED GRMUSTACHE_VERSION_1_0
+#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_1_0
#import "GRMustachePublicAPITest.h"
View
3  Tests/v1.0/GRDotKeyTest.h
@@ -20,8 +20,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#define GRMUSTACHE_VERSION_MIN_REQUIRED GRMUSTACHE_VERSION_1_0
-#define GRMUSTACHE_VERSION_MAX_REQUIRED GRMUSTACHE_VERSION_1_0
+#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_1_0
#import "GRMustachePublicAPITest.h"
View
3  Tests/v1.0/GRMustacheLambdaMakeTest.h
@@ -20,8 +20,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#define GRMUSTACHE_VERSION_MIN_REQUIRED GRMUSTACHE_VERSION_1_0
-#define GRMUSTACHE_VERSION_MAX_REQUIRED GRMUSTACHE_VERSION_1_0
+#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_1_0
#import "GRMustachePublicAPITest.h"
View
3  Tests/v1.0/GRMustacheSpec_v1_0_Test.h
@@ -20,8 +20,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#define GRMUSTACHE_VERSION_MIN_REQUIRED GRMUSTACHE_VERSION_1_0
-#define GRMUSTACHE_VERSION_MAX_REQUIRED GRMUSTACHE_VERSION_1_0
+#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_1_0
#import "GRMustachePublicAPITest.h"
View
3  Tests/v1.0/GRMustacheTemplateLoaderSubclassTest.h
@@ -20,8 +20,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#define GRMUSTACHE_VERSION_MIN_REQUIRED GRMUSTACHE_VERSION_1_0
-#define GRMUSTACHE_VERSION_MAX_REQUIRED GRMUSTACHE_VERSION_1_0
+#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_1_0
#import "GRMustachePublicAPITest.h"
View
3  Tests/v1.0/GRMustacheTemplate_v1_0_Test.h
@@ -20,8 +20,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#define GRMUSTACHE_VERSION_MIN_REQUIRED GRMUSTACHE_VERSION_1_0
-#define GRMUSTACHE_VERSION_MAX_REQUIRED GRMUSTACHE_VERSION_1_0
+#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_1_0
#import "GRMustachePrivateAPITest.h"
@interface GRMustacheTemplate_v1_0_Test : GRMustachePrivateAPITest
View
3  Tests/v1.0/GRMustacheTestSuite_v1_0_Test.h
@@ -20,8 +20,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#define GRMUSTACHE_VERSION_MIN_REQUIRED GRMUSTACHE_VERSION_1_0
-#define GRMUSTACHE_VERSION_MAX_REQUIRED GRMUSTACHE_VERSION_1_0
+#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_1_0
#import "GRMustachePublicAPITest.h"
View
3  Tests/v1.0/GRPartialTest.h
@@ -20,8 +20,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#define GRMUSTACHE_VERSION_MIN_REQUIRED GRMUSTACHE_VERSION_1_0
-#define GRMUSTACHE_VERSION_MAX_REQUIRED GRMUSTACHE_VERSION_1_0
+#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_1_0
#import "GRMustachePublicAPITest.h"
View
3  Tests/v1.1/GRBoolean_v1_1_Test.h
@@ -20,8 +20,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#define GRMUSTACHE_VERSION_MIN_REQUIRED GRMUSTACHE_VERSION_1_1
-#define GRMUSTACHE_VERSION_MAX_REQUIRED GRMUSTACHE_VERSION_1_1
+#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_1_1
#import "GRMustachePublicAPITest.h"
View
3  Tests/v1.3/GRMustacheLambdaBlockMakeTest.h
@@ -20,8 +20,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#define GRMUSTACHE_VERSION_MIN_REQUIRED GRMUSTACHE_VERSION_1_3
-#define GRMUSTACHE_VERSION_MAX_REQUIRED GRMUSTACHE_VERSION_1_3
+#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_1_3
#import "GRMustachePublicAPITest.h"
View
3  Tests/v1.3/GRMustacheSelectorHelper_v1_3_Test.h
@@ -20,8 +20,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#define GRMUSTACHE_VERSION_MIN_REQUIRED GRMUSTACHE_VERSION_1_3
-#define GRMUSTACHE_VERSION_MAX_REQUIRED GRMUSTACHE_VERSION_1_3
+#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_1_3
#import "GRMustachePublicAPITest.h"
View
35 Tests/v1.3/GRMustacheSelectorHelper_v1_3_Test.m
@@ -28,14 +28,24 @@ @interface GRMustacheSelectorHelper_v1_3_TestContext: NSObject
@implementation GRMustacheSelectorHelper_v1_3_TestContext
-- (NSString*)boldSection:(GRMustacheSection *)section withContext:(GRMustacheContext *)context {
- return [NSString stringWithFormat:@"<b>%@</b>", [section renderObject:context]];
+- (NSString*)linkSection:(GRMustacheSection *)section withContext:(GRMustacheContext *)context {
+ return [NSString stringWithFormat:
+ @"<a href=\"/people/%@\">%@</a>",
+ [context valueForKey:@"id"],
+ [section renderObject:context]];
+}
+
+- (NSString *)id {
+ return @"1";
+}
+
+- (NSString *)name {
+ return @"foo";
}
+ (NSString*)linkSection:(GRMustacheSection *)section withContext:(GRMustacheContext *)context {
return [NSString stringWithFormat:
- @"<a href=\"/people/%@\">%@</a>",
- [context valueForKey:@"id"],
+ @"<a href=\"/people\">%@</a>",
[section renderObject:context]];
}
@@ -44,24 +54,17 @@ + (NSString*)linkSection:(GRMustacheSection *)section withContext:(GRMustacheCon
@implementation GRMustacheSelectorHelper_v1_3_Test
- (void)testHelperInstanceMethod {
- NSString *templateString = @"{{#bold}}text{{/bold}}";
+ NSString *templateString = @"{{#link}}{{name}}{{/link}}";
id context = [[[GRMustacheSelectorHelper_v1_3_TestContext alloc] init] autorelease];
NSString *result = [GRMustacheTemplate renderObject:context fromString:templateString error:nil];
- STAssertEqualObjects(result, @"<b>text</b>", nil);
+ STAssertEqualObjects(result, @"<a href=\"/people/1\">foo</a>", nil);
}
- (void)testHelperClassMethod {
- NSString *templateString = @"<ul>{{#people}}<li>{{#link}}{{name}}{{/link}}</li>{{/people}}</ul>";
- NSDictionary *data = [NSDictionary dictionaryWithObjectsAndKeys:
- [NSArray arrayWithObjects:
- [NSDictionary dictionaryWithObjectsAndKeys:@"Alan", @"name", @"1", @"id", nil],
- [NSDictionary dictionaryWithObjectsAndKeys:@"Roger", @"name", @"2", @"id", nil],
- nil], @"people",
- nil
- ];
+ NSString *templateString = @"{{#link}}{{name}}{{/link}}";
GRMustacheTemplate *template = [GRMustacheTemplate parseString:templateString error:nil];;
- NSString *result = [template renderObjects:[GRMustacheSelectorHelper_v1_3_TestContext class], data, nil];
- STAssertEqualObjects(result, @"<ul><li><a href=\"/people/1\">Alan</a></li><li><a href=\"/people/2\">Roger</a></li></ul>", nil);
+ NSString *result = [template renderObject:[GRMustacheSelectorHelper_v1_3_TestContext class]];
+ STAssertEqualObjects(result, @"<a href=\"/people\"></a>", nil);
}
@end
View
3  Tests/v1.4/GRMustacheTemplate_v1_4_Test.h
@@ -20,8 +20,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#define GRMUSTACHE_VERSION_MIN_REQUIRED GRMUSTACHE_VERSION_1_4
-#define GRMUSTACHE_VERSION_MAX_REQUIRED GRMUSTACHE_VERSION_1_4
+#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_1_4
#import "GRMustachePublicAPITest.h"
View
3  Tests/v1.4/GRMustacheTestSuite_v1_4_Test.h
@@ -20,8 +20,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#define GRMUSTACHE_VERSION_MIN_REQUIRED GRMUSTACHE_VERSION_1_4
-#define GRMUSTACHE_VERSION_MAX_REQUIRED GRMUSTACHE_VERSION_1_4
+#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_1_4
#import "GRMustachePublicAPITest.h"
View
2  Tests/v1.4/GRMustacheTestSuite_v1_4_Test.m
@@ -123,7 +123,7 @@ - (void)testSuiteTest:(NSDictionary *)suiteTest inSuiteNamed:(NSString *)suiteNa
[fm createDirectoryAtPath:[templatePath stringByDeletingLastPathComponent] withIntermediateDirectories:YES attributes:nil error:&error];
[fm createFileAtPath:templatePath contents:[templateString dataUsingEncoding:NSUTF8StringEncoding] attributes:nil];
}
- loader = [GRMustacheTemplateLoader templateLoaderWithDirectory:templatesDirectoryPath extension:[baseTemplatePath pathExtension]];
+ loader = [GRMustacheTemplateLoader templateLoaderWithBasePath:templatesDirectoryPath extension:[baseTemplatePath pathExtension]];
template = [loader parseTemplateNamed:[baseTemplatePath stringByDeletingPathExtension] error:&error];
} else {
loader = [GRMustacheTestSuiteTemplateLoader_v1_4 loaderWithDictionary:partials];
View
3  Tests/v1.5/GRMustacheBlockHelperTest.h
@@ -20,8 +20,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#define GRMUSTACHE_VERSION_MIN_REQUIRED GRMUSTACHE_VERSION_1_5
-#define GRMUSTACHE_VERSION_MAX_REQUIRED GRMUSTACHE_VERSION_1_5
+#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_1_5
#import "GRMustachePublicAPITest.h"
View
3  Tests/v1.5/GRMustacheSelectorHelper_v1_5_Test.h
@@ -20,8 +20,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#define GRMUSTACHE_VERSION_MIN_REQUIRED GRMUSTACHE_VERSION_1_5
-#define GRMUSTACHE_VERSION_MAX_REQUIRED GRMUSTACHE_VERSION_1_5
+#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_1_5
#import "GRMustachePublicAPITest.h"
View
3  Tests/v1.7/GRManagedObjectTest.h
@@ -20,8 +20,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#define GRMUSTACHE_VERSION_MIN_REQUIRED GRMUSTACHE_VERSION_1_7
-#define GRMUSTACHE_VERSION_MAX_REQUIRED GRMUSTACHE_VERSION_1_7
+#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_1_7
#import "GRMustachePublicAPITest.h"
#import <CoreData/CoreData.h>
View
3  Tests/v1.7/GRMustacheTemplate_v1_7_Test.h
@@ -20,8 +20,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#define GRMUSTACHE_VERSION_MIN_REQUIRED GRMUSTACHE_VERSION_1_7
-#define GRMUSTACHE_VERSION_MAX_REQUIRED GRMUSTACHE_VERSION_1_7
+#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_1_7
#import "GRMustachePublicAPITest.h"
View
3  Tests/v1.8/GRMustacheDefaultTemplateOptionsTest.h
@@ -20,8 +20,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#define GRMUSTACHE_VERSION_MIN_REQUIRED GRMUSTACHE_VERSION_1_8
-#define GRMUSTACHE_VERSION_MAX_REQUIRED GRMUSTACHE_VERSION_1_8
+#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_1_8
#import "GRMustachePublicAPITest.h"
View
3  Tests/v1.8/GRMustacheTestSuite_v1_8_Test.h
@@ -20,8 +20,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#define GRMUSTACHE_VERSION_MIN_REQUIRED GRMUSTACHE_VERSION_1_8
-#define GRMUSTACHE_VERSION_MAX_REQUIRED GRMUSTACHE_VERSION_1_8
+#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_1_8
#import "GRMustachePublicAPITest.h"
View
3  Tests/v1.9/GRMustacheDateFormatterHelperTest.h
@@ -20,8 +20,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#define GRMUSTACHE_VERSION_MIN_REQUIRED GRMUSTACHE_VERSION_1_9
-#define GRMUSTACHE_VERSION_MAX_REQUIRED GRMUSTACHE_VERSION_1_9
+#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_1_9
#import "GRMustachePublicAPITest.h"
@interface GRMustacheDateFormatterHelperTest : GRMustachePublicAPITest
View
3  Tests/v1.9/GRMustacheHelperTest.h
@@ -20,8 +20,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#define GRMUSTACHE_VERSION_MIN_REQUIRED GRMUSTACHE_VERSION_1_9
-#define GRMUSTACHE_VERSION_MAX_REQUIRED GRMUSTACHE_VERSION_1_9
+#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_1_9
#import "GRMustachePublicAPITest.h"
@interface GRMustacheHelperTest : GRMustachePublicAPITest
View
3  Tests/v1.9/GRMustacheNumberFormatterHelperTest.h
@@ -20,8 +20,7 @@
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
-#define GRMUSTACHE_VERSION_MIN_REQUIRED GRMUSTACHE_VERSION_1_9
-#define GRMUSTACHE_VERSION_MAX_REQUIRED GRMUSTACHE_VERSION_1_9
+#define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_1_9
#import "GRMustachePublicAPITest.h"
@interface GRMustacheNumberFormatterHelperTest : GRMustachePublicAPITest
View
5 guides/forking.md
@@ -60,11 +60,10 @@ You will use the macros defined in `Classes/GRMustacheAvailabilityMacros.h`. The
For instance, all header files for public API tests in `Tests/v1.4` begin with:
- #define GRMUSTACHE_VERSION_MIN_REQUIRED GRMUSTACHE_VERSION_1_4
- #define GRMUSTACHE_VERSION_MAX_REQUIRED GRMUSTACHE_VERSION_1_4
+ #define GRMUSTACHE_VERSION_MAX_ALLOWED GRMUSTACHE_VERSION_1_4
#import "GRMustachePublicAPITest.h"
-When you add a test for a specific behavior of a public API, make sure you place it in the version that introduced this behavior (check the release notes).
+When you add a test for a public API, make sure you place it in the folder that introduced the API (check the release notes), and NOT in the version that will include the new code. For instance, if version 1.6 introduces a fix for an API that was introduced in version 1.2, the version 1.6 will then ship with new tests in the Tests/v1.2 folder.
## Building
Please sign in to comment.
Something went wrong with that request. Please try again.