mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-25 19:15:34 +00:00
16 lines
298 B
Go
16 lines
298 B
Go
|
// Copyright (c) Tailscale Inc & AUTHORS
|
||
|
// SPDX-License-Identifier: BSD-3-Clause
|
||
|
|
||
|
package rands
|
||
|
|
||
|
import "testing"
|
||
|
|
||
|
func TestHexString(t *testing.T) {
|
||
|
for i := 0; i <= 8; i++ {
|
||
|
s := HexString(i)
|
||
|
if len(s) != i {
|
||
|
t.Errorf("HexString(%v) = %q; want len %v, not %v", i, s, i, len(s))
|
||
|
}
|
||
|
}
|
||
|
}
|