Skip to content

Commit

Permalink
make tests parallel
Browse files Browse the repository at this point in the history
  • Loading branch information
gaissmai committed Sep 10, 2022
1 parent 866c77c commit 27619e4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions extnetip_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ func pfxSlice(pfxStrs ...string) (out []netip.Prefix) {
}

func TestRange(t *testing.T) {
t.Parallel()
tests := []struct {
in netip.Prefix
first netip.Addr
Expand Down Expand Up @@ -120,6 +121,7 @@ func TestRange(t *testing.T) {
}

func TestPrefix(t *testing.T) {
t.Parallel()
tests := []struct {
ip1 netip.Addr
ip2 netip.Addr
Expand Down Expand Up @@ -224,6 +226,7 @@ func TestPrefix(t *testing.T) {
}

func TestPrefixes(t *testing.T) {
t.Parallel()
tests := []struct {
first netip.Addr
last netip.Addr
Expand Down
2 changes: 2 additions & 0 deletions unsafe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ func TestSizeof(t *testing.T) {
}

func TestIdempotent(t *testing.T) {
t.Parallel()
v4 := mustAddr("0.0.0.0")
if back(peek(v4)) != v4 {
t.Fatalf("back(peek(ip)) isn't idempotent")
Expand All @@ -33,6 +34,7 @@ func TestIdempotent(t *testing.T) {
}

func TestModify(t *testing.T) {
t.Parallel()
p4 := peek(mustAddr("0.0.0.0"))
p4.ip.lo++ // add one

Expand Down

0 comments on commit 27619e4

Please sign in to comment.