Commit Graph

64 Commits

Author SHA1 Message Date
Bryan Bishop
2ff3478bfd fix a typo in the switch prompt test 2013-11-11 21:57:08 -06:00
Bryan Bishop
d9bb01f2c0 rename the switch prompt detector 2013-11-11 21:56:34 -06:00
Bryan Bishop
993eaa3451 fix the is_switch_prompt test 2013-11-11 21:52:33 -06:00
Bryan Bishop
ba6eb203b4 a test for detecting the yes/no prompt 2013-11-11 21:48:29 -06:00
Bryan Bishop
e61643e681 use set_battle_mon_hp in a test 2013-11-11 21:33:14 -06:00
Bryan Bishop
966985411f detect the "mandatory switch" menu
This requires a slightly slower text_wait function. There is probably a
way to refactor that function in a way that doesn't cause cancer.
2013-11-11 00:55:54 -06:00
Bryan Bishop
1d9ecfa00f switch tests to use new battle starter 2013-11-11 00:04:32 -06:00
Bryan Bishop
9249ffd2d0 bootstrap the battle tests with more mons
Use the givepoke function to add a few more pokemon to the team before
starting the battle-related tests. There are some features of the battle
handling code that require more than one pokemon to be present in the
party.
2013-11-10 23:14:42 -06:00
Bryan Bishop
5495504228 make sure an attack works (new test) 2013-11-09 17:57:23 -06:00
Bryan Bishop
d5989b755a write another quick battle test 2013-11-09 15:59:16 -06:00
Bryan Bishop
eb31936aa7 simplify the battle tests 2013-11-09 15:53:17 -06:00
Bryan Bishop
3868fb1e06 simplify the vba-related tests
The imports for the emulator-related tests are now simplified in the
tests/ folder. The bootstrapping.py file contains some shared functions
that multiple test files might choose to use. Those functions probably
belong in the actual module instead of in tests/.

The battle-related tests have been separated from the other emulator
tests.
2013-11-09 15:45:03 -06:00
Bryan Bishop
54e2b189b8 Merge branch 'master' into vba-automation
Conflicts:
	pokemontools/vba/vba.py
2013-11-09 15:25:34 -06:00
Bryan Bishop
8f0b06f22e fix an import in tests.py 2013-11-09 15:21:59 -06:00
Bryan Bishop
8c7e2bcae7 Merge branch 'master' into vba-automation 2013-11-09 15:16:48 -06:00
Bryan Bishop
cc40339298 import Battle for testing 2013-11-09 15:16:34 -06:00
Bryan Bishop
cddfe3804d fix a few imports for testing an old func 2013-11-09 15:10:06 -06:00
Bryan Bishop
11664e2ac6 a basic battle test 2013-11-09 15:08:04 -06:00
Bryan Bishop
5fdd27030e move() can now take a list of movements to make 2013-10-12 16:41:50 -05:00
Bryan Bishop
2268dd43b5 additional words for the keyboard testing 2013-09-22 17:27:21 -05:00
Bryan Bishop
e048f192d9 test keyboard typing functions
This tests 18 different names being typed on the keyboard. These are
supposed to be typed using the shortest possible sequence of button
presses to get to the right letter selection.
2013-09-22 12:15:33 -05:00
Bryan Bishop
e3f6d91d06 basic keyboard writing test 2013-09-22 11:39:34 -05:00
Bryan Bishop
c1fbb59696 a test for moving in circles
Well, it's more like a square.
2013-09-22 10:21:09 -05:00
Bryan Bishop
13a1da5e84 remove vba.shutdown() from another test 2013-09-22 10:14:17 -05:00
Bryan Bishop
1d92396ca9 reduce some duplicated code inside some tests
Those movement checks are now collapsed into a single function that each
test can individually call.
2013-09-22 10:10:46 -05:00
Bryan Bishop
3151acd42c remove unnecessary emulator shutdown 2013-09-22 02:58:25 -05:00
Bryan Bishop
840e447557 change the walk test after Elm's Lab
The walk test is useful to see if the player is able to move, but it
shouldn't walk down and out of the building because the test is
comparing against the MapNumber for Elm's Lab and not New Bark Town.
2013-09-22 02:55:08 -05:00
Bryan Bishop
742bdf8c2f test that the Elm's Lab sequence works 2013-09-22 02:48:41 -05:00
Bryan Bishop
7d3994ae75 test that the current map is correct 2013-09-22 02:33:02 -05:00
Bryan Bishop
57dc8c4fd0 add more defaults to setup_wram for testing
This is sorta absurd, it should just load these values by parsing
wram.asm on its own.
2013-09-22 02:27:57 -05:00
Bryan Bishop
3e0a674817 test the walk_into_new_bark_town vba method 2013-09-22 02:21:08 -05:00
Bryan Bishop
80cda61ec4 test autoplayer handle_mom 2013-09-22 02:17:02 -05:00
Bryan Bishop
ffad17245b remove old jython comments from the vba tests 2013-09-22 02:07:43 -05:00
Bryan Bishop
f52f6148d7 combine some tests together 2013-09-22 02:06:38 -05:00
Bryan Bishop
5aa423ee62 make the vba tests pass 2013-09-22 01:55:26 -05:00
Bryan Bishop
2614df2587 use the state property during test bootstrapping 2013-09-22 01:02:56 -05:00
Bryan Bishop
713c4ceb77 fix the autoplayer bootstrapper for test_vba.py 2013-09-22 00:10:07 -05:00
Bryan Bishop
f0e75972a1 move tests into test_vba.py
They didn't belong in pokemontools/vba/vba.py in the first place.
2013-09-21 23:14:58 -05:00
Bryan Bishop
463cd6197f move find_labels_without_addresses into labels.py 2013-09-12 01:15:45 -05:00
Bryan Bishop
05c396ddd9 remove an unused import from integration tests 2013-09-12 01:15:01 -05:00
Bryan Bishop
37b9c79b4c fix some imports in test_vba.py 2013-09-08 22:54:39 -05:00
Bryan Bishop
bde8f7670a vba_tests.py -> test_vba.py
This matches the other filenames in the tests/ directory.
2013-09-08 22:53:18 -05:00
Bryan Bishop
15c04c9885 crude tests for the vba automation software 2013-09-08 02:01:47 -05:00
Bryan Bishop
74a9f14502 move index and grouper into helpers.py 2013-09-01 15:33:52 -05:00
Bryan Bishop
4a00cfac15 make the TestPostParsing test case work again
It needs to be a subclass of unittest.TestCase in order to get any of
the testing methods. Otherwise all of the tests fail when nosetests
finds those tests.
2013-09-01 14:29:31 -05:00
Bryan Bishop
611c2ecdd0 fix the test for calculate_bank
There shouldn't be any exception thrown by calculate_bank since it was
changed some time ago.
2013-08-04 16:11:51 -05:00
Bryan Bishop
a1bfc404cb make isolate_incbins not take a global asm
Why on earth was this using globals?
2013-08-04 15:59:16 -05:00
Bryan Bishop
dbf6c1eedc fix setUpClass for a unittest.TestCase 2013-08-04 15:42:59 -05:00
Bryan Bishop
51d7e0e876 fix a test that used Label
Label had changed since the test was first written.
2013-08-04 15:40:04 -05:00
Bryan Bishop
1169805e54 improve the test for incbin splitting 2013-08-04 15:35:51 -05:00