From 1385fb189401232398bd61c3e673a47e597fb0fc Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Fri, 22 Jan 2021 20:53:48 +0100 Subject: [PATCH] add test for unique sram offsets for shops doubles as a way to print them out for debugging --- test/shops/TestSram.py | 13 +++++++++++++ test/shops/__init__.py | 0 2 files changed, 13 insertions(+) create mode 100644 test/shops/TestSram.py create mode 100644 test/shops/__init__.py diff --git a/test/shops/TestSram.py b/test/shops/TestSram.py new file mode 100644 index 0000000000..0da4e42e14 --- /dev/null +++ b/test/shops/TestSram.py @@ -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) diff --git a/test/shops/__init__.py b/test/shops/__init__.py new file mode 100644 index 0000000000..e69de29bb2