mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-01 18:00:26 +00:00
Test for new Image(Image, Rectangle) ctor
This commit is contained in:
parent
b8854d3406
commit
96c4f703d0
@ -1,4 +1,4 @@
|
||||
-- Copyright (C) 2019-2021 Igara Studio S.A.
|
||||
-- Copyright (C) 2019-2022 Igara Studio S.A.
|
||||
-- Copyright (C) 2018 David Capello
|
||||
--
|
||||
-- This file is released under the terms of the MIT license.
|
||||
@ -59,6 +59,16 @@ do
|
||||
assert(d:getPixel(x, y) == expectedColor)
|
||||
end
|
||||
end
|
||||
|
||||
-- Clone a rectangle
|
||||
local e = Image(c, Rectangle(1, 1, 4, 5))
|
||||
print(e.width)
|
||||
print(e.height)
|
||||
assert(e.width == 4)
|
||||
assert(e.height == 5)
|
||||
|
||||
-- Empty clone
|
||||
assert(nil == Image(c, Rectangle(1, 1, 0, 0)))
|
||||
end
|
||||
|
||||
-- Patch
|
||||
|
Loading…
Reference in New Issue
Block a user