MCPcopy Create free account
hub / github.com/google/gapid / IsBetween

Method IsBetween

core/assert/integer.go:50–52  ·  view source on GitHub ↗

IsBetween asserts that the integer lies within the given range (inclusive).

(min, max int)

Source from the content-addressed store, hash-verified

48
49// IsBetween asserts that the integer lies within the given range (inclusive).
50func (o OnInteger) IsBetween(min, max int) bool {
51 return o.CompareRaw(o.value, "in", min, "to", max).Test(o.value >= min && o.value <= max)
52}

Callers 1

ExampleIntegerFunction · 0.80

Calls 2

TestMethod · 0.80
CompareRawMethod · 0.80

Tested by 1

ExampleIntegerFunction · 0.64