MCPcopy
hub / github.com/expr-lang/expr / TestStringEqual

Function TestStringEqual

internal/testify/assert/assertions_test.go:687–700  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

685}
686
687func TestStringEqual(t *testing.T) {
688 for i, currCase := range []struct {
689 equalWant string
690 equalGot string
691 msgAndArgs []interface{}
692 want string
693 }{
694 {equalWant: "hi, \nmy name is", equalGot: "what,\nmy name is", want: "\tassertions.go:\\d+: \n\t+Error Trace:\t\n\t+Error:\\s+Not equal:\\s+\n\\s+expected: \"hi, \\\\nmy name is\"\n\\s+actual\\s+: \"what,\\\\nmy name is\"\n\\s+Diff:\n\\s+-+ Expected\n\\s+\\++ Actual\n\\s+@@ -1,2 \\+1,2 @@\n\\s+-hi, \n\\s+\\+what,\n\\s+my name is"},
695 } {
696 mockT := &bufferT{}
697 Equal(mockT, currCase.equalWant, currCase.equalGot, currCase.msgAndArgs...)
698 Regexp(t, regexp.MustCompile(currCase.want), mockT.buf.String(), "Case %d", i)
699 }
700}
701
702func TestEqualFormatting(t *testing.T) {
703 for i, currCase := range []struct {

Callers

nothing calls this directly

Calls 3

EqualFunction · 0.70
RegexpFunction · 0.70
StringMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…