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

Method IsFalse

boolean.go:140–160  ·  view source on GitHub ↗

IsFalse succeeds if boolean is false. Example: boolean := NewBoolean(t, false) boolean.IsFalse()

()

Source from the content-addressed store, hash-verified

138// boolean := NewBoolean(t, false)
139// boolean.IsFalse()
140func (b *Boolean) IsFalse() *Boolean {
141 opChain := b.chain.enter("IsFalse()")
142 defer opChain.leave()
143
144 if opChain.failed() {
145 return b
146 }
147
148 if !(b.value == false) {
149 opChain.fail(AssertionFailure{
150 Type: AssertEqual,
151 Actual: &AssertionValue{b.value},
152 Expected: &AssertionValue{false},
153 Errors: []error{
154 errors.New("expected: boolean is false"),
155 },
156 })
157 }
158
159 return b
160}
161
162// Deprecated: use IsTrue instead.
163func (b *Boolean) True() *Boolean {

Callers 4

FalseMethod · 0.95
TestExpect_TraverseFunction · 0.80
TestBoolean_FailedChainFunction · 0.80
TestBoolean_IsValueFunction · 0.80

Calls 4

enterMethod · 0.80
leaveMethod · 0.80
failedMethod · 0.80
failMethod · 0.80

Tested by 3

TestExpect_TraverseFunction · 0.64
TestBoolean_FailedChainFunction · 0.64
TestBoolean_IsValueFunction · 0.64