mirror of
https://github.com/aria2/aria2.git
synced 2025-04-05 21:47:37 +03:00
make clang-format using clang-format-3.6
This commit is contained in:
parent
4abad2f64c
commit
b1132d6b10
1095 changed files with 30423 additions and 33770 deletions
|
@ -18,7 +18,7 @@
|
|||
|
||||
namespace aria2 {
|
||||
|
||||
class UTMetadataDataExtensionMessageTest:public CppUnit::TestFixture {
|
||||
class UTMetadataDataExtensionMessageTest : public CppUnit::TestFixture {
|
||||
|
||||
CPPUNIT_TEST_SUITE(UTMetadataDataExtensionMessageTest);
|
||||
CPPUNIT_TEST(testGetExtensionMessageID);
|
||||
|
@ -26,6 +26,7 @@ class UTMetadataDataExtensionMessageTest:public CppUnit::TestFixture {
|
|||
CPPUNIT_TEST(testToString);
|
||||
CPPUNIT_TEST(testDoReceivedAction);
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
|
||||
public:
|
||||
void testGetExtensionMessageID();
|
||||
void testGetBencodedData();
|
||||
|
@ -33,7 +34,6 @@ public:
|
|||
void testDoReceivedAction();
|
||||
};
|
||||
|
||||
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION(UTMetadataDataExtensionMessageTest);
|
||||
|
||||
void UTMetadataDataExtensionMessageTest::testGetExtensionMessageID()
|
||||
|
@ -50,9 +50,9 @@ void UTMetadataDataExtensionMessageTest::testGetBencodedData()
|
|||
msg.setIndex(1);
|
||||
msg.setTotalSize(data.size());
|
||||
msg.setData(data);
|
||||
CPPUNIT_ASSERT_EQUAL
|
||||
(std::string("d8:msg_typei1e5:piecei1e10:total_sizei16384ee")+data,
|
||||
msg.getPayload());
|
||||
CPPUNIT_ASSERT_EQUAL(
|
||||
std::string("d8:msg_typei1e5:piecei1e10:total_sizei16384ee") + data,
|
||||
msg.getPayload());
|
||||
}
|
||||
|
||||
void UTMetadataDataExtensionMessageTest::testToString()
|
||||
|
@ -79,12 +79,12 @@ void UTMetadataDataExtensionMessageTest::testDoReceivedAction()
|
|||
|
||||
std::string piece0 = std::string(METADATA_PIECE_SIZE, '0');
|
||||
std::string piece1 = std::string(METADATA_PIECE_SIZE, '1');
|
||||
std::string metadata = piece0+piece1;
|
||||
std::string metadata = piece0 + piece1;
|
||||
|
||||
unsigned char infoHash[INFO_HASH_LENGTH];
|
||||
message_digest::digest(infoHash, INFO_HASH_LENGTH,
|
||||
MessageDigest::sha1().get(),
|
||||
metadata.data(), metadata.size());
|
||||
MessageDigest::sha1().get(), metadata.data(),
|
||||
metadata.size());
|
||||
{
|
||||
auto attrs = make_unique<TorrentAttribute>();
|
||||
attrs->infoHash = std::string(&infoHash[0], &infoHash[20]);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue