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

Function TestRandFloat

random/random_test.go:175–190  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

173}
174
175func TestRandFloat(t *testing.T) {
176 t.Parallel()
177
178 assert := internal.NewAssert(t, "TestRandFloat")
179
180 r1 := RandFloat(1.1, 10.1, 2)
181 assert.GreaterOrEqual(r1, 1.1)
182 assert.Less(r1, 10.1)
183
184 r2 := RandFloat(1.1, 1.1, 2)
185 assert.Equal(1.1, r2)
186
187 r3 := RandFloat(10.1, 1.1, 2)
188 assert.GreaterOrEqual(r1, 1.1)
189 assert.Less(r3, 10.1)
190}
191
192func TestRandFloats(t *testing.T) {
193 t.Parallel()

Callers

nothing calls this directly

Calls 5

GreaterOrEqualMethod · 0.95
LessMethod · 0.95
EqualMethod · 0.95
NewAssertFunction · 0.92
RandFloatFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…