|
Groovy example source code file (ChainedAssignmentTest.groovy)
The Groovy ChainedAssignmentTest.groovy source code
package groovy
class ChainedAssignmentTest extends GroovyTestCase {
def dummy(v) {
print v
}
void testCompare() {
def i = 123
def s = "hello"
def i2
def i1 = i2 = i;
assert i1 == 123
assert i2 == 123
def s1
dummy(s1 = s)
assert s1 == "hello"
}
}
Other Groovy examples (source code examples)Here is a short list of links related to this Groovy ChainedAssignmentTest.groovy source code file: |
Other websites by Alvin Alexander:
Life/living in Alaska (OneMansAlaska.com)
How I Sold My Business (HowISoldMyBusiness.com)
Copyright 1998-2011 Alvin Alexander, devdaily.com
All Rights Reserved.