mirror of
https://github.com/aseprite/aseprite.git
synced 2024-11-20 14:21:45 +00:00
Add tests for Selection.isEmpty/contains
This commit is contained in:
parent
ec5a4c263f
commit
e7a4cce508
@ -9,12 +9,18 @@ assert(a.bounds.x == 0)
|
||||
assert(a.bounds.y == 0)
|
||||
assert(a.bounds.width == 0)
|
||||
assert(a.bounds.height == 0)
|
||||
assert(a.isEmpty)
|
||||
|
||||
a:select(1, 2, 3, 4)
|
||||
assert(a.bounds.x == 1)
|
||||
assert(a.bounds.y == 2)
|
||||
assert(a.bounds.width == 3)
|
||||
assert(a.bounds.height == 4)
|
||||
assert(not a.isEmpty)
|
||||
assert(a:contains(1, 2))
|
||||
assert(a:contains(1+3-1, 2+4-1))
|
||||
assert(not a:contains(0, 1))
|
||||
assert(not a:contains(1+3, 2+4))
|
||||
|
||||
a:select{x=5, y=6, width=7, height=8}
|
||||
assert(a.bounds.x == 5)
|
||||
@ -27,3 +33,5 @@ assert(a.bounds.x == 0)
|
||||
assert(a.bounds.y == 0)
|
||||
assert(a.bounds.width == 0)
|
||||
assert(a.bounds.height == 0)
|
||||
assert(a.isEmpty)
|
||||
assert(not a:contains(0, 0))
|
||||
|
Loading…
Reference in New Issue
Block a user