Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
exekias committed Mar 18, 2024
1 parent 38bf833 commit 8009e3b
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions pgtype/macaddr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,20 @@ func TestMacaddrCodec(t *testing.T) {
new(string),
isExpectedEq("01:23:45:67:89:ab"),
},
{nil, new(*net.HardwareAddr), isExpectedEq((*net.HardwareAddr)(nil))},
})

pgxtest.RunValueRoundTripTests(context.Background(), t, defaultConnTestRunner, pgxtest.KnownOIDQueryExecModes, "macaddr8", []pgxtest.ValueRoundTripTest{
{
mustParseMacaddr(t, "01:23:45:67:89:ab:01:08"),
new(net.HardwareAddr),
isExpectedEqHardwareAddr(mustParseMacaddr(t, "01:23:45:67:89:ab:01:08")),
},
{
"01:23:45:67:89:ab:01:08",
new(net.HardwareAddr),
isExpectedEqHardwareAddr(mustParseMacaddr(t, "01:23:45:67:89:ab:01:08")),
},
{
mustParseMacaddr(t, "01:23:45:67:89:ab:01:08"),
new(string),
Expand Down

0 comments on commit 8009e3b

Please sign in to comment.