MCPcopy
hub / github.com/stretchr/testify / Test_Arguments_Diff

Function Test_Arguments_Diff

mock/mock_test.go:1907–1919  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

1905}
1906
1907func Test_Arguments_Diff(t *testing.T) {
1908 t.Parallel()
1909
1910 var args = Arguments([]interface{}{"Hello World", 123, true})
1911 var diff string
1912 var count int
1913 diff, count = args.Diff([]interface{}{"Hello World", 456, "false"})
1914
1915 assert.Equal(t, 2, count)
1916 assert.Contains(t, diff, `(int=456) != (int=123)`)
1917 assert.Contains(t, diff, `(string=false) != (bool=true)`)
1918
1919}
1920
1921func Test_Arguments_Diff_DifferentNumberOfArgs(t *testing.T) {
1922 t.Parallel()

Callers

nothing calls this directly

Calls 4

EqualFunction · 0.92
ContainsFunction · 0.92
ArgumentsTypeAlias · 0.85
DiffMethod · 0.80

Tested by

no test coverage detected