mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 04:57:26 +01:00
graphics: Add TestImageSize
This commit is contained in:
parent
d0592d30e0
commit
ecf4757809
@ -693,6 +693,21 @@ func TestImageOutsideUpperLeft(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestImageSize(t *testing.T) {
|
||||
const (
|
||||
w = 17
|
||||
h = 31
|
||||
)
|
||||
img, _ := NewImage(w, h, FilterDefault)
|
||||
gotW, gotH := img.Size()
|
||||
if gotW != w {
|
||||
t.Errorf("got: %d, want: %d", gotW, w)
|
||||
}
|
||||
if gotH != h {
|
||||
t.Errorf("got: %d, want: %d", gotH, h)
|
||||
}
|
||||
}
|
||||
|
||||
func TestImageSize1(t *testing.T) {
|
||||
src, _ := NewImage(1, 1, FilterNearest)
|
||||
dst, _ := NewImage(1, 1, FilterNearest)
|
||||
|
Loading…
Reference in New Issue
Block a user