diff options
Diffstat (limited to 'src/utests')
| -rw-r--r-- | src/utests/CMakeLists.txt | 18 | ||||
| -rw-r--r-- | src/utests/main.cpp | 2 | ||||
| -rw-r--r-- | src/utests/upnpparseresponsetest.cpp | 2 |
3 files changed, 21 insertions, 1 deletions
diff --git a/src/utests/CMakeLists.txt b/src/utests/CMakeLists.txt new file mode 100644 index 0000000..7eebbbe --- /dev/null +++ b/src/utests/CMakeLists.txt @@ -0,0 +1,18 @@ +include_directories( + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${CMAKE_SOURCE_DIR}/src + ${CMAKE_SOURCE_DIR}/src/libktorrent +) + + +##### ktorrent (executable) + +tde_add_check_executable( ktutester AUTOMOC + SOURCES + unittest.cpp testrunner.cpp main.cpp upnpparsedescriptiontest.cpp upnpparseresponsetest.cpp + dhtmsgparsetest.cpp biginttest.cpp rc4test.cpp difflehellmantest.cpp + LINK + ktupnp-static + ktorrent-shared tdecore-shared tdeui-shared tdeio-shared DCOP-shared +) diff --git a/src/utests/main.cpp b/src/utests/main.cpp index 7618cac..f9feb89 100644 --- a/src/utests/main.cpp +++ b/src/utests/main.cpp @@ -28,6 +28,7 @@ #include "biginttest.h" #include "rc4test.h" #include "difflehellmantest.h" +#include <tqfile.h> using namespace kt; using namespace bt; @@ -38,6 +39,7 @@ using namespace utest; int main(int argc,char** argv) { Globals::instance().setDebugMode(true); + TQFile::remove("ktutester.log"); Globals::instance().initLog("ktutester.log"); TestRunner tr; tr.addTest(new UPnPParseDescriptionTest()); diff --git a/src/utests/upnpparseresponsetest.cpp b/src/utests/upnpparseresponsetest.cpp index 97102cf..a096b59 100644 --- a/src/utests/upnpparseresponsetest.cpp +++ b/src/utests/upnpparseresponsetest.cpp @@ -38,7 +38,7 @@ namespace utest bool UPnPParseResponseTest::doTest() { - static const char* test_ps = "M-SEARCH * HTTP/1.1\r\n" + static const char* test_ps = "HTTP/1.1\r\n" "HOST: 239.255.255.250:1900\r\n" "ST:urn:schemas-upnp-org:device:InternetGatewayDevice:1\r\n" "MAN:\"ssdp:discover\"\r\n" |
