internal/atlas: Bug fix: Disable a test resetting the backend

Closes #1756
This commit is contained in:
Hajime Hoshi 2021-08-15 00:02:50 +09:00
parent 440801c20c
commit 57a2db982b
2 changed files with 4 additions and 9 deletions

View File

@ -39,12 +39,6 @@ func ResetImageSizeForTesting() {
maxSize = oldMaxSize
}
func ResetBackendsForTesting() {
backendsM.Lock()
defer backendsM.Unlock()
theBackends = nil
}
func (i *Image) IsOnAtlasForTesting() bool {
backendsM.Lock()
defer backendsM.Unlock()

View File

@ -527,9 +527,10 @@ func TestMaxImageSize(t *testing.T) {
img.ReplacePixels(make([]byte, 4*s*s))
}
// Issue #1217
func TestMinImageSize(t *testing.T) {
ResetBackendsForTesting()
// Issue #1217 (disabled)
func Disable_TestMinImageSize(t *testing.T) {
// The backend cannot be reset. If this is necessary, sync the state with the images (#1756).
// ResetBackendsForTesting()
// This tests that extending a backend works correctly.
// Though the image size is minimum size of the backend, extending the backend happens due to the paddings.