summaryrefslogtreecommitdiff
path: root/pokemontools/vba/vba.py
diff options
context:
space:
mode:
Diffstat (limited to 'pokemontools/vba/vba.py')
-rw-r--r--pokemontools/vba/vba.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/pokemontools/vba/vba.py b/pokemontools/vba/vba.py
index 7e3f0a7..b775970 100644
--- a/pokemontools/vba/vba.py
+++ b/pokemontools/vba/vba.py
@@ -462,18 +462,21 @@ class crystal(object):
memory = self.vba.memory
class TestEmulator(unittest.TestCase):
+ def setUp(self):
+ self.cry = crystal()
+
def test_PlaceString(self):
- crystal.call(0, 0x1078)
+ self.cry.call(0, 0x1078)
# where to draw the text
- registers["hl"] = 0xc4a0
+ self.cry.registers["hl"] = 0xc4a0
# what text to read from
- registers["de"] = 0x1276
+ self.cry.registers["de"] = 0x1276
- vba.step(count=10)
+ self.cry.vba.step(count=10)
- text = crystal.get_text()
+ text = self.cry.get_text()
self.assertTrue("TRAINER" in text)