mirror of
https://github.com/aria2/aria2.git
synced 2025-04-05 13:37:40 +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
|
@ -9,7 +9,7 @@
|
|||
|
||||
namespace aria2 {
|
||||
|
||||
class TimeTest:public CppUnit::TestFixture {
|
||||
class TimeTest : public CppUnit::TestFixture {
|
||||
|
||||
CPPUNIT_TEST_SUITE(TimeTest);
|
||||
CPPUNIT_TEST(testParseRFC1123);
|
||||
|
@ -20,6 +20,7 @@ class TimeTest:public CppUnit::TestFixture {
|
|||
CPPUNIT_TEST(testOperatorLess);
|
||||
CPPUNIT_TEST(testToHTTPDate);
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
|
||||
public:
|
||||
void setUp() {}
|
||||
|
||||
|
@ -35,7 +36,6 @@ public:
|
|||
void testToHTTPDate();
|
||||
};
|
||||
|
||||
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION(TimeTest);
|
||||
|
||||
void TimeTest::testParseRFC1123()
|
||||
|
@ -70,20 +70,19 @@ void TimeTest::testParseAsctime()
|
|||
|
||||
void TimeTest::testParseHTTPDate()
|
||||
{
|
||||
CPPUNIT_ASSERT_EQUAL((time_t)1220714793,
|
||||
Time::parseHTTPDate
|
||||
("Sat, 06 Sep 2008 15:26:33 GMT").getTimeFromEpoch());
|
||||
CPPUNIT_ASSERT_EQUAL((time_t)1220714793,
|
||||
Time::parseHTTPDate
|
||||
("Sat, 06-Sep-2008 15:26:33 GMT").getTimeFromEpoch());
|
||||
CPPUNIT_ASSERT_EQUAL((time_t)1220714793,
|
||||
Time::parseHTTPDate
|
||||
("Sat, 06-Sep-08 15:26:33 GMT").getTimeFromEpoch());
|
||||
CPPUNIT_ASSERT_EQUAL((time_t)1220714793,
|
||||
Time::parseHTTPDate
|
||||
("Sun Sep 6 15:26:33 2008").getTimeFromEpoch());
|
||||
CPPUNIT_ASSERT(Time::parseHTTPDate
|
||||
("Sat, 2008-09-06 15:26:33 GMT").bad());
|
||||
CPPUNIT_ASSERT_EQUAL(
|
||||
(time_t)1220714793,
|
||||
Time::parseHTTPDate("Sat, 06 Sep 2008 15:26:33 GMT").getTimeFromEpoch());
|
||||
CPPUNIT_ASSERT_EQUAL(
|
||||
(time_t)1220714793,
|
||||
Time::parseHTTPDate("Sat, 06-Sep-2008 15:26:33 GMT").getTimeFromEpoch());
|
||||
CPPUNIT_ASSERT_EQUAL(
|
||||
(time_t)1220714793,
|
||||
Time::parseHTTPDate("Sat, 06-Sep-08 15:26:33 GMT").getTimeFromEpoch());
|
||||
CPPUNIT_ASSERT_EQUAL(
|
||||
(time_t)1220714793,
|
||||
Time::parseHTTPDate("Sun Sep 6 15:26:33 2008").getTimeFromEpoch());
|
||||
CPPUNIT_ASSERT(Time::parseHTTPDate("Sat, 2008-09-06 15:26:33 GMT").bad());
|
||||
}
|
||||
|
||||
void TimeTest::testOperatorLess()
|
||||
|
@ -95,8 +94,8 @@ void TimeTest::testOperatorLess()
|
|||
|
||||
void TimeTest::testToHTTPDate()
|
||||
{
|
||||
// This test disabled for MinGW32, because the garbage will be
|
||||
// displayed and it hides real errors.
|
||||
// This test disabled for MinGW32, because the garbage will be
|
||||
// displayed and it hides real errors.
|
||||
#ifndef __MINGW32__
|
||||
Time t(1220714793);
|
||||
CPPUNIT_ASSERT_EQUAL(std::string("Sat, 06 Sep 2008 15:26:33 GMT"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue