Commit fe89202077fe42c8caf34e3ea16d502652958216
- Diff rendering mode:
- inline
- side by side
t/03-util.t
(11 / 1)
|   | |||
| 17 | 17 | } | |
| 18 | 18 | ||
| 19 | 19 | sub run_tests () { | |
| 20 | plan(49); | ||
| 20 | plan(51); | ||
| 21 | 21 | ||
| 22 | 22 | test_hash_exists(); | |
| 23 | 23 | test_hash_keys(); | |
| 24 | 24 | test_hash_values(); | |
| 25 | 25 | test_hash_kv(); | |
| 26 | test_hash(); | ||
| 26 | 27 | ||
| 27 | 28 | test_all_matches(); | |
| 28 | 29 | ||
| … | … | ||
| 43 | 43 | is(@matches[0],'abc','all_matches found abc'); | |
| 44 | 44 | is(@matches[1],'adc','all_matches found adc'); | |
| 45 | 45 | is(@matches[2],'axc','all_matches found axc'); | |
| 46 | } | ||
| 47 | |||
| 48 | sub test_hash() { | ||
| 49 | my %hash := hash( monkey => 'see'); | ||
| 50 | my @kv := %hash.kv; | ||
| 51 | |||
| 52 | is(@kv[0],'monkey', 'has() creates the monkey key'); | ||
| 53 | is(@kv[1],'see', 'hash() set the value of monkey correctly'); | ||
| 54 | |||
| 46 | 55 | } | |
| 47 | 56 | ||
| 48 | 57 | sub test_hash_exists() { |

