mirror of
https://github.com/aria2/aria2.git
synced 2025-04-05 05:27:38 +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
|
@ -8,37 +8,34 @@
|
|||
|
||||
namespace aria2 {
|
||||
|
||||
class MessageDigestHelperTest:public CppUnit::TestFixture {
|
||||
class MessageDigestHelperTest : public CppUnit::TestFixture {
|
||||
|
||||
CPPUNIT_TEST_SUITE(MessageDigestHelperTest);
|
||||
CPPUNIT_TEST(testDigestDiskWriter);
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
private:
|
||||
|
||||
private:
|
||||
public:
|
||||
void setUp() {
|
||||
}
|
||||
void setUp() {}
|
||||
|
||||
void testDigestDiskWriter();
|
||||
};
|
||||
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION(MessageDigestHelperTest);
|
||||
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION( MessageDigestHelperTest );
|
||||
|
||||
void MessageDigestHelperTest::testDigestDiskWriter() {
|
||||
auto diskio = std::make_shared<DefaultDiskWriter>
|
||||
(A2_TEST_DIR"/4096chunk.txt");
|
||||
void MessageDigestHelperTest::testDigestDiskWriter()
|
||||
{
|
||||
auto diskio =
|
||||
std::make_shared<DefaultDiskWriter>(A2_TEST_DIR "/4096chunk.txt");
|
||||
diskio->enableReadOnly();
|
||||
diskio->openExistingFile();
|
||||
CPPUNIT_ASSERT_EQUAL(std::string("608cabc0f2fa18c260cafd974516865c772363d5"),
|
||||
util::toHex(message_digest::digest
|
||||
(MessageDigest::sha1().get(),
|
||||
diskio, 0, 4_k)));
|
||||
util::toHex(message_digest::digest(
|
||||
MessageDigest::sha1().get(), diskio, 0, 4_k)));
|
||||
|
||||
CPPUNIT_ASSERT_EQUAL(std::string("7a4a9ae537ebbbb826b1060e704490ad0f365ead"),
|
||||
util::toHex(message_digest::digest
|
||||
(MessageDigest::sha1().get(),
|
||||
diskio, 5, 100)));
|
||||
util::toHex(message_digest::digest(
|
||||
MessageDigest::sha1().get(), diskio, 5, 100)));
|
||||
}
|
||||
|
||||
} // namespace aria2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue