mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-28 18:32:50 +00:00
Test Point/Size/Rectangle ctor with array of integers
This commit is contained in:
parent
a459ad6ffc
commit
e70c6c5962
@ -1,3 +1,4 @@
|
|||||||
|
-- Copyright (C) 2019 Igara Studio S.A.
|
||||||
-- Copyright (C) 2018 David Capello
|
-- Copyright (C) 2018 David Capello
|
||||||
--
|
--
|
||||||
-- This file is released under the terms of the MIT license.
|
-- This file is released under the terms of the MIT license.
|
||||||
@ -24,3 +25,7 @@ assert(pt.y == 6)
|
|||||||
pt = Point{x=10, y=20}
|
pt = Point{x=10, y=20}
|
||||||
assert(pt.x == 10)
|
assert(pt.x == 10)
|
||||||
assert(pt.y == 20)
|
assert(pt.y == 20)
|
||||||
|
|
||||||
|
pt = Point{45, 25}
|
||||||
|
assert(pt.x == 45)
|
||||||
|
assert(pt.y == 25)
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
-- Copyright (C) 2019 Igara Studio S.A.
|
||||||
-- Copyright (C) 2018 David Capello
|
-- Copyright (C) 2018 David Capello
|
||||||
--
|
--
|
||||||
-- This file is released under the terms of the MIT license.
|
-- This file is released under the terms of the MIT license.
|
||||||
@ -39,6 +40,12 @@ assert(rc.y == 3)
|
|||||||
assert(rc.width == 4)
|
assert(rc.width == 4)
|
||||||
assert(rc.height == 5)
|
assert(rc.height == 5)
|
||||||
|
|
||||||
|
rc = Rectangle{6, 7, 8, 9}
|
||||||
|
assert(rc.x == 6)
|
||||||
|
assert(rc.y == 7)
|
||||||
|
assert(rc.width == 8)
|
||||||
|
assert(rc.height == 9)
|
||||||
|
|
||||||
-- Rectangle:contains
|
-- Rectangle:contains
|
||||||
|
|
||||||
local a = Rectangle{x=2, y=3, width=4, height=5}
|
local a = Rectangle{x=2, y=3, width=4, height=5}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
-- Copyright (C) 2019 Igara Studio S.A.
|
||||||
-- Copyright (C) 2018 David Capello
|
-- Copyright (C) 2018 David Capello
|
||||||
--
|
--
|
||||||
-- This file is released under the terms of the MIT license.
|
-- This file is released under the terms of the MIT license.
|
||||||
@ -24,3 +25,7 @@ assert(sz.height == 8)
|
|||||||
sz = Size{width=10, height=20}
|
sz = Size{width=10, height=20}
|
||||||
assert(sz.width == 10)
|
assert(sz.width == 10)
|
||||||
assert(sz.height == 20)
|
assert(sz.height == 20)
|
||||||
|
|
||||||
|
sz = Size{45, 25}
|
||||||
|
assert(sz.width == 45)
|
||||||
|
assert(sz.height == 25)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user