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 1e062a4245
commit 7586f1ca5e
2 changed files with 4 additions and 9 deletions

View File

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

View File

@ -528,9 +528,10 @@ func TestMaxImageSize(t *testing.T) {
img.ReplacePixels(make([]byte, 4*s*s)) img.ReplacePixels(make([]byte, 4*s*s))
} }
// Issue #1217 // Issue #1217 (disabled)
func TestMinImageSize(t *testing.T) { func Disable_TestMinImageSize(t *testing.T) {
ResetBackendsForTesting() // 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. // 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. // Though the image size is minimum size of the backend, extending the backend happens due to the paddings.