MCPcopy
hub / github.com/google/uuid / TestVersion7Monotonicity

Function TestVersion7Monotonicity

uuid_test.go:887–898  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

885}
886
887func TestVersion7Monotonicity(t *testing.T) {
888 length := 10000
889 u1 := Must(NewV7()).String()
890 for i := 0; i < length; i++ {
891 u2 := Must(NewV7()).String()
892 if u2 <= u1 {
893 t.Errorf("monotonicity failed at #%d: %s(next) < %s(before)", i, u2, u1)
894 break
895 }
896 u1 = u2
897 }
898}
899
900type fakeRand struct{}
901

Callers

nothing calls this directly

Calls 3

MustFunction · 0.85
NewV7Function · 0.85
StringMethod · 0.45

Tested by

no test coverage detected