// False asserts that the specified value is false.
// 
//    a.False(myBool, "myBool should be false")
// 
// Returns whether the assertion was successful (true) or not (false).
431430
func (a *Assertions) False(value bool, msgAndArgs ...interface{}) bool {
	return False(a.t, value, msgAndArgs...)
}
681039
func (f *FlagSet) Bool(name string, value bool, usage string) *bool {
	p := new(bool)
	f.BoolVar(p, name, value, usage)
	return p
}
1229469
func (v Value) Bool() (bool, error) {
	b, err := strconv.ParseBool(v.String())
	if err != nil {
		return false, v.invalidTypeError(err, "bool")
	}
	return b, nil
}
1286374
func (fv FlagValues) Bool(name string, defaultValue bool) (bool, error) {
	value, found := fv[name]
	if !found {
		return defaultValue, nil
	}
	switch value {
	case "", "t", "T", "true", "True", "1":
		return true, nil
	case "f", "F", "false", "False", "0":
		return false, nil
	}
	return false, fmt.Errorf("flag %q: cannot parse boolean from %q", name, value)
}
1029678
func True(t Tester, b bool, fmtStr string, vals ...interface{}) {
	if !b {
		t.Fatalf(callerStrf(WithFrameWrapper(t), fmtStr, vals...))
	}
}
1218654
func parseBool(str string) (value bool, err error) {
	switch str {
	case "1", "t", "T", "true", "TRUE", "True", "YES", "yes", "Yes", "y", "ON", "on", "On":
		return true, nil
	case "0", "f", "F", "false", "FALSE", "False", "NO", "no", "No", "n", "OFF", "off", "Off":
		return false, nil
	}
	return false, fmt.Errorf("parsing \"%s\": invalid syntax", str)
}
313503
func (a *Attributes) True(name string) error {
	val, ok, err := a.Value(name)
	if err != nil {
		return err
	}
	if !ok {
		return fmt.Errorf("Attribute '%s' was not found", name)
	}
	if val != "true" {
		return fmt.Errorf("Attribute '%s' is not true", name)
	}
	return nil
}
786444
func (t Result) Bool() bool {
	switch t.Type {
	default:
		return false
	case True:
		return true
	case String:
		return t.Str != "" && t.Str != "0" && t.Str != "false"
	case Number:
		return t.Num != 0
	}
}
1335393
func (self *Commands) False(value interface{}) error {
	if stringutil.IsBooleanFalse(value) {
		return nil
	} else {
		return fmt.Errorf("Expected false value")
	}
}
30241
func Bool(input interface{}) (output bool, err error) {
	switch castValue := input.(type) {
	case Booler:
		output = castValue.Bool()
		return
	case string:
		var errParse error
		output, errParse = strconv.ParseBool(castValue)
		if errParse != nil && len(castValue) > 0 {
			output = true
		}
		return
	case int:
		if castValue != 0 {
			output = true
		}
		return
	case int8:
		if castValue != 0 {
			output = true
		}
		return
	case int16:
		if castValue != 0 {
			output = true
		}
		return
	case int32:
		if castValue != 0 {
			output = true
		}
		return
	case int64:
		if castValue != 0 {
			output = true
		}
		return
	case uint:
		if castValue != 0 {
			output = true
		}
		return
	case uint8:
		if castValue != 0 {
			output = true
		}
		return
	case uint16:
		if castValue != 0 {
			output = true
		}
		return
	case uint32:
		if castValue != 0 {
			output = true
		}
		return
	case uint64:
		if castValue != 0 {
			output = true
		}
		return
	case float32:
		if castValue != 0 {
			output = true
		}
		return
	case float64:
		if castValue != 0 {
			output = true
		}
		return
	case bool:
		output = castValue
		return
	case nil:
		output = false
		return
	default:
		err = NewCastError("Could not convert to bool")
	}
	return
}
516443
func TryToBool(i interface{}) (b bool, err error) {
	switch v := i.(type) {
	case nil:
	case bool:
		b = v
	case *bool:
		b = *v
	case string:
		b, err = strconv.ParseBool(v)
	case *string:
		b, err = strconv.ParseBool(*v)
	case int, int8, int16, int32, int64:
		b = v != 0
	default:
		err = castError(i, "bool")
	}
	return
}
411366
func (j *JSON) Bool(name string) (bool, error) {
	v, err := j.value(name)
	if err != nil {
		return false, err
	}

	b, ok := v.(bool)
	if !ok {
		return false, errors.New("unable to cast")
	}

	return b, nil
}
454555
func (s *Stream) Bool() (bool, error) {
	num, err := s.uint(8)
	if err != nil {
		return false, err
	}
	switch num {
	case 0:
		return false, nil
	case 1:
		return true, nil
	default:
		return false, fmt.Errorf("rlp: invalid boolean value: %d", num)
	}
}
76031
func (e *Environment) Bool(name string) (bool, error) {
	v, err := e.value(name)
	if err != nil {
		return false, err
	}

	return strconv.ParseBool(v)
}
1173503
func (e *Expect) Boolean(value bool) *Boolean {
	return NewBoolean(e.config.Reporter, value)
}
621753
func (l *Literal) Bool() (bool, error) {
	if l.t != Bool {
		return false, fmt.Errorf("literal.Bool: literal is of type %v; cannot be converted to a bool", l.t)
	}
	return l.v.(bool), nil
}
690439
func (c *Configure) Bool(name string, def bool, description string) *bool {
	b := new(bool)
	c.BoolVar(b, name, def, description)

	return b
}