summaryrefslogtreecommitdiff
path: root/test/ProtocolDetectorTest.cc
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2009-12-05 11:35:18 +0000
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2009-12-05 11:35:18 +0000
commit9a6a73dd9641f0967f58f3bd2cdee29a4cec3d65 (patch)
tree9e1e71509b530de3b2228b2106be5a4c8efad35f /test/ProtocolDetectorTest.cc
parent66e864daf2e71172a4d3cfb9b58b30081337a656 (diff)
2009-12-05 Tatsuhiro Tsujikawa <t-tujikawa@users.sourceforge.net>
Fixed compile error if ENABLE_BITTORRENT is undefined. * src/DefaultPieceStorage.cc * src/DefaultPieceStorage.h * src/PieceStorage.h * src/UnknownLengthPieceStorage.cc * src/UnknownLengthPieceStorage.h * test/MockPieceStorage.h * test/ProtocolDetectorTest.cc * test/XmlRpcMethodTest.cc
Diffstat (limited to 'test/ProtocolDetectorTest.cc')
-rw-r--r--test/ProtocolDetectorTest.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/test/ProtocolDetectorTest.cc b/test/ProtocolDetectorTest.cc
index 0acdb1dc..731b1db3 100644
--- a/test/ProtocolDetectorTest.cc
+++ b/test/ProtocolDetectorTest.cc
@@ -1,8 +1,9 @@
#include "ProtocolDetector.h"
+
+#include <cppunit/extensions/HelperMacros.h>
+
#include "Exception.h"
#include "util.h"
-#include <iostream>
-#include <cppunit/extensions/HelperMacros.h>
namespace aria2 {
@@ -47,10 +48,16 @@ void ProtocolDetectorTest::testGuessTorrentFile()
void ProtocolDetectorTest::testGuessTorrentMagnet()
{
ProtocolDetector detector;
+#ifdef ENABLE_BITTORRENT
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"));
+#endif // !ENABLE_BITTORRENT
}
void ProtocolDetectorTest::testGuessMetalinkFile()