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

Proposal: Group images tests by format #247

Open
Elad-Laufer opened this issue Jan 14, 2022 · 4 comments
Open

Proposal: Group images tests by format #247

Elad-Laufer opened this issue Jan 14, 2022 · 4 comments

Comments

@Elad-Laufer
Copy link
Contributor

Elad-Laufer commented Jan 14, 2022

Currently all the golden tests are bunched together in a single file image_golden_test.go which is extremely long and cluttered.
In addition there's image_test.go, which contains a mix of format specific tests and ImageRef unit tests.

As format support is dependant on libvips version, and each format has its own specific features, exporters and quirks we should consider breaking up the the test file into files by format, e.g. image_jpeg_test.go, image_gif_test.go etc.

@davidbyttow
Copy link
Owner

I think that probably makes a lot of sense. And possibly in another package too.

@Elad-Laufer
Copy link
Contributor Author

Elad-Laufer commented Jan 14, 2022

I think that probably makes a lot of sense. And possibly in another package too.

--- vips
--- image.go
--- --- image_tests
--- --- --- golden.go
--- --- --- gif
--- --- --- --- gif_test.go
--- --- --- jpg

?

@davidbyttow
Copy link
Owner

davidbyttow commented Jan 14, 2022

i was thinking something like like how we have mem_tests package there'd be golden_tests and then the image format tests in there like jpeg_test.go, and so on

@Elad-Laufer
Copy link
Contributor Author

i was thinking something like like how we have mem_tests package there'd be golden_tests and then jpeg_test.go, and so on

ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants