File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 4
4
"errors"
5
5
"fmt"
6
6
"reflect"
7
+ "sort"
7
8
"testing"
8
9
"time"
9
10
"unsafe"
@@ -1549,11 +1550,12 @@ func TestSliceOrderString(t *testing.T) {
1549
1550
if len (diff ) != 3 {
1550
1551
t .Fatalf ("expected 2 diff, got %d: %s" , len (diff ), diff )
1551
1552
}
1552
- if diff [0 ] != "(unordered) slice[]=foo: value count: 1 != 0" {
1553
- t .Errorf ("got %s, expected '(unordered) slice[]=foo: value count: 1 != 0" , diff [0 ])
1553
+ sort .Strings (diff )
1554
+ if diff [0 ] != "(unordered) slice[]=bar: value count: 1 != 0" {
1555
+ t .Errorf ("got %s, expected '(unordered) slice[]=bar: value count: 1 != 0'" , diff [0 ])
1554
1556
}
1555
- if diff [1 ] != "(unordered) slice[]=bar : value count: 1 != 0" {
1556
- t .Errorf ("got %s, expected '(unordered) slice[]=bar : value count: 1 != 0' " , diff [1 ])
1557
+ if diff [1 ] != "(unordered) slice[]=foo : value count: 1 != 0" {
1558
+ t .Errorf ("got %s, expected '(unordered) slice[]=foo : value count: 1 != 0" , diff [1 ])
1557
1559
}
1558
1560
if diff [2 ] != "(unordered) slice[]=x: value count: 0 != 1" {
1559
1561
t .Errorf ("got %s, expected '(unordered) slice[]=x: value count: 0 != 1'" , diff [2 ])
You can’t perform that action at this time.
0 commit comments