Skip to content

Commit

Permalink
(agrf) More test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
ahyangyi committed Nov 15, 2024
1 parent bcb2a41 commit 0e1d502
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion agrf/lib/building/layout_test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from agrf.lib.building.layout import ADefaultGroundSprite
from agrf.lib.building.layout import ADefaultGroundSprite, ALayout


def test_default_groundsprite():
Expand All @@ -7,3 +7,20 @@ def test_default_groundsprite():
graphics = gs1012.graphics(4, 32).to_image()
assert graphics.shape == (127, 256, 4)
assert graphics[64, 128, 1] == 67

m_graphics = gs1012.M.graphics(4, 32).to_image()
assert m_graphics.shape == (127, 256, 4)
assert m_graphics[64, 128, 1] == 72


def test_layout():
gs1012 = ADefaultGroundSprite(1012)
l = ALayout(gs1012, [], True)

graphics = l.graphics(4, 32).to_image()
assert graphics.shape == (127, 256, 4)
assert graphics[64, 128, 1] == 67

m_graphics = l.M.graphics(4, 32).to_image()
assert m_graphics.shape == (127, 256, 4)
assert m_graphics[64, 128, 1] == 72

0 comments on commit 0e1d502

Please sign in to comment.