Permalink
Browse files

upgraded to latest app engine sdk

  • Loading branch information...
musketyr committed May 9, 2015
1 parent d5b8118 commit df55665c32850bea5d18df877029ee4b227a9609
View
@@ -9,7 +9,7 @@ allprojects {
}
version = '2.1.2'
version = '2.2'
group = 'org.gaelyk'
}
View
@@ -1,7 +1,7 @@
ext.gaelykGroovyVersion = '2.3.0'
ext.gaelykSpockVersion = '0.7-groovy-2.0'
ext.gaelykAppEngineVersion = '1.9.4'
ext.gaelykLatestVersion = '2.1.2'
ext.gaelykAppEngineVersion = '1.9.19'
ext.gaelykLatestVersion = '2.2'
ext.gaelykSpockLatestVersion = '0.4'
ext.gaelykGradleVersion = '1.10'
@@ -53,7 +53,11 @@ class SearchQueryStringCategory {
}
"~\"$self\""
}
static String plus(String self, String other){
handleOverloadedComparisonOperator(' + ', self, other)
}
static String plus(String self, Object other){
handleOverloadedComparisonOperator(' + ', self, other)
}
@@ -3,52 +3,58 @@ package groovyx.gaelyk.search
import spock.lang.Specification
import spock.util.mop.Use
import java.text.SimpleDateFormat
class SearchQueryStringCategorySpec extends Specification {
@Use(SearchQueryStringCategory)
def "Methods for overloaded operators works as expected"(){
Date theBeginning = Date.parse("yyyy-M-d", "1970-1-1")
def format = new SimpleDateFormat("yyyy-M-d")
Date theBeginning = format.parse("1970-1-1")
String refDate = groovyx.gaelyk.search.SearchQueryStringCategory.DATE_FORMAT.format(theBeginning)
expect:
'a'.greaterThan('b') == 'a > "b"'
'a'.greaterThan(10) == 'a > 10'
'a'.greaterThan(theBeginning) == 'a > 1970-1-1'
'a'.greaterThan(theBeginning) == "a > $refDate"
'a'.greaterThanEqual('b') == 'a >= "b"'
'a'.greaterThanEqual(10) == 'a >= 10'
'a'.greaterThanEqual(theBeginning) == 'a >= 1970-1-1'
'a'.greaterThanEqual(theBeginning) == "a >= $refDate"
'a'.lowerThan('b') == 'a < "b"'
'a'.lowerThan(10) == 'a < 10'
'a'.lowerThan(theBeginning) == 'a < 1970-1-1'
'a'.lowerThan(theBeginning) == "a < $refDate"
'a'.lowerThanEqual('b') == 'a <= "b"'
'a'.lowerThanEqual(10) == 'a <= 10'
'a'.lowerThanEqual(theBeginning) == 'a <= 1970-1-1'
'a'.lowerThanEqual(theBeginning) == "a <= $refDate"
'a'.and('b') == '(a) AND (b)'
'a'.or('b') == '(a) OR (b)'
'a'.isEqualTo('b') == 'a = "b"'
'a'.isEqualTo(10) == 'a = 10'
'a'.isEqualTo(theBeginning) == 'a = 1970-1-1'
'a'.isEqualTo(theBeginning) == "a = $refDate"
'a'.isNotEqualTo('b') == 'NOT (a = "b")'
'a'.isNotEqualTo(10) == 'NOT (a = 10)'
'a'.isNotEqualTo(theBeginning) == 'NOT (a = 1970-1-1)'
'a'.isNotEqualTo(theBeginning) == "NOT (a = $refDate)"
'a'.isSameAs('b') == 'a: "b"'
'a'.isSameAs(10) == 'a: 10'
'a'.isSameAs(theBeginning) == 'a: 1970-1-1'
'a'.isSameAs(theBeginning) == "a: $refDate"
'a'.not() == 'NOT (a)'
'a'.plus('b') == 'a + "b"'
'a'.plus(10) == 'a + 10'
'a'.plus(theBeginning) == 'a + 1970-1-1'
'a'.plus(theBeginning) == "a + $refDate"
'a'.minus('b') == 'a - "b"'
'a'.minus(10) == 'a - 10'
'a'.minus(theBeginning) == 'a - 1970-1-1'
'a'.minus(theBeginning) == "a - $refDate"
'a'.multiply('b') == 'a * "b"'
'a'.multiply(10) == 'a * 10'
'a'.multiply(theBeginning) == 'a * 1970-1-1'
'a'.multiply(theBeginning) == "a * $refDate"
'a'.div('b') == 'a / "b"'
'a'.div(10) == 'a / 10'
'a'.div(theBeginning) == 'a / 1970-1-1'
'a'.div(theBeginning) == "a / $refDate"
'a'.bitwiseNegate() == '~"a"'
'"a"'.bitwiseNegate() == '~"a"'
'a'.plus('b') == 'a + "b"'
}
@@ -1,6 +1,6 @@
#Sun Mar 23 14:56:43 CET 2014
#Sat May 09 06:25:56 CEST 2015
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-1.10-bin.zip
distributionUrl=http\://services.gradle.org/distributions/gradle-1.10-all.zip

0 comments on commit df55665

Please sign in to comment.