Test Point/Size/Rectangle ctor with array of integers

This commit is contained in:
David Capello 2019-07-19 18:39:32 -03:00
parent a459ad6ffc
commit e70c6c5962
3 changed files with 17 additions and 0 deletions

View File

@ -1,3 +1,4 @@
-- Copyright (C) 2019 Igara Studio S.A.
-- Copyright (C) 2018 David Capello
--
-- 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}
assert(pt.x == 10)
assert(pt.y == 20)
pt = Point{45, 25}
assert(pt.x == 45)
assert(pt.y == 25)

View File

@ -1,3 +1,4 @@
-- Copyright (C) 2019 Igara Studio S.A.
-- Copyright (C) 2018 David Capello
--
-- 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.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
local a = Rectangle{x=2, y=3, width=4, height=5}

View File

@ -1,3 +1,4 @@
-- Copyright (C) 2019 Igara Studio S.A.
-- Copyright (C) 2018 David Capello
--
-- 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}
assert(sz.width == 10)
assert(sz.height == 20)
sz = Size{45, 25}
assert(sz.width == 45)
assert(sz.height == 25)