From 00622aaa2f0844920db2e34b08c96517dbdce41d Mon Sep 17 00:00:00 2001 From: ssmith Date: Sun, 14 May 2006 20:56:49 -0700 Subject: Add dict encoder and basic test. --- tests.erl | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests.erl') diff --git a/tests.erl b/tests.erl index a12b663..ce891be 100644 --- a/tests.erl +++ b/tests.erl @@ -33,6 +33,11 @@ test_enc_list3() -> {int, 3}]}, {string, "xyz"}]})). +%% Dict encoding tests +test_enc_dict() -> + Dict = dict:from_list([{"age", {int, 25}}, {"eyes", {string, "blue"}}]), + ?match("d3:agei25e4:eyes4:bluee", bencode:bencode({dict, Dict})). + %% Integer decoding tests test_dec_int1() -> -- cgit v1.2.3