forked from stretchr/testify
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathassert_helpers.go
More file actions
39 lines (31 loc) · 1.22 KB
/
assert_helpers.go
File metadata and controls
39 lines (31 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// SPDX-FileCopyrightText: Copyright 2025 go-swagger maintainers
// SPDX-License-Identifier: Apache-2.0
// Code generated with github.com/go-openapi/testify/codegen/v2; DO NOT EDIT.
package assert
import (
"net/http"
"net/url"
"github.com/go-openapi/testify/v2/internal/assertions"
)
// CallerInfo returns an array of strings containing the file and line number
// of each stack frame leading from the current test to the assert call that
// failed.
func CallerInfo() []string {
return assertions.CallerInfo()
}
// HTTPBody is a helper that returns the HTTP body of the response.
// It returns the empty string if building a new request fails.
func HTTPBody(handler http.HandlerFunc, method string, url string, values url.Values) string {
return assertions.HTTPBody(handler, method, url, values)
}
// ObjectsAreEqual determines if two objects are considered equal.
//
// This function does no assertion of any kind.
func ObjectsAreEqual(expected any, actual any) bool {
return assertions.ObjectsAreEqual(expected, actual)
}
// ObjectsAreEqualValues gets whether two objects are equal, or if their
// values are equal.
func ObjectsAreEqualValues(expected any, actual any) bool {
return assertions.ObjectsAreEqualValues(expected, actual)
}