mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
add test for unique sram offsets for shops
doubles as a way to print them out for debugging
This commit is contained in:
13
test/shops/TestSram.py
Normal file
13
test/shops/TestSram.py
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
from Shops import shop_table
|
||||||
|
from test.TestBase import TestBase
|
||||||
|
|
||||||
|
|
||||||
|
class TestSram(TestBase):
|
||||||
|
def testUniqueOffset(self):
|
||||||
|
sram_ids = set()
|
||||||
|
for shop_name, shopdata in shop_table.items():
|
||||||
|
for x in range(3):
|
||||||
|
new = shopdata.sram_offset + x
|
||||||
|
with self.subTest(shop_name, slot=x + 1, offset=new):
|
||||||
|
self.assertNotIn(new, sram_ids)
|
||||||
|
sram_ids.add(new)
|
0
test/shops/__init__.py
Normal file
0
test/shops/__init__.py
Normal file
Reference in New Issue
Block a user