github.com/as/etch
Package etch provides a simple facility to write graphical regression tests. The Assertf function provides the common case functionality. Provide it the test variable, along the image you have and want, and it will fail your case if want != have. Optionally, provide a filename to store the graphical difference as an uncompressed PNG if the test fails. The Extra data in the image (have but don't want) is represented in Red The Missing data (want, but dont have) is represented in Blue These can be changed by modifying Extra and Missing package variables To simplify the package, the alpha channel is ignored. A color triplet is equal to another if it's R,G,B values are identical. The foreground variable, fg, is what to paint on the delta image if two pixels match The background variable, BG, is the common background color between two images If two pixels at the same (x,y) coordinate don't match, the ambiguity is resolved by comparing the image you have's color value at that coordinate to the background color. If the color matches, the pixel you have is missing. Otherwise, it's extra. This may seem confusing, so a worked example is made available in the README
proxy.golang.org
v0.6.7
about 8 years ago
1
18
1
Links
| Registry | proxy.golang.org |
| Source | Repository |
| Docs | Documentation |
| JSON API | View JSON |
| CodeMeta | codemeta.json |
Package Details
| PURL |
pkg:golang/github.com/as/etch
spec |
| License | BSD-3-Clause |
| Namespace | github.com/as |
| First Release | about 8 years ago |
| Last Synced | 27 days ago |
Repository
| Stars | 10 on GitHub |
| Forks | 2 on GitHub |