Skip to content

Commit

Permalink
assert.Equal for test
Browse files Browse the repository at this point in the history
  • Loading branch information
liuzl committed Oct 19, 2018
1 parent f8592ad commit 3d4589e
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions base62_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ package goutil

import (
"testing"

"github.com/stretchr/testify/assert"
)

func TestBase62(t *testing.T) {
Expand All @@ -12,15 +14,11 @@ func TestBase62(t *testing.T) {
}
for k, v := range cases {
v1 := ToB62(k)
if v1 != v {
t.Error(v, v1)
}
assert.Equal(t, v, v1, "should be equal")
k1, err := FromB62(v)
if err != nil {
t.Error(err)
}
if k1 != k {
t.Error(k, k1)
}
assert.Equal(t, k, k1, "should be equal")
}
}

0 comments on commit 3d4589e

Please sign in to comment.