summaryrefslogtreecommitdiff
path: root/test/BtInterestedMessageTest.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2015-06-21 18:04:30 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2015-06-21 19:29:54 +0900
commit318c804504e32b7a0bbdbb35336d2e918000d80a (patch)
treefad396aee04c44a29ee79b33e1675db2275146c0 /test/BtInterestedMessageTest.cc
parent8ba9b0474747185708a25943fb6d2f97b3d9b17f (diff)
Use user-defined literal for k, m, and g (powers of 1024)
Diffstat (limited to 'test/BtInterestedMessageTest.cc')
-rw-r--r--test/BtInterestedMessageTest.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/BtInterestedMessageTest.cc b/test/BtInterestedMessageTest.cc
index 1dc5e5a7..2731414a 100644
--- a/test/BtInterestedMessageTest.cc
+++ b/test/BtInterestedMessageTest.cc
@@ -68,7 +68,7 @@ void BtInterestedMessageTest::testCreateMessage() {
void BtInterestedMessageTest::testDoReceivedAction() {
BtInterestedMessage msg;
std::shared_ptr<Peer> peer(new Peer("host", 6969));
- peer->allocateSessionResource(1024, 1024*1024);
+ peer->allocateSessionResource(1_k, 1_m);
msg.setPeer(peer);
auto peerStorage = make_unique<MockPeerStorage>();
@@ -88,7 +88,7 @@ void BtInterestedMessageTest::testDoReceivedAction() {
void BtInterestedMessageTest::testOnSendComplete() {
BtInterestedMessage msg;
std::shared_ptr<Peer> peer(new Peer("host", 6969));
- peer->allocateSessionResource(1024, 1024*1024);
+ peer->allocateSessionResource(1_k, 1_m);
msg.setPeer(peer);
CPPUNIT_ASSERT(!peer->amInterested());
std::shared_ptr<ProgressUpdate> pu(msg.getProgressUpdate());