add tests
This commit is contained in:
parent
f2c0673681
commit
47850d7b13
|
@ -20,7 +20,7 @@ func TestParseFile1(t *testing.T) {
|
|||
}
|
||||
t.Logf("\n nori: %+v\n gawi: %+v", nori, nori.Gawi)
|
||||
a := nori.ExportAnimation()
|
||||
writeApng(a, "./nori_test/palette.apng")
|
||||
writeApng(a, "./nori_test/test1.apng")
|
||||
}
|
||||
|
||||
func TestParseFile2(t *testing.T) {
|
||||
|
@ -34,7 +34,7 @@ func TestParseFile2(t *testing.T) {
|
|||
}
|
||||
t.Logf("\n nori: %+v\n gawi: %+v", nori, nori.Gawi)
|
||||
a := nori.ExportAnimation()
|
||||
writeApng(a, "./nori_test/palette.apng")
|
||||
writeApng(a, "./nori_test/test2.apng")
|
||||
}
|
||||
|
||||
func TestParsePalette(t *testing.T) {
|
||||
|
@ -58,5 +58,5 @@ func writeApng(a *apng.APNG, fp string) {
|
|||
if err != nil {
|
||||
log.Errorf("fail to encode apng %s", err)
|
||||
}
|
||||
os.WriteFile("./nori_test/palette.apng", out.Bytes(), 0740)
|
||||
os.WriteFile(fp, out.Bytes(), 0740)
|
||||
}
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 53 KiB |
Binary file not shown.
After Width: | Height: | Size: 56 KiB |
Loading…
Reference in New Issue