mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-07 19:06:39 +00:00
Add tests for app.activeTool
This commit is contained in:
parent
771d5f8a85
commit
8e378c4e45
@ -3,6 +3,22 @@
|
|||||||
-- This file is released under the terms of the MIT license.
|
-- This file is released under the terms of the MIT license.
|
||||||
-- Read LICENSE.txt for more information.
|
-- Read LICENSE.txt for more information.
|
||||||
|
|
||||||
|
----------------------------------------------------------------------
|
||||||
|
-- activeTool
|
||||||
|
----------------------------------------------------------------------
|
||||||
|
|
||||||
|
local pencil = app.activeTool -- pencil is the default tool
|
||||||
|
assert(pencil ~= nil)
|
||||||
|
assert(pencil.id == 'pencil')
|
||||||
|
app.activeTool = 'line'
|
||||||
|
assert(app.activeTool.id == 'line')
|
||||||
|
app.activeTool = pencil
|
||||||
|
assert(app.activeTool.id == 'pencil')
|
||||||
|
|
||||||
|
----------------------------------------------------------------------
|
||||||
|
-- create sprite for testing
|
||||||
|
----------------------------------------------------------------------
|
||||||
|
|
||||||
local spr = Sprite(4, 4)
|
local spr = Sprite(4, 4)
|
||||||
local cel = spr.cels[1]
|
local cel = spr.cels[1]
|
||||||
assert(cel.bounds == Rectangle(0, 0, 4, 4))
|
assert(cel.bounds == Rectangle(0, 0, 4, 4))
|
||||||
|
Loading…
Reference in New Issue
Block a user