mirror of
https://github.com/aria2/aria2.git
synced 2025-04-06 05:57:36 +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
|
@ -384,10 +384,10 @@ void HttpResponseTest::testValidateResponse_good_range()
|
|||
httpResponse.setHttpHeader(make_unique<HttpHeader>());
|
||||
|
||||
auto httpRequest = make_unique<HttpRequest>();
|
||||
auto p = std::make_shared<Piece>(1, 1024*1024);
|
||||
auto segment = std::make_shared<PiecedSegment>(1024*1024, p);
|
||||
auto p = std::make_shared<Piece>(1, 1_m);
|
||||
auto segment = std::make_shared<PiecedSegment>(1_m, p);
|
||||
httpRequest->setSegment(segment);
|
||||
auto fileEntry = std::make_shared<FileEntry>("file", 1024*1024*10, 0);
|
||||
auto fileEntry = std::make_shared<FileEntry>("file", 10_m, 0);
|
||||
httpRequest->setFileEntry(fileEntry);
|
||||
auto request = std::make_shared<Request>();
|
||||
request->setUri("http://localhost/archives/aria2-1.0.0.tar.bz2");
|
||||
|
@ -412,10 +412,10 @@ void HttpResponseTest::testValidateResponse_bad_range()
|
|||
httpResponse.setHttpHeader(make_unique<HttpHeader>());
|
||||
|
||||
auto httpRequest = make_unique<HttpRequest>();
|
||||
auto p = std::make_shared<Piece>(1, 1024*1024);
|
||||
auto segment = std::make_shared<PiecedSegment>(1024*1024, p);
|
||||
auto p = std::make_shared<Piece>(1, 1_m);
|
||||
auto segment = std::make_shared<PiecedSegment>(1_m, p);
|
||||
httpRequest->setSegment(segment);
|
||||
auto fileEntry = std::make_shared<FileEntry>("file", 1024*1024*10, 0);
|
||||
auto fileEntry = std::make_shared<FileEntry>("file", 10_m, 0);
|
||||
httpRequest->setFileEntry(fileEntry);
|
||||
auto request = std::make_shared<Request>();
|
||||
request->setUri("http://localhost/archives/aria2-1.0.0.tar.bz2");
|
||||
|
@ -438,10 +438,10 @@ void HttpResponseTest::testValidateResponse_chunked()
|
|||
httpResponse.setHttpHeader(make_unique<HttpHeader>());
|
||||
|
||||
auto httpRequest = make_unique<HttpRequest>();
|
||||
auto p = std::make_shared<Piece>(1, 1024*1024);
|
||||
auto segment = std::make_shared<PiecedSegment>(1024*1024, p);
|
||||
auto p = std::make_shared<Piece>(1, 1_m);
|
||||
auto segment = std::make_shared<PiecedSegment>(1_m, p);
|
||||
httpRequest->setSegment(segment);
|
||||
auto fileEntry = std::make_shared<FileEntry>("file", 1024*1024*10, 0);
|
||||
auto fileEntry = std::make_shared<FileEntry>("file", 10_m, 0);
|
||||
httpRequest->setFileEntry(fileEntry);
|
||||
auto request = std::make_shared<Request>();
|
||||
request->setUri("http://localhost/archives/aria2-1.0.0.tar.bz2");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue