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

Function TestRandInt

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

Source from the content-addressed store, hash-verified

78}
79
80func TestRandInt(t *testing.T) {
81 t.Parallel()
82
83 assert := internal.NewAssert(t, "TestRandInt")
84
85 r1 := RandInt(1, 10)
86 assert.GreaterOrEqual(r1, 1)
87 assert.Less(r1, 10)
88
89 r2 := RandInt(1, 1)
90 assert.Equal(1, r2)
91
92 r3 := RandInt(10, 1)
93 assert.GreaterOrEqual(r1, 1)
94 assert.Less(r3, 10)
95}
96
97func TestRandBytes(t *testing.T) {
98 t.Parallel()

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…