|
Groovy example source code file (Groovy831_Bug.groovy)
The Groovy Groovy831_Bug.groovy source codepackage groovy.bugs /** * Test for fixing the Jira issue GROOVY-831 * * @author Pilho Kim * @version $Revision: 3827 $ */ class Groovy831_Bug extends GroovyTestCase { String[] cities = ['Seoul', 'London', 'Wasington'] int[] intArrayData = [1, 3, 5] public String[] countries = [ 'Republic of Korea', 'United Kingdom', 'United State of America'] public int[] intArray = [ 2, 4, 6 ] void testSetFieldProperty() { assert cities.size() == 3 assert cities[0] == 'Seoul' assert cities[1] == 'London' assert cities[2] == 'Wasington' assert intArrayData.size() == 3 assert intArrayData[0] == 1 assert intArrayData[1] == 3 assert intArrayData[2] == 5 } void testSetFieldVariable() { assert countries.size() == 3 assert countries[0] == 'Republic of Korea' assert countries[1] == 'United Kingdom' assert countries[2] == 'United State of America' assert intArray[0] == 2 assert intArray[1] == 4 assert intArray[2] == 6 } } Other Groovy examples (source code examples)Here is a short list of links related to this Groovy Groovy831_Bug.groovy source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.