mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-25 03:08:54 +01:00
graphics: But fix TestImageSelf: DrawImage must panic
This commit is contained in:
parent
b567a07d5f
commit
6a4bb0513b
@ -197,14 +197,17 @@ func TestImageComposition(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestImageSelf(t *testing.T) {
|
||||
defer func() {
|
||||
if r := recover(); r == nil {
|
||||
t.Errorf("DrawImage must panic but not")
|
||||
}
|
||||
}()
|
||||
img, _, err := openEbitenImage("testdata/ebiten.png")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
return
|
||||
}
|
||||
if err := img.DrawImage(img, nil); err == nil {
|
||||
t.Fatalf("img.DrawImage(img, nil) doesn't return error; an error should be returned")
|
||||
}
|
||||
img.DrawImage(img, nil)
|
||||
}
|
||||
|
||||
func TestImageScale(t *testing.T) {
|
||||
|
Loading…
Reference in New Issue
Block a user