Skip to content

Commit

Permalink
Rename variables in test to be more idiomatic
Browse files Browse the repository at this point in the history
  • Loading branch information
fvbommel committed Sep 20, 2020
1 parent a1ddee9 commit 737e6f1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions natsort_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ import (
)

func TestStringSort(t *testing.T) {
a := []string{
want := []string{
"ab", "abc1",
"abc01", "abc2",
"abc5", "abc10",
}
b := []string{
got := []string{
"abc5", "abc1",
"abc01", "ab",
"abc10", "abc2",
}
sort.Sort(Natural(b))
if !reflect.DeepEqual(a, b) {
t.Errorf("Error: sort failed, expected: %#q, got: %#q", a, b)
sort.Sort(Natural(got))
if !reflect.DeepEqual(want, got) {
t.Errorf("Error: sort failed, expected: %#q, got: %#q", want, got)
}
}

Expand Down

0 comments on commit 737e6f1

Please sign in to comment.