Skip to content

Commit

Permalink
minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
qingyang-hu committed Mar 20, 2024
1 parent 00592df commit 60820b9
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions bson/decoder_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ func TestDecodingInterfaces(t *testing.T) {

receiver := testStruct{&value}

check := func(*testing.T) {
check := func(t *testing.T) {
t.Helper()
assert.Equal(t, "foo", value)
}

Expand All @@ -94,7 +95,8 @@ func TestDecodingInterfaces(t *testing.T) {

receiver := testStruct{&value}

check := func(*testing.T) {
check := func(t *testing.T) {
t.Helper()
assert.Equal(t, "foo", value.Data)
}

Expand All @@ -117,7 +119,8 @@ func TestDecodingInterfaces(t *testing.T) {

receiver := testStruct{&values}

check := func(*testing.T) {
check := func(t *testing.T) {
t.Helper()
assert.Equal(t, []string{"foo", "bar"}, values)
}

Expand All @@ -140,7 +143,8 @@ func TestDecodingInterfaces(t *testing.T) {

receiver := testStruct{&values}

check := func(*testing.T) {
check := func(t *testing.T) {
t.Helper()
assert.Equal(t, [2]string{"foo", "bar"}, values)
}

Expand All @@ -164,7 +168,8 @@ func TestDecodingInterfaces(t *testing.T) {

receiver := testStruct{[]interface{}{&str, &i}}

check := func(*testing.T) {
check := func(t *testing.T) {
t.Helper()
assert.Equal(t, "foo", str)
assert.Equal(t, 42, i)
}
Expand Down

0 comments on commit 60820b9

Please sign in to comment.