diff options
| author | ssmith | 2006-05-14 20:59:40 -0700 |
|---|---|---|
| committer | ssmith | 2006-05-14 20:59:40 -0700 |
| commit | 1cab933d085a1288e7214a5bb615ab27204ce18e (patch) | |
| tree | c3703b81b1c290fe543ee6c995ce6a14d19ea267 /tests.erl | |
| parent | 83a084ccaed3cb6f43d7c9a28dcac4267aba737d (diff) | |
Add tests for other dict key types.
Diffstat (limited to 'tests.erl')
| -rw-r--r-- | tests.erl | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -34,9 +34,15 @@ test_enc_list3() -> {string, "xyz"}]})). %% Dict encoding tests -test_enc_dict() -> +test_enc_dict1() -> Dict = dict:from_list([{"age", {int, 25}}, {"eyes", {string, "blue"}}]), ?match("d3:agei25e4:eyes4:bluee", bencode:bencode({dict, Dict})). +test_enc_dict2() -> + Dict = dict:from_list([{age, {int, 25}}, {eyes, {string, "blue"}}]), + ?match("d3:agei25e4:eyes4:bluee", bencode:bencode({dict, Dict})). +test_enc_dict3() -> + Dict = dict:from_list([{{string, "age"}, {int, 25}}, {{string, "eyes"}, {string, "blue"}}]), + ?match("d3:agei25e4:eyes4:bluee", bencode:bencode({dict, Dict})). %% Integer decoding tests |
