mirror of
https://github.com/aria2/aria2.git
synced 2025-04-05 21:47:37 +03:00
Use user-defined literal for k, m, and g (powers of 1024)
This commit is contained in:
parent
8ba9b04747
commit
318c804504
99 changed files with 482 additions and 453 deletions
|
@ -71,7 +71,7 @@ void UTPexExtensionMessageTest::testGetBencodedData()
|
|||
{
|
||||
UTPexExtensionMessage msg(1);
|
||||
auto p1 = std::make_shared<Peer>("192.168.0.1", 6881);
|
||||
p1->allocateSessionResource(256*1024, 1024*1024);
|
||||
p1->allocateSessionResource(256_k, 1_m);
|
||||
p1->setAllBitfield();
|
||||
CPPUNIT_ASSERT(msg.addFreshPeer(p1));// added seeder, check add.f flag
|
||||
auto p2 = std::make_shared<Peer>("10.1.1.2", 9999);
|
||||
|
@ -120,7 +120,7 @@ void UTPexExtensionMessageTest::testToString()
|
|||
{
|
||||
UTPexExtensionMessage msg(1);
|
||||
std::shared_ptr<Peer> p1(new Peer("192.168.0.1", 6881));
|
||||
p1->allocateSessionResource(256*1024, 1024*1024);
|
||||
p1->allocateSessionResource(256_k, 1_m);
|
||||
p1->setAllBitfield();
|
||||
msg.addFreshPeer(p1);// added seeder, check add.f flag
|
||||
std::shared_ptr<Peer> p2(new Peer("10.1.1.2", 9999));
|
||||
|
@ -138,7 +138,7 @@ void UTPexExtensionMessageTest::testDoReceivedAction()
|
|||
{
|
||||
UTPexExtensionMessage msg(1);
|
||||
std::shared_ptr<Peer> p1(new Peer("192.168.0.1", 6881));
|
||||
p1->allocateSessionResource(256*1024, 1024*1024);
|
||||
p1->allocateSessionResource(256_k, 1_m);
|
||||
p1->setAllBitfield();
|
||||
msg.addFreshPeer(p1);// added seeder, check add.f flag
|
||||
std::shared_ptr<Peer> p2(new Peer("1002:1035:4527:3546:7854:1237:3247:3217",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue