Changeset 349
- Timestamp:
- 10/22/07 01:48:24 (14 months ago)
- Location:
- veekun/trunk/t
- Files:
-
- 2 modified
-
dex-search-moves.t (modified) (2 diffs)
-
dex-search-pokemon.t (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
veekun/trunk/t/dex-search-moves.t
r348 r349 27 27 search_ok { name => 'fire', class => 'physical' }, 28 28 [qw/ 7 221 424 /], 29 "Damage class ( withname)";29 "Damage class (+ name)"; 30 30 31 31 search_ok { class => 'special', type => 'dark' }, 32 32 [qw/ 399 /], 33 "Type ( withdamage class)";33 "Type (+ damage class)"; 34 34 35 35 search_ok { type => 'dragon', generation => 1 }, 36 36 [qw/ 200 225 239/], 37 "Generation ( withtype)";37 "Generation (+ type)"; 38 38 39 39 search_ok { type => 'steel', generation => 0 }, … … 67 67 search_ok { name => 'fire', sort => 'name' }, 68 68 [qw/ 126 424 7 83 221 /], 69 "Sorting ( withname)";69 "Sorting (+ name)"; 70 70 71 71 # TODO: This is remarkably similar to the Pokemon search sub! Generalize and -
veekun/trunk/t/dex-search-pokemon.t
r348 r349 28 28 search_ok { ability => 'Drizzle' }, 29 29 [qw/ 382 /], 30 " Only Kyogre has Drizzle";30 "Ability"; 31 31 32 32 search_ok { color => 'black', habitat => 'urban' }, 33 33 [qw/ 197 353 354 /], 34 " Black urban Pokemon";34 "Color and habitat"; 35 35 36 36 search_ok { name => 'eon', evo_stage => 'base' }, 37 37 [qw/ 352 456 /], 38 " The only baseform *eon*s are Kecleon and Finneon";38 "Baseforms (+ name)"; 39 39 40 40 search_ok { name => 'char', evo_stage => 'final' }, 41 41 [qw/ 6 /], 42 " The only final form *char* is Charizard";42 "Final forms (+ name)"; 43 43 44 44 # Gender dropdown had a few problems at one point, so I gave it several tests 45 45 search_ok { gender => 254, generation => 0 }, 46 46 [qw/ 29 30 31 113 115 124 /], 47 "Female-only s in RBY";47 "Female-only (+ generation)"; 48 48 49 49 search_ok { name => 'voltorb', gender => 'not255' }, 50 50 [qw/ /], 51 " Voltorb isn't returned by 'any gender'";51 "Any gender (+ name)"; 52 52 53 53 search_ok { name => 'eevee', gender => 255 }, 54 54 [qw/ /], 55 " Eevee isn't returned by 'no gender'";55 "No gender (+ impossible name)"; 56 56 57 57 # Likewise with the breeding; that's gone wrong several times 58 58 search_ok { breed_mode => 'and', breed => [1, 2], evo_stage => 'base' }, 59 59 [qw/ 7 79 131 158 258 /], 60 " Families that are Monster/Water 1";60 "Two different egg groups with 'and' (+ baseform)"; 61 61 62 62 search_ok { breed_mode => 'and', breed => [13, 13] }, 63 63 [qw/ 132 /], 64 " Only Ditto is in the Ditto/Ditto group's'";64 "Two identical egg groups with 'and'"; 65 65 66 66 search_ok { breed_mode => 'and', breed => [13, 0] }, 67 67 [qw/ 132 /], 68 " Ditto is also returned when searching for Ditto and n/a";68 "One egg group plus n/a with 'and'"; 69 69 70 70 search_ok { breed_mode => 'and', breed => [13, 5] }, 71 71 [qw/ /], 72 " ...but not when searching for Ditto and any other group";72 "Two different egg groups with 'and' that can't occur together"; 73 73 74 74 search_ok { … … 79 79 }, 80 80 [qw/ 72 88 90 92 98 109 120 138 140 /], 81 " RBY families that are Water 3 *or* Indeterminate";81 "Two different egg groups with 'or' (+ generation and baseform)"; 82 82 83 83 search_ok { generation => 2, basedex => 3 }, 84 84 [qw/ 265 266 267 268 269 278 279 298 307 308 315 339 340 349 350 358 /], 85 " Pokemon from GSC that appear in DP";85 "Generation and base Pokedex"; 86 86 87 87 # Types are another common problem area 88 88 search_ok { name => 'eon', type_mode => 'any', type => [qw/ fire /] }, 89 89 [qw/ 5 136 /], 90 " Fire *eon*s";90 "Single type with 'any' (+ name)"; 91 91 92 92 search_ok { name => 'eon', type_mode => 'any', type => [qw/ fire water /] }, 93 93 [qw/ 5 134 136 395 456 457 /], 94 " Fire or water *eon*s";94 "Two types with 'any' (+ name)"; 95 95 96 96 search_ok { name => 'eon', type_mode => 'any', type => [qw/ fire water electric /] }, 97 97 [qw/ 5 134 135 136 395 456 457 /], 98 " Fire or water or electric *eon*s";98 "Three types with 'any' (+ name)"; 99 99 100 100 search_ok { type_mode => 'all', type => [qw/ bug dragon /] }, 101 101 [qw/ /], 102 " Bug/dragon Pokemon";102 "Two types with 'all' that never occur"; 103 103 104 104 search_ok { type_mode => 'all', type => [qw/ ghost dragon /] }, 105 105 [qw/ 487 /], 106 " Ghost/dragon Pokemon";106 "Two types with 'all'"; 107 107 108 108 search_ok { type_mode => 'all', type => [qw/ dragon ghost /] }, 109 109 [qw/ 487 /], 110 " Dragon/ghost Pokemon(i.e. order doesn't matter)";110 "Same two types with 'all', reversed (i.e. order doesn't matter)"; 111 111 112 112 search_ok { type_mode => 'all', type => [qw/ normal flying psychic /] }, 113 113 [qw/ /], 114 " Must have three types";114 "Three types with 'all'"; 115 115 116 # Moves have a lot of possibilities; I just try a few here116 # Moves have a lot of possibilities; I just try a few easy ones here 117 117 search_ok { move => 'judgment' }, 118 118 [qw/ 493 /], 119 " Learns Judgment";119 "Single move"; 120 120 121 121 search_ok { move => 'judgment', move_method => [qw/ egg machine tutor /] }, 122 122 [qw/ /], 123 " ...by leveling up";123 "Single move not by leveling up"; 124 124 125 125 search_ok { move => 'judgment', move_version => [qw/ rb y gs c rusa frlg e /] }, 126 126 [qw/ /], 127 " ...not in DP";127 "Single move by not in D/P"; 128 128 129 129 search_ok { move => [qw/ splash tackle /], move_version => 'rb' }, 130 130 [qw/ 129 /], 131 " Learns Splash and Tackle in RB";131 "Two moves in a specific generation"; 132 132 133 133 # Similar for the stats; these all work the same so whatever 134 134 search_ok { stat_hp_lb => 250 }, 135 135 [qw/ 113 242 /], 136 " HP stat of 250+";136 "Lower bound on HP"; 137 137 138 138 # Height and weight had some rounding issues 139 139 search_ok { generation => 1, height_lb => 16, height_ub => 16 }, 140 140 [qw/ 182 183 187 194 220 238 /], 141 " GSC Pokemon that are 16\" tall";141 "Exact height in inches (+ generation)"; 142 142 143 143 search_ok { height_lb => '0.2m', height_ub => '0.2m' }, 144 144 [qw/ 50 177 298 406 412 433 492 /], 145 " Pokemon that are 0.2m tall";145 "Exact height in meters"; 146 146 147 147 search_ok { height_lb => '20cm', height_ub => '20cm' }, 148 148 [qw/ 50 177 298 406 412 433 492 /], 149 " Pokemon that are 20cm tall (same as above)";149 "Exact height in centimeters"; 150 150 151 151 # Quick sorting checks
