File: v4_test.go

package info (click to toggle)
golang-github-savsgio-gotils 0.0~git20250408.196191e-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 176 kB
  • sloc: makefile: 2
file content (23 lines) | stat: -rw-r--r-- 366 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package uuid

import (
	"testing"

	"github.com/google/uuid"
)

func Test_V4(t *testing.T) {
	value := V4()

	if _, err := uuid.Parse(value); err != nil {
		t.Errorf("V4() == %s, invalid value", value)
	}
}

func Test_V4Bytes(t *testing.T) {
	value := V4Bytes()

	if _, err := uuid.ParseBytes(value); err != nil {
		t.Errorf("V4() == %s, invalid value", value)
	}
}