def test_load_map_group_offsets(self): addresses = load_map_group_offsets() self.assertEqual(len(addresses), 26, msg="there should be 26 map groups") addresses = load_map_group_offsets() self.assertEqual(len(addresses), 26, msg="there should still be 26 map groups") self.assertIn(0x94034, addresses) for address in addresses: self.assertGreaterEqual(address, 0x4000) self.failIf(0x4000 <= address <= 0x7FFF) self.failIf(address <= 0x4000)
def test_load_map_group_offsets(self): rom = load_rom() map_group_pointer_table = 0x94000 map_group_count = 26 addresses = load_map_group_offsets(map_group_pointer_table, map_group_count, rom=rom) self.assertEqual(len(addresses), 26, msg="there should be 26 map groups") addresses = load_map_group_offsets(map_group_pointer_table, map_group_count, rom=rom) self.assertEqual(len(addresses), 26, msg="there should still be 26 map groups") self.assertIn(0x94034, addresses) for address in addresses: self.assertGreaterEqual(address, 0x4000) self.failIf(0x4000 <= address <= 0x7FFF) self.failIf(address <= 0x4000)