Skip to content

Commit

Permalink
Added The Test For Bytes()
Browse files Browse the repository at this point in the history
  • Loading branch information
sabify authored May 31, 2019
1 parent 31ba2fc commit 8d45742
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ulid_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ func TestULID_Bytes(t *testing.T) {
id := ulid.MustNew(ulid.Timestamp(tt), entropy)
bid := id.Bytes()
bid[len(bid)-1]++
if bytes.Compare(id.Bytes(), bid) == 0 {
if bytes.Equal(id.Bytes(), bid) {
t.Error("Bytes() returned a reference to ulid underlying array!")
}
}
Expand Down

0 comments on commit 8d45742

Please sign in to comment.