Skip to content

Commit

Permalink
add a nil case to ValueFromPtr
Browse files Browse the repository at this point in the history
  • Loading branch information
3vilhamster committed Nov 11, 2024
1 parent d2b87f4 commit e209ff6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/common/convert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ func TestValueFromPtr(t *testing.T) {
assert.Equal(t, 1.1, ValueFromPtr(PtrOf(1.1)))
assert.Equal(t, true, ValueFromPtr(PtrOf(true)))
assert.Equal(t, []string{"a"}, ValueFromPtr(PtrOf([]string{"a"})))
assert.Equal(t, "" /* default value */, ValueFromPtr((*string)(nil)))
}

func TestZero(t *testing.T) {
Expand Down

0 comments on commit e209ff6

Please sign in to comment.