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
|
@ -7,7 +7,7 @@
|
|||
|
||||
namespace aria2 {
|
||||
|
||||
class ProtocolDetectorTest:public CppUnit::TestFixture {
|
||||
class ProtocolDetectorTest : public CppUnit::TestFixture {
|
||||
|
||||
CPPUNIT_TEST_SUITE(ProtocolDetectorTest);
|
||||
CPPUNIT_TEST(testIsStreamProtocol);
|
||||
|
@ -15,6 +15,7 @@ class ProtocolDetectorTest:public CppUnit::TestFixture {
|
|||
CPPUNIT_TEST(testGuessTorrentMagnet);
|
||||
CPPUNIT_TEST(testGuessMetalinkFile);
|
||||
CPPUNIT_TEST_SUITE_END();
|
||||
|
||||
public:
|
||||
void setUp() {}
|
||||
|
||||
|
@ -26,7 +27,6 @@ public:
|
|||
void testGuessMetalinkFile();
|
||||
};
|
||||
|
||||
|
||||
CPPUNIT_TEST_SUITE_REGISTRATION(ProtocolDetectorTest);
|
||||
|
||||
void ProtocolDetectorTest::testIsStreamProtocol()
|
||||
|
@ -40,32 +40,30 @@ void ProtocolDetectorTest::testIsStreamProtocol()
|
|||
void ProtocolDetectorTest::testGuessTorrentFile()
|
||||
{
|
||||
ProtocolDetector detector;
|
||||
CPPUNIT_ASSERT(detector.guessTorrentFile(A2_TEST_DIR"/test.torrent"));
|
||||
CPPUNIT_ASSERT(detector.guessTorrentFile(A2_TEST_DIR "/test.torrent"));
|
||||
CPPUNIT_ASSERT(!detector.guessTorrentFile("http://localhost/test.torrent"));
|
||||
CPPUNIT_ASSERT(!detector.guessTorrentFile(A2_TEST_DIR"/test.xml"));
|
||||
CPPUNIT_ASSERT(!detector.guessTorrentFile(A2_TEST_DIR "/test.xml"));
|
||||
}
|
||||
|
||||
void ProtocolDetectorTest::testGuessTorrentMagnet()
|
||||
{
|
||||
ProtocolDetector detector;
|
||||
#ifdef ENABLE_BITTORRENT
|
||||
CPPUNIT_ASSERT
|
||||
(detector.guessTorrentMagnet
|
||||
("magnet:?xt=urn:btih:248d0a1cd08284299de78d5c1ed359bb46717d8c"));
|
||||
CPPUNIT_ASSERT(detector.guessTorrentMagnet(
|
||||
"magnet:?xt=urn:btih:248d0a1cd08284299de78d5c1ed359bb46717d8c"));
|
||||
CPPUNIT_ASSERT(!detector.guessTorrentMagnet("magnet:?"));
|
||||
#else // !ENABLE_BITTORRENT
|
||||
CPPUNIT_ASSERT
|
||||
(!detector.guessTorrentMagnet
|
||||
("magnet:?xt=urn:btih:248d0a1cd08284299de78d5c1ed359bb46717d8c"));
|
||||
#else // !ENABLE_BITTORRENT
|
||||
CPPUNIT_ASSERT(!detector.guessTorrentMagnet(
|
||||
"magnet:?xt=urn:btih:248d0a1cd08284299de78d5c1ed359bb46717d8c"));
|
||||
#endif // !ENABLE_BITTORRENT
|
||||
}
|
||||
|
||||
void ProtocolDetectorTest::testGuessMetalinkFile()
|
||||
{
|
||||
ProtocolDetector detector;
|
||||
CPPUNIT_ASSERT(detector.guessMetalinkFile(A2_TEST_DIR"/test.xml"));
|
||||
CPPUNIT_ASSERT(detector.guessMetalinkFile(A2_TEST_DIR "/test.xml"));
|
||||
CPPUNIT_ASSERT(!detector.guessMetalinkFile("http://localhost/test.xml"));
|
||||
CPPUNIT_ASSERT(!detector.guessMetalinkFile(A2_TEST_DIR"/test.torrent"));
|
||||
CPPUNIT_ASSERT(!detector.guessMetalinkFile(A2_TEST_DIR "/test.torrent"));
|
||||
}
|
||||
|
||||
} // namespace aria2
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue