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

Function TestBoolean_IsValue

boolean_test.go:166–186  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

164}
165
166func TestBoolean_IsValue(t *testing.T) {
167 for _, data := range []bool{true, false} {
168 t.Run(fmt.Sprintf("%v", data), func(t *testing.T) {
169 reporter := newMockReporter(t)
170
171 if data {
172 NewBoolean(reporter, data).IsTrue().
173 chain.assert(t, success)
174
175 NewBoolean(reporter, data).IsFalse().
176 chain.assert(t, failure)
177 } else {
178 NewBoolean(reporter, data).IsTrue().
179 chain.assert(t, failure)
180
181 NewBoolean(reporter, data).IsFalse().
182 chain.assert(t, success)
183 }
184 })
185 }
186}
187
188func TestBoolean_InList(t *testing.T) {
189 t.Run("basic", func(t *testing.T) {

Callers

nothing calls this directly

Calls 5

newMockReporterFunction · 0.85
NewBooleanFunction · 0.85
assertMethod · 0.80
IsTrueMethod · 0.80
IsFalseMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…