Changeset 349

Show
Ignore:
Timestamp:
10/22/07 01:48:24 (14 months ago)
Author:
eevee
Message:

Rewrote some of the test names in the Pokemon search test to focus on what I'm testing, not how I'm testing it.

Location:
veekun/trunk/t
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • veekun/trunk/t/dex-search-moves.t

    r348 r349  
    2727search_ok { name => 'fire', class => 'physical' }, 
    2828    [qw/ 7 221 424 /], 
    29     "Damage class (with name)"; 
     29    "Damage class (+ name)"; 
    3030 
    3131search_ok { class => 'special', type => 'dark' }, 
    3232    [qw/ 399 /], 
    33     "Type (with damage class)"; 
     33    "Type (+ damage class)"; 
    3434 
    3535search_ok { type => 'dragon', generation => 1 }, 
    3636    [qw/ 200 225 239/], 
    37     "Generation (with type)"; 
     37    "Generation (+ type)"; 
    3838 
    3939search_ok { type => 'steel', generation => 0 }, 
     
    6767search_ok { name => 'fire', sort => 'name' }, 
    6868    [qw/ 126 424 7 83 221 /], 
    69     "Sorting (with name)"; 
     69    "Sorting (+ name)"; 
    7070 
    7171# TODO: This is remarkably similar to the Pokemon search sub!  Generalize and 
  • veekun/trunk/t/dex-search-pokemon.t

    r348 r349  
    2828search_ok { ability => 'Drizzle' }, 
    2929    [qw/ 382 /], 
    30     "Only Kyogre has Drizzle"; 
     30    "Ability"; 
    3131 
    3232search_ok { color => 'black', habitat => 'urban' }, 
    3333    [qw/ 197 353 354 /], 
    34     "Black urban Pokemon"; 
     34    "Color and habitat"; 
    3535 
    3636search_ok { name => 'eon', evo_stage => 'base' }, 
    3737    [qw/ 352 456 /], 
    38     "The only baseform *eon*s are Kecleon and Finneon"; 
     38    "Baseforms (+ name)"; 
    3939 
    4040search_ok { name => 'char', evo_stage => 'final' }, 
    4141    [qw/ 6 /], 
    42     "The only final form *char* is Charizard"; 
     42    "Final forms (+ name)"; 
    4343 
    4444# Gender dropdown had a few problems at one point, so I gave it several tests 
    4545search_ok { gender => 254, generation => 0 }, 
    4646    [qw/ 29 30 31 113 115 124 /], 
    47     "Female-onlys in RBY"; 
     47    "Female-only (+ generation)"; 
    4848 
    4949search_ok { name => 'voltorb', gender => 'not255' }, 
    5050    [qw/ /], 
    51     "Voltorb isn't returned by 'any gender'"; 
     51    "Any gender (+ name)"; 
    5252 
    5353search_ok { name => 'eevee', gender => 255 }, 
    5454    [qw/ /], 
    55     "Eevee isn't returned by 'no gender'"; 
     55    "No gender (+ impossible name)"; 
    5656 
    5757# Likewise with the breeding; that's gone wrong several times 
    5858search_ok { breed_mode => 'and', breed => [1, 2], evo_stage => 'base' }, 
    5959    [qw/ 7 79 131 158 258 /], 
    60     "Families that are Monster/Water 1"; 
     60    "Two different egg groups with 'and' (+ baseform)"; 
    6161 
    6262search_ok { breed_mode => 'and', breed => [13, 13] }, 
    6363    [qw/ 132 /], 
    64     "Only Ditto is in the Ditto/Ditto group's'"; 
     64    "Two identical egg groups with 'and'"; 
    6565 
    6666search_ok { breed_mode => 'and', breed => [13, 0] }, 
    6767    [qw/ 132 /], 
    68     "Ditto is also returned when searching for Ditto and n/a"; 
     68    "One egg group plus n/a with 'and'"; 
    6969 
    7070search_ok { breed_mode => 'and', breed => [13, 5] }, 
    7171    [qw/ /], 
    72     "...but not when searching for Ditto and any other group"; 
     72    "Two different egg groups with 'and' that can't occur together"; 
    7373 
    7474search_ok { 
     
    7979    }, 
    8080    [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)"; 
    8282 
    8383search_ok { generation => 2, basedex => 3 }, 
    8484    [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"; 
    8686 
    8787# Types are another common problem area 
    8888search_ok { name => 'eon', type_mode => 'any', type => [qw/ fire /] }, 
    8989    [qw/ 5 136 /], 
    90     "Fire *eon*s"; 
     90    "Single type with 'any' (+ name)"; 
    9191 
    9292search_ok { name => 'eon', type_mode => 'any', type => [qw/ fire water /] }, 
    9393    [qw/ 5 134 136 395 456 457 /], 
    94     "Fire or water *eon*s"; 
     94    "Two types with 'any' (+ name)"; 
    9595 
    9696search_ok { name => 'eon', type_mode => 'any', type => [qw/ fire water electric /] }, 
    9797    [qw/ 5 134 135 136 395 456 457 /], 
    98     "Fire or water or electric *eon*s"; 
     98    "Three types with 'any' (+ name)"; 
    9999 
    100100search_ok { type_mode => 'all', type => [qw/ bug dragon /] }, 
    101101    [qw/ /], 
    102     "Bug/dragon Pokemon"; 
     102    "Two types with 'all' that never occur"; 
    103103 
    104104search_ok { type_mode => 'all', type => [qw/ ghost dragon /] }, 
    105105    [qw/ 487 /], 
    106     "Ghost/dragon Pokemon"; 
     106    "Two types with 'all'"; 
    107107 
    108108search_ok { type_mode => 'all', type => [qw/ dragon ghost /] }, 
    109109    [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)"; 
    111111 
    112112search_ok { type_mode => 'all', type => [qw/ normal flying psychic /] }, 
    113113    [qw/ /], 
    114     "Must have three types"; 
     114    "Three types with 'all'"; 
    115115 
    116 # Moves have a lot of possibilities; I just try a few here 
     116# Moves have a lot of possibilities; I just try a few easy ones here 
    117117search_ok { move => 'judgment' }, 
    118118    [qw/ 493 /], 
    119     "Learns Judgment"; 
     119    "Single move"; 
    120120 
    121121search_ok { move => 'judgment', move_method => [qw/ egg machine tutor /] }, 
    122122    [qw/ /], 
    123     "...by leveling up"; 
     123    "Single move not by leveling up"; 
    124124 
    125125search_ok { move => 'judgment', move_version => [qw/ rb y gs c rusa frlg e /] }, 
    126126    [qw/ /], 
    127     "...not in DP"; 
     127    "Single move by not in D/P"; 
    128128 
    129129search_ok { move => [qw/ splash tackle /], move_version => 'rb' }, 
    130130    [qw/ 129 /], 
    131     "Learns Splash and Tackle in RB"; 
     131    "Two moves in a specific generation"; 
    132132 
    133133# Similar for the stats; these all work the same so whatever 
    134134search_ok { stat_hp_lb => 250 }, 
    135135    [qw/ 113 242 /], 
    136     "HP stat of 250+"; 
     136    "Lower bound on HP"; 
    137137 
    138138# Height and weight had some rounding issues 
    139139search_ok { generation => 1, height_lb => 16, height_ub => 16 }, 
    140140    [qw/ 182 183 187 194 220 238 /], 
    141     "GSC Pokemon that are 16\" tall"; 
     141    "Exact height in inches (+ generation)"; 
    142142 
    143143search_ok { height_lb => '0.2m', height_ub => '0.2m' }, 
    144144    [qw/ 50 177 298 406 412 433 492 /], 
    145     "Pokemon that are 0.2m tall"; 
     145    "Exact height in meters"; 
    146146 
    147147search_ok { height_lb => '20cm', height_ub => '20cm' }, 
    148148    [qw/ 50 177 298 406 412 433 492 /], 
    149     "Pokemon that are 20cm tall (same as above)"; 
     149    "Exact height in centimeters"; 
    150150 
    151151# Quick sorting checks