File: uuid_test.go

package info (click to toggle)
golang-github-ovn-org-libovsdb 0.7.0-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental, forky, sid, trixie
  • size: 1,440 kB
  • sloc: makefile: 52; sh: 14
file content (34 lines) | stat: -rw-r--r-- 448 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package ovsdb

import "testing"

func TestUUIDIsNamed(t *testing.T) {
	tests := []struct {
		name string
		uuid string
		want bool
	}{
		{
			"named",
			"foo",
			true,
		},
		{
			"named",
			aUUID0,
			false,
		},
		{
			"empty",
			"",
			false,
		},
	}
	for _, tt := range tests {
		t.Run(tt.name, func(t *testing.T) {
			if got := IsNamedUUID(tt.uuid); got != tt.want {
				t.Errorf("UUID.Named() = %v, want %v", got, tt.want)
			}
		})
	}
}