From 9a6a73dd9641f0967f58f3bd2cdee29a4cec3d65 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sat, 5 Dec 2009 11:35:18 +0000 Subject: 2009-12-05 Tatsuhiro Tsujikawa 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 --- test/ProtocolDetectorTest.cc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'test/ProtocolDetectorTest.cc') 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 + #include "Exception.h" #include "util.h" -#include -#include 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() -- cgit