MCPcopy Create free account
hub / github.com/TheThingsNetwork/lorawan-stack / TestPseudoRandom

Function TestPseudoRandom

pkg/random/random_test.go:26–36  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

24)
25
26func TestPseudoRandom(t *testing.T) {
27 t.Parallel()
28
29 a := assertions.New(t)
30 a.So(Bytes(10), assertions.ShouldHaveLength, 10)
31
32 a.So(Int63n(10), assertions.ShouldBeGreaterThanOrEqualTo, 0)
33 a.So(Int63n(10), assertions.ShouldBeLessThan, 10)
34
35 a.So(String(10), assertions.ShouldHaveLength, 10)
36}
37
38func BenchmarkBytes(b *testing.B) {
39 for i := 0; i < b.N; i++ {

Callers

nothing calls this directly

Calls 4

Int63nFunction · 0.85
BytesFunction · 0.70
StringFunction · 0.70
NewMethod · 0.65

Tested by

no test coverage detected