Skip to content

Commit 329bb02

Browse files
committed
update
1 parent b8cbaa2 commit 329bb02

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

bidrequest_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,15 @@ func TestBidRequest_complex(t *testing.T) {
7474

7575
func TestBidRequest_Validate(t *testing.T) {
7676
subject := &BidRequest{}
77-
if exp, got := ErrInvalidReqNoID, subject.Validate(); !errors.Is(exp, got) {
77+
if exp, got := ErrInvalidReqNoID, subject.Validate(); !errors.Is(got, exp) {
7878
t.Fatalf("expected %v, got %v", exp, got)
7979
}
8080
subject = &BidRequest{ID: "RID"}
81-
if exp, got := ErrInvalidReqNoImps, subject.Validate(); !errors.Is(exp, got) {
81+
if exp, got := ErrInvalidReqNoImps, subject.Validate(); !errors.Is(got, exp) {
8282
t.Fatalf("expected %v, got %v", exp, got)
8383
}
8484
subject = &BidRequest{ID: "A", Imp: []Impression{{ID: "1"}}, Site: &Site{}, App: &App{}}
85-
if exp, got := ErrInvalidReqMultiInv, subject.Validate(); !errors.Is(exp, got) {
85+
if exp, got := ErrInvalidReqMultiInv, subject.Validate(); !errors.Is(got, exp) {
8686
t.Fatalf("expected %v, got %v", exp, got)
8787
}
8888
}

bidresponse_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ func TestBidResponse_complex(t *testing.T) {
5656

5757
func TestBidResponse_Validate(t *testing.T) {
5858
subject := &BidResponse{}
59-
if exp, got := ErrInvalidRespNoID, subject.Validate(); !errors.Is(exp, got) {
59+
if exp, got := ErrInvalidRespNoID, subject.Validate(); !errors.Is(got, exp) {
6060
t.Fatalf("expected %v, got %v", exp, got)
6161
}
6262
subject = &BidResponse{ID: "RID"}
63-
if exp, got := ErrInvalidRespNoSeatBids, subject.Validate(); !errors.Is(exp, got) {
63+
if exp, got := ErrInvalidRespNoSeatBids, subject.Validate(); !errors.Is(got, exp) {
6464
t.Fatalf("expected %v, got %v", exp, got)
6565
}
6666
}

impression_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@ func TestImpression(t *testing.T) {
5555

5656
func TestImpression_Validate(t *testing.T) {
5757
subject := &Impression{}
58-
if exp, got := ErrInvalidImpNoID, subject.Validate(); !errors.Is(exp, got) {
58+
if exp, got := ErrInvalidImpNoID, subject.Validate(); !errors.Is(got, exp) {
5959
t.Fatalf("expected %v, got %v", exp, got)
6060
}
6161
subject = &Impression{ID: "IMPID", Banner: &Banner{}, Video: &Video{}}
62-
if exp, got := ErrInvalidImpMultiAssets, subject.Validate(); !errors.Is(exp, got) {
62+
if exp, got := ErrInvalidImpMultiAssets, subject.Validate(); !errors.Is(got, exp) {
6363
t.Fatalf("expected %v, got %v", exp, got)
6464
}
6565
}

seatbid_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99

1010
func TestSeatBid_Validate(t *testing.T) {
1111
subject := &SeatBid{}
12-
if exp, got := ErrInvalidSeatBidBid, subject.Validate(); !errors.Is(exp, got) {
12+
if exp, got := ErrInvalidSeatBidBid, subject.Validate(); !errors.Is(got, exp) {
1313
t.Fatalf("expected %v, got %v", exp, got)
1414
}
1515
}

video_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,11 @@ func TestVideo(t *testing.T) {
5252

5353
func TestVideo_Validate(t *testing.T) {
5454
subject := &Video{}
55-
if exp, got := ErrInvalidVideoNoMimes, subject.Validate(); !errors.Is(exp, got) {
55+
if exp, got := ErrInvalidVideoNoMimes, subject.Validate(); !errors.Is(got, exp) {
5656
t.Fatalf("expected %v, got %v", exp, got)
5757
}
5858
subject = &Video{Mimes: []string{"video/mp4"}}
59-
if exp, got := ErrInvalidVideoNoLinearity, subject.Validate(); !errors.Is(exp, got) {
59+
if exp, got := ErrInvalidVideoNoLinearity, subject.Validate(); !errors.Is(got, exp) {
6060
t.Fatalf("expected %v, got %v", exp, got)
6161
}
6262
subject = &Video{
@@ -65,7 +65,7 @@ func TestVideo_Validate(t *testing.T) {
6565
Linearity: VideoLinearityNonLinear,
6666
Mimes: []string{"video/mp4"},
6767
}
68-
if exp, got := ErrInvalidVideoNoProtocols, subject.Validate(); !errors.Is(exp, got) {
68+
if exp, got := ErrInvalidVideoNoProtocols, subject.Validate(); !errors.Is(got, exp) {
6969
t.Fatalf("expected %v, got %v", exp, got)
7070
}
7171
}

0 commit comments

Comments
 (0)