add tests

This commit is contained in:
elee 2022-03-25 01:07:31 -05:00
parent f2c0673681
commit 47850d7b13
3 changed files with 3 additions and 3 deletions

View File

@ -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)
}

BIN
common/nori/nori_test/test1.apng Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

BIN
common/nori/nori_test/test2.apng Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB