mirror of https://bitbucket.org/ausocean/av.git
Remove unnecessary underscores from for loops with ranges.
This commit is contained in:
parent
65d0952dd3
commit
a1d328b376
|
@ -124,7 +124,7 @@ func TestProperties(t *testing.T) {
|
|||
// Encode/decode Number properties.
|
||||
enc := buf[:]
|
||||
var err error
|
||||
for i, _ := range testNumbers {
|
||||
for i := range testNumbers {
|
||||
enc, err = EncodeProperty(&Property{Type: typeNumber, Number: float64(testNumbers[i])}, enc)
|
||||
if err != nil {
|
||||
t.Errorf("EncodeProperty of Number failed")
|
||||
|
@ -134,7 +134,7 @@ func TestProperties(t *testing.T) {
|
|||
|
||||
prop := Property{}
|
||||
dec := buf[:]
|
||||
for i, _ := range testNumbers {
|
||||
for i := range testNumbers {
|
||||
n, err := DecodeProperty(&prop, dec, false)
|
||||
if err != nil {
|
||||
t.Errorf("DecodeProperty of Number failed")
|
||||
|
@ -147,7 +147,7 @@ func TestProperties(t *testing.T) {
|
|||
|
||||
// Encode/decode string properties.
|
||||
enc = buf[:]
|
||||
for i, _ := range testStrings {
|
||||
for i := range testStrings {
|
||||
enc, err = EncodeProperty(&Property{Type: typeString, String: testStrings[i]}, enc)
|
||||
if err != nil {
|
||||
t.Errorf("EncodeProperty of string failed")
|
||||
|
@ -156,7 +156,7 @@ func TestProperties(t *testing.T) {
|
|||
}
|
||||
prop = Property{}
|
||||
dec = buf[:]
|
||||
for i, _ := range testStrings {
|
||||
for i := range testStrings {
|
||||
n, err := DecodeProperty(&prop, dec, false)
|
||||
if err != nil {
|
||||
t.Errorf("DecodeProperty of string failed")
|
||||
|
@ -234,7 +234,7 @@ func TestObject(t *testing.T) {
|
|||
|
||||
// Construct a more complicated object that includes a nested object.
|
||||
var obj2 Object
|
||||
for i, _ := range testStrings {
|
||||
for i := range testStrings {
|
||||
obj2.Properties = append(obj2.Properties, Property{Type: typeString, String: testStrings[i]})
|
||||
obj2.Properties = append(obj2.Properties, Property{Type: typeNumber, Number: float64(testNumbers[i])})
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue