make clang-format using clang-format-3.6

This commit is contained in:
Tatsuhiro Tsujikawa 2015-12-27 18:39:47 +09:00
parent 4abad2f64c
commit b1132d6b10
1095 changed files with 30423 additions and 33770 deletions

View file

@ -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