MCPcopy Index your code
hub / github.com/coder/coder / TestFloat64

Function TestFloat64

cryptorand/numbers_test.go:64–74  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

62}
63
64func TestFloat64(t *testing.T) {
65 t.Parallel()
66
67 for i := 0; i < 20; i++ {
68 v, err := cryptorand.Float64()
69 require.NoError(t, err, "unexpected error from Float64")
70 t.Logf("value: %v <- random?", v)
71 require.True(t, v >= 0.0, "values must be positive")
72 require.True(t, v < 1.0, "values must be less than 1.0")
73 }
74}

Callers

nothing calls this directly

Calls 2

Float64Function · 0.92
LogfMethod · 0.65

Tested by

no test coverage detected