mirror of
https://github.com/aria2/aria2.git
synced 2025-04-05 05:27:38 +03:00
2010-06-20 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Removed BDE and bencode
This commit is contained in:
parent
8ba97188ce
commit
cb4e25e4b4
81 changed files with 1661 additions and 2848 deletions
|
@ -5,7 +5,7 @@
|
|||
#include "DHTNode.h"
|
||||
#include "Exception.h"
|
||||
#include "util.h"
|
||||
#include "bencode.h"
|
||||
#include "bencode2.h"
|
||||
|
||||
namespace aria2 {
|
||||
|
||||
|
@ -41,15 +41,15 @@ void DHTPingReplyMessageTest::testGetBencodedMessage()
|
|||
msg.setVersion("A200");
|
||||
std::string msgbody = msg.getBencodedMessage();
|
||||
|
||||
BDE dict = BDE::dict();
|
||||
dict["t"] = transactionID;
|
||||
dict["v"] = BDE("A200");
|
||||
dict["y"] = BDE("r");
|
||||
BDE rDict = BDE::dict();
|
||||
rDict["id"] = BDE(id, DHT_ID_LENGTH);
|
||||
dict["r"] = rDict;
|
||||
Dict dict;
|
||||
dict.put("t", transactionID);
|
||||
dict.put("v", "A200");
|
||||
dict.put("y", "r");
|
||||
SharedHandle<Dict> rDict = Dict::g();
|
||||
rDict->put("id", String::g(id, DHT_ID_LENGTH));
|
||||
dict.put("r", rDict);
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(bencode::encode(dict), msgbody);
|
||||
CPPUNIT_ASSERT_EQUAL(bencode2::encode(&dict), msgbody);
|
||||
}
|
||||
|
||||
} // namespace aria2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue