(t *testing.T)
| 95 | } |
| 96 | |
| 97 | func TestRandBytes(t *testing.T) { |
| 98 | t.Parallel() |
| 99 | |
| 100 | assert := internal.NewAssert(t, "TestRandBytes") |
| 101 | |
| 102 | randBytes := RandBytes(4) |
| 103 | assert.Equal(4, len(randBytes)) |
| 104 | |
| 105 | v := reflect.ValueOf(randBytes) |
| 106 | elemType := v.Type().Elem() |
| 107 | assert.Equal(reflect.Slice, v.Kind()) |
| 108 | assert.Equal(reflect.Uint8, elemType.Kind()) |
| 109 | |
| 110 | assert.Equal([]byte{}, RandBytes(0)) |
| 111 | } |
| 112 | |
| 113 | func TestUUIdV4(t *testing.T) { |
| 114 | t.Parallel() |