Fresh dep ensure

This commit is contained in:
Mike Cronce
2018-11-26 13:23:56 -05:00
parent 93cb8a04d7
commit 407478ab9a
9016 changed files with 551394 additions and 279685 deletions

9
vendor/k8s.io/utils/pointer/OWNERS generated vendored Normal file
View File

@ -0,0 +1,9 @@
# See the OWNERS docs at https://go.k8s.io/owners
approvers:
- apelisse
- stewart-yu
- thockin
reviewers:
- apelisse
- stewart-yu
- thockin

View File

@ -74,3 +74,13 @@ func BoolPtr(b bool) *bool {
func StringPtr(s string) *string {
return &s
}
// Float32Ptr returns a pointer to the passed float32.
func Float32Ptr(i float32) *float32 {
return &i
}
// Float64Ptr returns a pointer to the passed float64.
func Float64Ptr(i float64) *float64 {
return &i
}

View File

@ -17,6 +17,8 @@ limitations under the License.
package pointer
import (
"fmt"
"reflect"
"testing"
)
@ -59,8 +61,12 @@ func TestAllPtrFieldsNil(t *testing.T) {
{(*struct{})(nil), true},
}
for i, tc := range testCases {
if AllPtrFieldsNil(tc.obj) != tc.expected {
t.Errorf("case[%d]: expected %t, got %t", i, tc.expected, !tc.expected)
}
name := fmt.Sprintf("case[%d]", i)
t.Run(name, func(t *testing.T) {
actualErr := AllPtrFieldsNil(tc.obj)
if !reflect.DeepEqual(tc.expected, actualErr) {
t.Errorf("%s: expected %t, got %t", name, tc.expected, !tc.expected)
}
})
}
}