Merge pull request #2886 from banan314/master

[groovy/many] small fix in iteration over a map
This commit is contained in:
Andre Polykanine A.K.A. Menelion Elensúlë 2017-10-08 15:44:58 +03:00 committed by GitHub
commit 39665aaad7
5 changed files with 15 additions and 5 deletions

View File

@ -233,10 +233,12 @@ for (i in array) {
//Itera per un mapa
def map = ['name':'Roberto', 'framework':'Grails', 'language':'Groovy']
x = 0
x = ""
for ( e in map ) {
x += e.value
x += " "
}
assert x.equals("Roberto Grails Groovy ")
/*
Operadors

View File

@ -232,10 +232,12 @@ for (i in array) {
// Iterando sobre un mapa
def map = ['name':'Roberto', 'framework':'Grails', 'language':'Groovy']
x = 0
x = ""
for ( e in map ) {
x += e.value
x += " "
}
assert x.equals("Roberto Grails Groovy ")
/*
Operadores

View File

@ -230,10 +230,12 @@ for (i in array) {
//Iterate over a map
def map = ['name':'Roberto', 'framework':'Grails', 'language':'Groovy']
x = 0
x = ""
for ( e in map ) {
x += e.value
x += " "
}
assert x.equals("Roberto Grails Groovy ")
/*
Operators

View File

@ -226,10 +226,12 @@ for (i in array) {
//Itera sobre um mapa
def map = ['name':'Roberto', 'framework':'Grails', 'language':'Groovy']
x = 0
x = ""
for ( e in map ) {
x += e.value
x += " "
}
assert x.equals("Roberto Grails Groovy ")
/*
Operadores

View File

@ -219,10 +219,12 @@ for (i in array) {
//
def map = ['name':'Roberto', 'framework':'Grails', 'language':'Groovy']
x = 0
x = ""
for ( e in map ) {
x += e.value
x += " "
}
assert x.equals("Roberto Grails Groovy ")
/*