mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
internal/atlas: add TestMaxImageSizeJust
This commit is contained in:
parent
03567f74f9
commit
37369a2f4b
@ -561,6 +561,15 @@ func Disable_TestMinImageSize(t *testing.T) {
|
||||
img.ReplacePixels(make([]byte, 4*s*s), nil)
|
||||
}
|
||||
|
||||
func TestMaxImageSizeJust(t *testing.T) {
|
||||
s := maxImageSizeForTesting
|
||||
// An unmanged image never belongs to an atlas and doesn't have its paddings.
|
||||
// TODO: Should we allow such this size for ImageTypeRegular?
|
||||
img := atlas.NewImage(s, s, atlas.ImageTypeUnmanaged)
|
||||
defer img.MarkDisposed()
|
||||
img.ReplacePixels(make([]byte, 4*s*s), nil)
|
||||
}
|
||||
|
||||
func TestMaxImageSizeExceeded(t *testing.T) {
|
||||
// This tests that a too-big image is allocated correctly.
|
||||
s := maxImageSizeForTesting
|
||||
|
Loading…
Reference in New Issue
Block a user