|
Groovy example source code file (RodsBug.groovy)
The Groovy RodsBug.groovy source code
package groovy.bugs
/**
* @author Rod Cope
* @version $Revision: 4996 $
*/
class RodsBug extends GroovyTestCase {
void testBug() {
doTest(true)
/*
def x = 1
if (x > 0) {
String name = "Rod"
println(name)
}
*/
}
void testBug2() {
def x = 1
if (x > 0) {
//String name = "Rod"
def name = "Rod"
println(name)
}
}
void doTest(flag) {
if (flag) {
String name = "Rod"
//def name = "Rod"
doAssert(name)
}
}
void doTest() {
String name = "Rod"
doAssert(name)
}
void doAssert(text) {
assert text != null
}
}
Other Groovy examples (source code examples)Here is a short list of links related to this Groovy RodsBug.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.