mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-28 18:32:50 +00:00
Test Point/Size/Rectangle tostring
This commit is contained in:
parent
a32a0485c7
commit
7a1cd9dad7
@ -10,6 +10,7 @@ assert(pt.y == 0)
|
|||||||
pt = Point(1, 2)
|
pt = Point(1, 2)
|
||||||
assert(pt.x == 1)
|
assert(pt.x == 1)
|
||||||
assert(pt.y == 2)
|
assert(pt.y == 2)
|
||||||
|
assert("Point{ x=1, y=2 }" == tostring(pt))
|
||||||
|
|
||||||
local pt2 = Point(pt)
|
local pt2 = Point(pt)
|
||||||
assert(pt2.x == 1)
|
assert(pt2.x == 1)
|
||||||
|
@ -16,6 +16,7 @@ assert(rc.y == 2)
|
|||||||
assert(rc.width == 3)
|
assert(rc.width == 3)
|
||||||
assert(rc.height == 4)
|
assert(rc.height == 4)
|
||||||
assert(not rc.isEmpty)
|
assert(not rc.isEmpty)
|
||||||
|
assert("Rectangle{ x=1, y=2, width=3, height=4 }" == tostring(rc))
|
||||||
|
|
||||||
local rc2 = Rectangle(rc)
|
local rc2 = Rectangle(rc)
|
||||||
assert(rc2.x == 1)
|
assert(rc2.x == 1)
|
||||||
|
@ -10,6 +10,7 @@ assert(sz.height == 0)
|
|||||||
sz = Size(3, 4)
|
sz = Size(3, 4)
|
||||||
assert(sz.width == 3)
|
assert(sz.width == 3)
|
||||||
assert(sz.height == 4)
|
assert(sz.height == 4)
|
||||||
|
assert("Size{ width=3, height=4 }" == tostring(sz))
|
||||||
|
|
||||||
local sz2 = Size(sz)
|
local sz2 = Size(sz)
|
||||||
assert(sz2.width == 3)
|
assert(sz2.width == 3)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user