|
| 1 | +module main |
| 2 | + |
| 3 | +fn test_fly() { |
| 4 | + expected := ("I know an old lady who swallowed a fly. |
| 5 | +I don't know why she swallowed the fly. Perhaps she'll die.") |
| 6 | + assert recite(1, 1) == expected |
| 7 | +} |
| 8 | + |
| 9 | +fn test_spider() { |
| 10 | + expected := ("I know an old lady who swallowed a spider. |
| 11 | +It wriggled and jiggled and tickled inside her. |
| 12 | +She swallowed the spider to catch the fly. |
| 13 | +I don't know why she swallowed the fly. Perhaps she'll die.") |
| 14 | + assert recite(2, 2) == expected |
| 15 | +} |
| 16 | + |
| 17 | +fn test_bird() { |
| 18 | + expected := ("I know an old lady who swallowed a bird. |
| 19 | +How absurd to swallow a bird! |
| 20 | +She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her. |
| 21 | +She swallowed the spider to catch the fly. |
| 22 | +I don't know why she swallowed the fly. Perhaps she'll die.") |
| 23 | + assert recite(3, 3) == expected |
| 24 | +} |
| 25 | + |
| 26 | +fn test_cat() { |
| 27 | + expected := ("I know an old lady who swallowed a cat. |
| 28 | +Imagine that, to swallow a cat! |
| 29 | +She swallowed the cat to catch the bird. |
| 30 | +She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her. |
| 31 | +She swallowed the spider to catch the fly. |
| 32 | +I don't know why she swallowed the fly. Perhaps she'll die.") |
| 33 | + assert recite(4, 4) == expected |
| 34 | +} |
| 35 | + |
| 36 | +fn test_dog() { |
| 37 | + expected := ("I know an old lady who swallowed a dog. |
| 38 | +What a hog, to swallow a dog! |
| 39 | +She swallowed the dog to catch the cat. |
| 40 | +She swallowed the cat to catch the bird. |
| 41 | +She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her. |
| 42 | +She swallowed the spider to catch the fly. |
| 43 | +I don't know why she swallowed the fly. Perhaps she'll die.") |
| 44 | + assert recite(5, 5) == expected |
| 45 | +} |
| 46 | + |
| 47 | +fn test_goat() { |
| 48 | + expected := ("I know an old lady who swallowed a goat. |
| 49 | +Just opened her throat and swallowed a goat! |
| 50 | +She swallowed the goat to catch the dog. |
| 51 | +She swallowed the dog to catch the cat. |
| 52 | +She swallowed the cat to catch the bird. |
| 53 | +She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her. |
| 54 | +She swallowed the spider to catch the fly. |
| 55 | +I don't know why she swallowed the fly. Perhaps she'll die.") |
| 56 | + assert recite(6, 6) == expected |
| 57 | +} |
| 58 | + |
| 59 | +fn test_cow() { |
| 60 | + expected := ("I know an old lady who swallowed a cow. |
| 61 | +I don't know how she swallowed a cow! |
| 62 | +She swallowed the cow to catch the goat. |
| 63 | +She swallowed the goat to catch the dog. |
| 64 | +She swallowed the dog to catch the cat. |
| 65 | +She swallowed the cat to catch the bird. |
| 66 | +She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her. |
| 67 | +She swallowed the spider to catch the fly. |
| 68 | +I don't know why she swallowed the fly. Perhaps she'll die.") |
| 69 | + assert recite(7, 7) == expected |
| 70 | +} |
| 71 | + |
| 72 | +fn test_horse() { |
| 73 | + expected := ("I know an old lady who swallowed a horse. |
| 74 | +She's dead, of course!") |
| 75 | + assert recite(8, 8) == expected |
| 76 | +} |
| 77 | + |
| 78 | +fn test_multiple_verses() { |
| 79 | + expected := ("I know an old lady who swallowed a fly. |
| 80 | +I don't know why she swallowed the fly. Perhaps she'll die. |
| 81 | +
|
| 82 | +I know an old lady who swallowed a spider. |
| 83 | +It wriggled and jiggled and tickled inside her. |
| 84 | +She swallowed the spider to catch the fly. |
| 85 | +I don't know why she swallowed the fly. Perhaps she'll die. |
| 86 | +
|
| 87 | +I know an old lady who swallowed a bird. |
| 88 | +How absurd to swallow a bird! |
| 89 | +She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her. |
| 90 | +She swallowed the spider to catch the fly. |
| 91 | +I don't know why she swallowed the fly. Perhaps she'll die.") |
| 92 | + assert recite(1, 3) == expected |
| 93 | +} |
| 94 | + |
| 95 | +fn test_full_song() { |
| 96 | + expected := ("I know an old lady who swallowed a fly. |
| 97 | +I don't know why she swallowed the fly. Perhaps she'll die. |
| 98 | +
|
| 99 | +I know an old lady who swallowed a spider. |
| 100 | +It wriggled and jiggled and tickled inside her. |
| 101 | +She swallowed the spider to catch the fly. |
| 102 | +I don't know why she swallowed the fly. Perhaps she'll die. |
| 103 | +
|
| 104 | +I know an old lady who swallowed a bird. |
| 105 | +How absurd to swallow a bird! |
| 106 | +She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her. |
| 107 | +She swallowed the spider to catch the fly. |
| 108 | +I don't know why she swallowed the fly. Perhaps she'll die. |
| 109 | +
|
| 110 | +I know an old lady who swallowed a cat. |
| 111 | +Imagine that, to swallow a cat! |
| 112 | +She swallowed the cat to catch the bird. |
| 113 | +She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her. |
| 114 | +She swallowed the spider to catch the fly. |
| 115 | +I don't know why she swallowed the fly. Perhaps she'll die. |
| 116 | +
|
| 117 | +I know an old lady who swallowed a dog. |
| 118 | +What a hog, to swallow a dog! |
| 119 | +She swallowed the dog to catch the cat. |
| 120 | +She swallowed the cat to catch the bird. |
| 121 | +She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her. |
| 122 | +She swallowed the spider to catch the fly. |
| 123 | +I don't know why she swallowed the fly. Perhaps she'll die. |
| 124 | +
|
| 125 | +I know an old lady who swallowed a goat. |
| 126 | +Just opened her throat and swallowed a goat! |
| 127 | +She swallowed the goat to catch the dog. |
| 128 | +She swallowed the dog to catch the cat. |
| 129 | +She swallowed the cat to catch the bird. |
| 130 | +She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her. |
| 131 | +She swallowed the spider to catch the fly. |
| 132 | +I don't know why she swallowed the fly. Perhaps she'll die. |
| 133 | +
|
| 134 | +I know an old lady who swallowed a cow. |
| 135 | +I don't know how she swallowed a cow! |
| 136 | +She swallowed the cow to catch the goat. |
| 137 | +She swallowed the goat to catch the dog. |
| 138 | +She swallowed the dog to catch the cat. |
| 139 | +She swallowed the cat to catch the bird. |
| 140 | +She swallowed the bird to catch the spider that wriggled and jiggled and tickled inside her. |
| 141 | +She swallowed the spider to catch the fly. |
| 142 | +I don't know why she swallowed the fly. Perhaps she'll die. |
| 143 | +
|
| 144 | +I know an old lady who swallowed a horse. |
| 145 | +She's dead, of course!") |
| 146 | + assert recite(1, 8) == expected |
| 147 | +} |
0 commit comments