"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/test/groovy/transform/stc/MiscSTCTest.groovy" between
apache-groovy-src-3.0.8.zip and apache-groovy-src-3.0.9.zip

About: Groovy is an agile dynamic (scripting) language for the Java Platform. It has features similar to those of Python, Ruby, Perl, and Smalltalk. Source release.

MiscSTCTest.groovy  (apache-groovy-src-3.0.8):MiscSTCTest.groovy  (apache-groovy-src-3.0.9)
skipping to change at line 186 skipping to change at line 186
void testCompareEnumToNull() { void testCompareEnumToNull() {
assertScript ''' assertScript '''
enum MyEnum { a,b } enum MyEnum { a,b }
MyEnum val = null MyEnum val = null
if (val == null) { if (val == null) {
val = MyEnum.a val = MyEnum.a
} }
''' '''
} }
// GROOVY-10197
void testEnumMethodOverride() {
assertScript '''
enum E {
CONST {
int getValue() { 1 }
}
int getValue() { -1 }
}
assert E.CONST.value == 1
'''
assertScript '''
enum E {
CONST {
final int value = 1
}
int getValue() { -1 }
}
assert E.CONST.value == 1
'''
}
void testMethodReturnTypeInferenceShouldNotWorkBecauseNotSameSourceUnit() { void testMethodReturnTypeInferenceShouldNotWorkBecauseNotSameSourceUnit() {
shouldFailWithMessages ''' shouldFailWithMessages '''
import groovy.transform.stc.MiscSTCTest.MiscSTCTestSupport as A import groovy.transform.stc.MiscSTCTest.MiscSTCTestSupport as A
A.foo().toInteger() A.foo().toInteger()
''', 'Cannot find matching method java.lang.Object#toInteger()' ''', 'Cannot find matching method java.lang.Object#toInteger()'
} }
void testClassLiteralAsArgument() { void testClassLiteralAsArgument() {
assertScript ''' assertScript '''
void lookup(Class clazz) { } void lookup(Class clazz) { }
 End of changes. 1 change blocks. 
0 lines changed or deleted 22 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)