MCPcopy
hub / github.com/duke-git/lancet / Less

Method Less

internal/assert.go:126–131  ·  view source on GitHub ↗

Less check if expected is less than actual

(expected, actual any)

Source from the content-addressed store, hash-verified

124
125// Less check if expected is less than actual
126func (a *Assert) Less(expected, actual any) {
127 if compare(expected, actual) != compareLess {
128 expectedInfo := fmt.Sprintf("< %v", expected)
129 makeTestFailed(a.T, a.CaseName, expectedInfo, actual)
130 }
131}
132
133// LessOrEqual check if expected is less than or equal with actual
134func (a *Assert) LessOrEqual(expected, actual any) {

Callers 4

TestRandIntFunction · 0.95
TestRandFloatFunction · 0.95
TestRandFloatsFunction · 0.95
TestAssertFunction · 0.95

Calls 2

compareFunction · 0.85
makeTestFailedFunction · 0.85

Tested by 4

TestRandIntFunction · 0.76
TestRandFloatFunction · 0.76
TestRandFloatsFunction · 0.76
TestAssertFunction · 0.76