MCPcopy Index your code
hub / github.com/gavv/httpexpect / TestString_FailedChain

Function TestString_FailedChain

string_test.go:11–59  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

9)
10
11func TestString_FailedChain(t *testing.T) {
12 chain := newMockChain(t, flagFailed)
13
14 value := newString(chain, "")
15 value.chain.assert(t, failure)
16
17 value.Path("$").chain.assert(t, failure)
18 value.Schema("")
19 value.Alias("foo")
20
21 var target interface{}
22 value.Decode(target)
23
24 value.Length().chain.assert(t, failure)
25
26 value.IsEmpty()
27 value.NotEmpty()
28 value.IsEqual("")
29 value.NotEqual("")
30 value.IsEqualFold("")
31 value.NotEqualFold("")
32 value.InList("")
33 value.NotInList("")
34 value.InListFold("")
35 value.NotInListFold("")
36 value.Contains("")
37 value.NotContains("")
38 value.ContainsFold("")
39 value.NotContainsFold("")
40 value.HasPrefix("")
41 value.NotHasPrefix("")
42 value.HasSuffix("")
43 value.NotHasSuffix("")
44 value.HasPrefixFold("")
45 value.NotHasPrefixFold("")
46 value.HasSuffixFold("")
47 value.NotHasSuffixFold("")
48 value.IsASCII()
49 value.NotASCII()
50
51 value.Match("").chain.assert(t, failure)
52 value.NotMatch("")
53 assert.NotNil(t, value.MatchAll(""))
54 assert.Equal(t, 0, len(value.MatchAll("")))
55
56 value.AsBoolean().chain.assert(t, failure)
57 value.AsNumber().chain.assert(t, failure)
58 value.AsDateTime().chain.assert(t, failure)
59}
60
61func TestString_Constructors(t *testing.T) {
62 t.Run("reporter", func(t *testing.T) {

Callers

nothing calls this directly

Calls 15

newMockChainFunction · 0.85
newStringFunction · 0.85
assertMethod · 0.80
IsEqualFoldMethod · 0.80
NotEqualFoldMethod · 0.80
InListFoldMethod · 0.80
NotInListFoldMethod · 0.80
ContainsFoldMethod · 0.80
NotContainsFoldMethod · 0.80
HasPrefixMethod · 0.80
NotHasPrefixMethod · 0.80
HasSuffixMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…