|
Groovy example source code file (CurlyBracketLayoutTest.groovy)
The Groovy CurlyBracketLayoutTest.groovy source code
package groovy
class CurlyBracketLayoutTest extends GroovyTestCase
{
void testBracketPlacement()
{
def foo = "abc"
if (foo.contains("b"))
{
println "Worked a treat. foo = $foo"
}
else
{
fail("Should have found 'b' inside $foo")
}
def list = [1, 2, 3]
list.each
{
println it
}
}
}
Other Groovy examples (source code examples)Here is a short list of links related to this Groovy CurlyBracketLayoutTest.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.