Skip to content

Commit

Permalink
Add a test case
Browse files Browse the repository at this point in the history
  • Loading branch information
bep committed Jul 6, 2021
1 parent 20d9cfe commit a20a4da
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libwebp/encode_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@ var testCases = []testCase{
{"lossy", "sunset.jpg", webpoptions.EncodingOptions{Quality: 75, EncodingPreset: webpoptions.EncodingPresetPhoto, UseSharpYuv: true}},
{"lossless", "source.jpg", webpoptions.EncodingOptions{}},
{"bw", "bw-gopher.png", webpoptions.EncodingOptions{Quality: 75}},
{"transparent-32", "fuzzy-cirlcle.png", webpoptions.EncodingOptions{Quality: 75}},
}

func TestEncode(t *testing.T) {
writeGolden := true
writeGolden := false
for _, test := range testCases {
t.Run(test.name, func(t *testing.T) {
r, err := os.Open(filepath.Join("../test_data/images", test.inputFile))
Expand Down
Binary file added test_data/images/fuzzy-cirlcle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.

0 comments on commit a20a4da

Please sign in to comment.