Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix reversed got/want in integration test diffs #193

Merged
merged 2 commits into from
May 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions samples/samples_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ func TestJSON(t *testing.T) {
t.Fatalf("scan failed: %v", err)
}

if diff := cmp.Diff(*got, want); diff != "" {
t.Errorf("unexpected diff: %s", diff)
if diff := cmp.Diff(want, got); diff != "" {
t.Errorf("JSON output mismatch: (-want +got):\n%s", diff)
}
})
return nil
Expand Down Expand Up @@ -143,8 +143,8 @@ func TestSimple(t *testing.T) {
}

got := out.String()
if diff := cmp.Diff(got, want); diff != "" {
t.Errorf("unexpected diff: %s\ngot: %s", diff, got)
if diff := cmp.Diff(want, got); diff != "" {
t.Errorf("Simple output mismatch: (-want +got):\n%s", diff)
}
})
return nil
Expand Down Expand Up @@ -213,8 +213,8 @@ func TestDiff(t *testing.T) {
}

got := out.String()
if diff := cmp.Diff(got, want); diff != "" {
t.Errorf("unexpected diff: %s", diff)
if diff := cmp.Diff(want, got); diff != "" {
t.Errorf("simple diff output mismatch: (-want +got):\n%s", diff)
}
})
}
Expand Down Expand Up @@ -276,8 +276,8 @@ func TestMarkdown(t *testing.T) {
}

got := out.String()
if diff := cmp.Diff(got, want); diff != "" {
t.Errorf("unexpected diff: %s\ngot: %s", diff, got)
if diff := cmp.Diff(want, got); diff != "" {
t.Errorf("markdown output mismatch: (-want +got):\n%s", diff)
}
})
return nil
Expand Down