Bump k8s deps to v1.20.1
Signed-off-by: Davanum Srinivas <davanum@gmail.com>
This commit is contained in:
		
							
								
								
									
										218
									
								
								vendor/github.com/stretchr/testify/require/require_forward.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										218
									
								
								vendor/github.com/stretchr/testify/require/require_forward.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -54,7 +54,8 @@ func (a *Assertions) Containsf(s interface{}, contains interface{}, msg string,
 | 
			
		||||
	Containsf(a.t, s, contains, msg, args...)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// DirExists checks whether a directory exists in the given path. It also fails if the path is a file rather a directory or there is an error checking whether it exists.
 | 
			
		||||
// DirExists checks whether a directory exists in the given path. It also fails
 | 
			
		||||
// if the path is a file rather a directory or there is an error checking whether it exists.
 | 
			
		||||
func (a *Assertions) DirExists(path string, msgAndArgs ...interface{}) {
 | 
			
		||||
	if h, ok := a.t.(tHelper); ok {
 | 
			
		||||
		h.Helper()
 | 
			
		||||
@@ -62,7 +63,8 @@ func (a *Assertions) DirExists(path string, msgAndArgs ...interface{}) {
 | 
			
		||||
	DirExists(a.t, path, msgAndArgs...)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// DirExistsf checks whether a directory exists in the given path. It also fails if the path is a file rather a directory or there is an error checking whether it exists.
 | 
			
		||||
// DirExistsf checks whether a directory exists in the given path. It also fails
 | 
			
		||||
// if the path is a file rather a directory or there is an error checking whether it exists.
 | 
			
		||||
func (a *Assertions) DirExistsf(path string, msg string, args ...interface{}) {
 | 
			
		||||
	if h, ok := a.t.(tHelper); ok {
 | 
			
		||||
		h.Helper()
 | 
			
		||||
@@ -168,7 +170,7 @@ func (a *Assertions) EqualValues(expected interface{}, actual interface{}, msgAn
 | 
			
		||||
// EqualValuesf asserts that two objects are equal or convertable to the same types
 | 
			
		||||
// and equal.
 | 
			
		||||
//
 | 
			
		||||
//    a.EqualValuesf(uint32(123, "error message %s", "formatted"), int32(123))
 | 
			
		||||
//    a.EqualValuesf(uint32(123), int32(123), "error message %s", "formatted")
 | 
			
		||||
func (a *Assertions) EqualValuesf(expected interface{}, actual interface{}, msg string, args ...interface{}) {
 | 
			
		||||
	if h, ok := a.t.(tHelper); ok {
 | 
			
		||||
		h.Helper()
 | 
			
		||||
@@ -250,7 +252,7 @@ func (a *Assertions) Exactly(expected interface{}, actual interface{}, msgAndArg
 | 
			
		||||
 | 
			
		||||
// Exactlyf asserts that two objects are equal in value and type.
 | 
			
		||||
//
 | 
			
		||||
//    a.Exactlyf(int32(123, "error message %s", "formatted"), int64(123))
 | 
			
		||||
//    a.Exactlyf(int32(123), int64(123), "error message %s", "formatted")
 | 
			
		||||
func (a *Assertions) Exactlyf(expected interface{}, actual interface{}, msg string, args ...interface{}) {
 | 
			
		||||
	if h, ok := a.t.(tHelper); ok {
 | 
			
		||||
		h.Helper()
 | 
			
		||||
@@ -310,7 +312,8 @@ func (a *Assertions) Falsef(value bool, msg string, args ...interface{}) {
 | 
			
		||||
	Falsef(a.t, value, msg, args...)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// FileExists checks whether a file exists in the given path. It also fails if the path points to a directory or there is an error when trying to check the file.
 | 
			
		||||
// FileExists checks whether a file exists in the given path. It also fails if
 | 
			
		||||
// the path points to a directory or there is an error when trying to check the file.
 | 
			
		||||
func (a *Assertions) FileExists(path string, msgAndArgs ...interface{}) {
 | 
			
		||||
	if h, ok := a.t.(tHelper); ok {
 | 
			
		||||
		h.Helper()
 | 
			
		||||
@@ -318,7 +321,8 @@ func (a *Assertions) FileExists(path string, msgAndArgs ...interface{}) {
 | 
			
		||||
	FileExists(a.t, path, msgAndArgs...)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// FileExistsf checks whether a file exists in the given path. It also fails if the path points to a directory or there is an error when trying to check the file.
 | 
			
		||||
// FileExistsf checks whether a file exists in the given path. It also fails if
 | 
			
		||||
// the path points to a directory or there is an error when trying to check the file.
 | 
			
		||||
func (a *Assertions) FileExistsf(path string, msg string, args ...interface{}) {
 | 
			
		||||
	if h, ok := a.t.(tHelper); ok {
 | 
			
		||||
		h.Helper()
 | 
			
		||||
@@ -367,7 +371,7 @@ func (a *Assertions) GreaterOrEqualf(e1 interface{}, e2 interface{}, msg string,
 | 
			
		||||
// Greaterf asserts that the first element is greater than the second
 | 
			
		||||
//
 | 
			
		||||
//    a.Greaterf(2, 1, "error message %s", "formatted")
 | 
			
		||||
//    a.Greaterf(float64(2, "error message %s", "formatted"), float64(1))
 | 
			
		||||
//    a.Greaterf(float64(2), float64(1), "error message %s", "formatted")
 | 
			
		||||
//    a.Greaterf("b", "a", "error message %s", "formatted")
 | 
			
		||||
func (a *Assertions) Greaterf(e1 interface{}, e2 interface{}, msg string, args ...interface{}) {
 | 
			
		||||
	if h, ok := a.t.(tHelper); ok {
 | 
			
		||||
@@ -444,7 +448,7 @@ func (a *Assertions) HTTPError(handler http.HandlerFunc, method string, url stri
 | 
			
		||||
//
 | 
			
		||||
//  a.HTTPErrorf(myHandler, "POST", "/a/b/c", url.Values{"a": []string{"b", "c"}}
 | 
			
		||||
//
 | 
			
		||||
// Returns whether the assertion was successful (true, "error message %s", "formatted") or not (false).
 | 
			
		||||
// Returns whether the assertion was successful (true) or not (false).
 | 
			
		||||
func (a *Assertions) HTTPErrorf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) {
 | 
			
		||||
	if h, ok := a.t.(tHelper); ok {
 | 
			
		||||
		h.Helper()
 | 
			
		||||
@@ -468,7 +472,7 @@ func (a *Assertions) HTTPRedirect(handler http.HandlerFunc, method string, url s
 | 
			
		||||
//
 | 
			
		||||
//  a.HTTPRedirectf(myHandler, "GET", "/a/b/c", url.Values{"a": []string{"b", "c"}}
 | 
			
		||||
//
 | 
			
		||||
// Returns whether the assertion was successful (true, "error message %s", "formatted") or not (false).
 | 
			
		||||
// Returns whether the assertion was successful (true) or not (false).
 | 
			
		||||
func (a *Assertions) HTTPRedirectf(handler http.HandlerFunc, method string, url string, values url.Values, msg string, args ...interface{}) {
 | 
			
		||||
	if h, ok := a.t.(tHelper); ok {
 | 
			
		||||
		h.Helper()
 | 
			
		||||
@@ -476,6 +480,30 @@ func (a *Assertions) HTTPRedirectf(handler http.HandlerFunc, method string, url
 | 
			
		||||
	HTTPRedirectf(a.t, handler, method, url, values, msg, args...)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// HTTPStatusCode asserts that a specified handler returns a specified status code.
 | 
			
		||||
//
 | 
			
		||||
//  a.HTTPStatusCode(myHandler, "GET", "/notImplemented", nil, 501)
 | 
			
		||||
//
 | 
			
		||||
// Returns whether the assertion was successful (true) or not (false).
 | 
			
		||||
func (a *Assertions) HTTPStatusCode(handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msgAndArgs ...interface{}) {
 | 
			
		||||
	if h, ok := a.t.(tHelper); ok {
 | 
			
		||||
		h.Helper()
 | 
			
		||||
	}
 | 
			
		||||
	HTTPStatusCode(a.t, handler, method, url, values, statuscode, msgAndArgs...)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// HTTPStatusCodef asserts that a specified handler returns a specified status code.
 | 
			
		||||
//
 | 
			
		||||
//  a.HTTPStatusCodef(myHandler, "GET", "/notImplemented", nil, 501, "error message %s", "formatted")
 | 
			
		||||
//
 | 
			
		||||
// Returns whether the assertion was successful (true) or not (false).
 | 
			
		||||
func (a *Assertions) HTTPStatusCodef(handler http.HandlerFunc, method string, url string, values url.Values, statuscode int, msg string, args ...interface{}) {
 | 
			
		||||
	if h, ok := a.t.(tHelper); ok {
 | 
			
		||||
		h.Helper()
 | 
			
		||||
	}
 | 
			
		||||
	HTTPStatusCodef(a.t, handler, method, url, values, statuscode, msg, args...)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// HTTPSuccess asserts that a specified handler returns a success status code.
 | 
			
		||||
//
 | 
			
		||||
//  a.HTTPSuccess(myHandler, "POST", "http://www.google.com", nil)
 | 
			
		||||
@@ -512,7 +540,7 @@ func (a *Assertions) Implements(interfaceObject interface{}, object interface{},
 | 
			
		||||
 | 
			
		||||
// Implementsf asserts that an object is implemented by the specified interface.
 | 
			
		||||
//
 | 
			
		||||
//    a.Implementsf((*MyInterface, "error message %s", "formatted")(nil), new(MyObject))
 | 
			
		||||
//    a.Implementsf((*MyInterface)(nil), new(MyObject), "error message %s", "formatted")
 | 
			
		||||
func (a *Assertions) Implementsf(interfaceObject interface{}, object interface{}, msg string, args ...interface{}) {
 | 
			
		||||
	if h, ok := a.t.(tHelper); ok {
 | 
			
		||||
		h.Helper()
 | 
			
		||||
@@ -522,7 +550,7 @@ func (a *Assertions) Implementsf(interfaceObject interface{}, object interface{}
 | 
			
		||||
 | 
			
		||||
// InDelta asserts that the two numerals are within delta of each other.
 | 
			
		||||
//
 | 
			
		||||
// 	 a.InDelta(math.Pi, (22 / 7.0), 0.01)
 | 
			
		||||
// 	 a.InDelta(math.Pi, 22/7.0, 0.01)
 | 
			
		||||
func (a *Assertions) InDelta(expected interface{}, actual interface{}, delta float64, msgAndArgs ...interface{}) {
 | 
			
		||||
	if h, ok := a.t.(tHelper); ok {
 | 
			
		||||
		h.Helper()
 | 
			
		||||
@@ -564,7 +592,7 @@ func (a *Assertions) InDeltaSlicef(expected interface{}, actual interface{}, del
 | 
			
		||||
 | 
			
		||||
// InDeltaf asserts that the two numerals are within delta of each other.
 | 
			
		||||
//
 | 
			
		||||
// 	 a.InDeltaf(math.Pi, (22 / 7.0, "error message %s", "formatted"), 0.01)
 | 
			
		||||
// 	 a.InDeltaf(math.Pi, 22/7.0, 0.01, "error message %s", "formatted")
 | 
			
		||||
func (a *Assertions) InDeltaf(expected interface{}, actual interface{}, delta float64, msg string, args ...interface{}) {
 | 
			
		||||
	if h, ok := a.t.(tHelper); ok {
 | 
			
		||||
		h.Helper()
 | 
			
		||||
@@ -640,22 +668,6 @@ func (a *Assertions) JSONEqf(expected string, actual string, msg string, args ..
 | 
			
		||||
	JSONEqf(a.t, expected, actual, msg, args...)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// YAMLEq asserts that two YAML strings are equivalent.
 | 
			
		||||
func (a *Assertions) YAMLEq(expected string, actual string, msgAndArgs ...interface{}) {
 | 
			
		||||
	if h, ok := a.t.(tHelper); ok {
 | 
			
		||||
		h.Helper()
 | 
			
		||||
	}
 | 
			
		||||
	YAMLEq(a.t, expected, actual, msgAndArgs...)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// YAMLEqf asserts that two YAML strings are equivalent.
 | 
			
		||||
func (a *Assertions) YAMLEqf(expected string, actual string, msg string, args ...interface{}) {
 | 
			
		||||
	if h, ok := a.t.(tHelper); ok {
 | 
			
		||||
		h.Helper()
 | 
			
		||||
	}
 | 
			
		||||
	YAMLEqf(a.t, expected, actual, msg, args...)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Len asserts that the specified object has specific length.
 | 
			
		||||
// Len also fails if the object has a type that len() not accept.
 | 
			
		||||
//
 | 
			
		||||
@@ -719,7 +731,7 @@ func (a *Assertions) LessOrEqualf(e1 interface{}, e2 interface{}, msg string, ar
 | 
			
		||||
// Lessf asserts that the first element is less than the second
 | 
			
		||||
//
 | 
			
		||||
//    a.Lessf(1, 2, "error message %s", "formatted")
 | 
			
		||||
//    a.Lessf(float64(1, "error message %s", "formatted"), float64(2))
 | 
			
		||||
//    a.Lessf(float64(1), float64(2), "error message %s", "formatted")
 | 
			
		||||
//    a.Lessf("a", "b", "error message %s", "formatted")
 | 
			
		||||
func (a *Assertions) Lessf(e1 interface{}, e2 interface{}, msg string, args ...interface{}) {
 | 
			
		||||
	if h, ok := a.t.(tHelper); ok {
 | 
			
		||||
@@ -728,6 +740,28 @@ func (a *Assertions) Lessf(e1 interface{}, e2 interface{}, msg string, args ...i
 | 
			
		||||
	Lessf(a.t, e1, e2, msg, args...)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Never asserts that the given condition doesn't satisfy in waitFor time,
 | 
			
		||||
// periodically checking the target function each tick.
 | 
			
		||||
//
 | 
			
		||||
//    a.Never(func() bool { return false; }, time.Second, 10*time.Millisecond)
 | 
			
		||||
func (a *Assertions) Never(condition func() bool, waitFor time.Duration, tick time.Duration, msgAndArgs ...interface{}) {
 | 
			
		||||
	if h, ok := a.t.(tHelper); ok {
 | 
			
		||||
		h.Helper()
 | 
			
		||||
	}
 | 
			
		||||
	Never(a.t, condition, waitFor, tick, msgAndArgs...)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Neverf asserts that the given condition doesn't satisfy in waitFor time,
 | 
			
		||||
// periodically checking the target function each tick.
 | 
			
		||||
//
 | 
			
		||||
//    a.Neverf(func() bool { return false; }, time.Second, 10*time.Millisecond, "error message %s", "formatted")
 | 
			
		||||
func (a *Assertions) Neverf(condition func() bool, waitFor time.Duration, tick time.Duration, msg string, args ...interface{}) {
 | 
			
		||||
	if h, ok := a.t.(tHelper); ok {
 | 
			
		||||
		h.Helper()
 | 
			
		||||
	}
 | 
			
		||||
	Neverf(a.t, condition, waitFor, tick, msg, args...)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Nil asserts that the specified object is nil.
 | 
			
		||||
//
 | 
			
		||||
//    a.Nil(err)
 | 
			
		||||
@@ -748,6 +782,24 @@ func (a *Assertions) Nilf(object interface{}, msg string, args ...interface{}) {
 | 
			
		||||
	Nilf(a.t, object, msg, args...)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// NoDirExists checks whether a directory does not exist in the given path.
 | 
			
		||||
// It fails if the path points to an existing _directory_ only.
 | 
			
		||||
func (a *Assertions) NoDirExists(path string, msgAndArgs ...interface{}) {
 | 
			
		||||
	if h, ok := a.t.(tHelper); ok {
 | 
			
		||||
		h.Helper()
 | 
			
		||||
	}
 | 
			
		||||
	NoDirExists(a.t, path, msgAndArgs...)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// NoDirExistsf checks whether a directory does not exist in the given path.
 | 
			
		||||
// It fails if the path points to an existing _directory_ only.
 | 
			
		||||
func (a *Assertions) NoDirExistsf(path string, msg string, args ...interface{}) {
 | 
			
		||||
	if h, ok := a.t.(tHelper); ok {
 | 
			
		||||
		h.Helper()
 | 
			
		||||
	}
 | 
			
		||||
	NoDirExistsf(a.t, path, msg, args...)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// NoError asserts that a function returned no error (i.e. `nil`).
 | 
			
		||||
//
 | 
			
		||||
//   actualObj, err := SomeFunction()
 | 
			
		||||
@@ -774,6 +826,24 @@ func (a *Assertions) NoErrorf(err error, msg string, args ...interface{}) {
 | 
			
		||||
	NoErrorf(a.t, err, msg, args...)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// NoFileExists checks whether a file does not exist in a given path. It fails
 | 
			
		||||
// if the path points to an existing _file_ only.
 | 
			
		||||
func (a *Assertions) NoFileExists(path string, msgAndArgs ...interface{}) {
 | 
			
		||||
	if h, ok := a.t.(tHelper); ok {
 | 
			
		||||
		h.Helper()
 | 
			
		||||
	}
 | 
			
		||||
	NoFileExists(a.t, path, msgAndArgs...)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// NoFileExistsf checks whether a file does not exist in a given path. It fails
 | 
			
		||||
// if the path points to an existing _file_ only.
 | 
			
		||||
func (a *Assertions) NoFileExistsf(path string, msg string, args ...interface{}) {
 | 
			
		||||
	if h, ok := a.t.(tHelper); ok {
 | 
			
		||||
		h.Helper()
 | 
			
		||||
	}
 | 
			
		||||
	NoFileExistsf(a.t, path, msg, args...)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// NotContains asserts that the specified string, list(array, slice...) or map does NOT contain the
 | 
			
		||||
// specified substring or element.
 | 
			
		||||
//
 | 
			
		||||
@@ -839,6 +909,26 @@ func (a *Assertions) NotEqual(expected interface{}, actual interface{}, msgAndAr
 | 
			
		||||
	NotEqual(a.t, expected, actual, msgAndArgs...)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// NotEqualValues asserts that two objects are not equal even when converted to the same type
 | 
			
		||||
//
 | 
			
		||||
//    a.NotEqualValues(obj1, obj2)
 | 
			
		||||
func (a *Assertions) NotEqualValues(expected interface{}, actual interface{}, msgAndArgs ...interface{}) {
 | 
			
		||||
	if h, ok := a.t.(tHelper); ok {
 | 
			
		||||
		h.Helper()
 | 
			
		||||
	}
 | 
			
		||||
	NotEqualValues(a.t, expected, actual, msgAndArgs...)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// NotEqualValuesf asserts that two objects are not equal even when converted to the same type
 | 
			
		||||
//
 | 
			
		||||
//    a.NotEqualValuesf(obj1, obj2, "error message %s", "formatted")
 | 
			
		||||
func (a *Assertions) NotEqualValuesf(expected interface{}, actual interface{}, msg string, args ...interface{}) {
 | 
			
		||||
	if h, ok := a.t.(tHelper); ok {
 | 
			
		||||
		h.Helper()
 | 
			
		||||
	}
 | 
			
		||||
	NotEqualValuesf(a.t, expected, actual, msg, args...)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// NotEqualf asserts that the specified values are NOT equal.
 | 
			
		||||
//
 | 
			
		||||
//    a.NotEqualf(obj1, obj2, "error message %s", "formatted")
 | 
			
		||||
@@ -905,7 +995,7 @@ func (a *Assertions) NotRegexp(rx interface{}, str interface{}, msgAndArgs ...in
 | 
			
		||||
 | 
			
		||||
// NotRegexpf asserts that a specified regexp does not match a string.
 | 
			
		||||
//
 | 
			
		||||
//  a.NotRegexpf(regexp.MustCompile("starts", "error message %s", "formatted"), "it's starting")
 | 
			
		||||
//  a.NotRegexpf(regexp.MustCompile("starts"), "it's starting", "error message %s", "formatted")
 | 
			
		||||
//  a.NotRegexpf("^start", "it's not starting", "error message %s", "formatted")
 | 
			
		||||
func (a *Assertions) NotRegexpf(rx interface{}, str interface{}, msg string, args ...interface{}) {
 | 
			
		||||
	if h, ok := a.t.(tHelper); ok {
 | 
			
		||||
@@ -914,6 +1004,32 @@ func (a *Assertions) NotRegexpf(rx interface{}, str interface{}, msg string, arg
 | 
			
		||||
	NotRegexpf(a.t, rx, str, msg, args...)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// NotSame asserts that two pointers do not reference the same object.
 | 
			
		||||
//
 | 
			
		||||
//    a.NotSame(ptr1, ptr2)
 | 
			
		||||
//
 | 
			
		||||
// Both arguments must be pointer variables. Pointer variable sameness is
 | 
			
		||||
// determined based on the equality of both type and value.
 | 
			
		||||
func (a *Assertions) NotSame(expected interface{}, actual interface{}, msgAndArgs ...interface{}) {
 | 
			
		||||
	if h, ok := a.t.(tHelper); ok {
 | 
			
		||||
		h.Helper()
 | 
			
		||||
	}
 | 
			
		||||
	NotSame(a.t, expected, actual, msgAndArgs...)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// NotSamef asserts that two pointers do not reference the same object.
 | 
			
		||||
//
 | 
			
		||||
//    a.NotSamef(ptr1, ptr2, "error message %s", "formatted")
 | 
			
		||||
//
 | 
			
		||||
// Both arguments must be pointer variables. Pointer variable sameness is
 | 
			
		||||
// determined based on the equality of both type and value.
 | 
			
		||||
func (a *Assertions) NotSamef(expected interface{}, actual interface{}, msg string, args ...interface{}) {
 | 
			
		||||
	if h, ok := a.t.(tHelper); ok {
 | 
			
		||||
		h.Helper()
 | 
			
		||||
	}
 | 
			
		||||
	NotSamef(a.t, expected, actual, msg, args...)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// NotSubset asserts that the specified list(array, slice...) contains not all
 | 
			
		||||
// elements given in the specified subset(array, slice...).
 | 
			
		||||
//
 | 
			
		||||
@@ -962,6 +1078,30 @@ func (a *Assertions) Panics(f assert.PanicTestFunc, msgAndArgs ...interface{}) {
 | 
			
		||||
	Panics(a.t, f, msgAndArgs...)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// PanicsWithError asserts that the code inside the specified PanicTestFunc
 | 
			
		||||
// panics, and that the recovered panic value is an error that satisfies the
 | 
			
		||||
// EqualError comparison.
 | 
			
		||||
//
 | 
			
		||||
//   a.PanicsWithError("crazy error", func(){ GoCrazy() })
 | 
			
		||||
func (a *Assertions) PanicsWithError(errString string, f assert.PanicTestFunc, msgAndArgs ...interface{}) {
 | 
			
		||||
	if h, ok := a.t.(tHelper); ok {
 | 
			
		||||
		h.Helper()
 | 
			
		||||
	}
 | 
			
		||||
	PanicsWithError(a.t, errString, f, msgAndArgs...)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// PanicsWithErrorf asserts that the code inside the specified PanicTestFunc
 | 
			
		||||
// panics, and that the recovered panic value is an error that satisfies the
 | 
			
		||||
// EqualError comparison.
 | 
			
		||||
//
 | 
			
		||||
//   a.PanicsWithErrorf("crazy error", func(){ GoCrazy() }, "error message %s", "formatted")
 | 
			
		||||
func (a *Assertions) PanicsWithErrorf(errString string, f assert.PanicTestFunc, msg string, args ...interface{}) {
 | 
			
		||||
	if h, ok := a.t.(tHelper); ok {
 | 
			
		||||
		h.Helper()
 | 
			
		||||
	}
 | 
			
		||||
	PanicsWithErrorf(a.t, errString, f, msg, args...)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// PanicsWithValue asserts that the code inside the specified PanicTestFunc panics, and that
 | 
			
		||||
// the recovered panic value equals the expected panic value.
 | 
			
		||||
//
 | 
			
		||||
@@ -1007,7 +1147,7 @@ func (a *Assertions) Regexp(rx interface{}, str interface{}, msgAndArgs ...inter
 | 
			
		||||
 | 
			
		||||
// Regexpf asserts that a specified regexp matches a string.
 | 
			
		||||
//
 | 
			
		||||
//  a.Regexpf(regexp.MustCompile("start", "error message %s", "formatted"), "it's starting")
 | 
			
		||||
//  a.Regexpf(regexp.MustCompile("start"), "it's starting", "error message %s", "formatted")
 | 
			
		||||
//  a.Regexpf("start...$", "it's not starting", "error message %s", "formatted")
 | 
			
		||||
func (a *Assertions) Regexpf(rx interface{}, str interface{}, msg string, args ...interface{}) {
 | 
			
		||||
	if h, ok := a.t.(tHelper); ok {
 | 
			
		||||
@@ -1104,6 +1244,22 @@ func (a *Assertions) WithinDurationf(expected time.Time, actual time.Time, delta
 | 
			
		||||
	WithinDurationf(a.t, expected, actual, delta, msg, args...)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// YAMLEq asserts that two YAML strings are equivalent.
 | 
			
		||||
func (a *Assertions) YAMLEq(expected string, actual string, msgAndArgs ...interface{}) {
 | 
			
		||||
	if h, ok := a.t.(tHelper); ok {
 | 
			
		||||
		h.Helper()
 | 
			
		||||
	}
 | 
			
		||||
	YAMLEq(a.t, expected, actual, msgAndArgs...)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// YAMLEqf asserts that two YAML strings are equivalent.
 | 
			
		||||
func (a *Assertions) YAMLEqf(expected string, actual string, msg string, args ...interface{}) {
 | 
			
		||||
	if h, ok := a.t.(tHelper); ok {
 | 
			
		||||
		h.Helper()
 | 
			
		||||
	}
 | 
			
		||||
	YAMLEqf(a.t, expected, actual, msg, args...)
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Zero asserts that i is the zero value for its type.
 | 
			
		||||
func (a *Assertions) Zero(i interface{}, msgAndArgs ...interface{}) {
 | 
			
		||||
	if h, ok := a.t.(tHelper); ok {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user