From e3a596e7d8c9de64162da2e0a05d5b17942d4694 Mon Sep 17 00:00:00 2001 From: Bryan Bishop Date: Sat, 21 Sep 2013 22:12:37 -0500 Subject: fix a vba.py test (test_PlaceString) --- pokemontools/vba/vba.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'pokemontools/vba/vba.py') 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) -- cgit v1.2.3