Skip to content

Commit badec9d

Browse files
authored
test(scalar): Add google/uuid test (#932)
Follow up to #922. 2 more tests. The tests pass since `uuid.UUID` implements the `Stringer` interface ---
1 parent 42e1afb commit badec9d

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

scalar/uuid_test.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
package scalar
22

3-
import "testing"
3+
import (
4+
"testing"
5+
6+
"github.com/google/uuid"
7+
)
48

59
type SomeUUIDWrapper struct {
610
SomeUUIDType
@@ -59,6 +63,8 @@ func TestUUIDSet(t *testing.T) {
5963
},
6064
{source: nilPointerByteArray, result: UUID{}},
6165
{source: nilPointerString, result: UUID{}},
66+
{source: &uuid.UUID{}, result: UUID{Value: [16]byte{0}, Valid: true}},
67+
{source: uuid.UUID{}, result: UUID{Value: [16]byte{0}, Valid: true}},
6268
}
6369

6470
for i, tt := range successfulTests {

0 commit comments

Comments
 (0)