Keep a single preview variant and verify read lock boundaries
Foundry Go checks / check (push) Successful in 5m13s
Foundry Go checks / check (pull_request) Successful in 3m56s

This commit is contained in:
2026-11-06 21:43:48 +08:00
parent 67765c17f4
commit 8abc79dc5b
5 changed files with 103 additions and 19 deletions
+2 -2
View File
@@ -63,12 +63,12 @@ func TestAssetPreviewPreservesTransparencyAndAnimation(t *testing.T) {
}
}
func TestAssetPreviewRejectsUnboundedWidths(t *testing.T) {
for _, value := range []string{"0", "1", "513", "999999", "-1", "abc"} {
for _, value := range []string{"0", "1", "256", "512", "2048", "999999", "-1", "abc"} {
if _, err := previewWidth("preview", value); err == nil {
t.Errorf("accepted width %s", value)
}
}
for _, value := range []string{"256", "512", "1024", "2048"} {
for _, value := range []string{"", "1024"} {
if _, err := previewWidth("preview", value); err != nil {
t.Fatal(err)
}