diff options
Diffstat (limited to 'indra/llcorehttp')
-rw-r--r-- | indra/llcorehttp/CMakeLists.txt | 2 | ||||
-rw-r--r-- | indra/llcorehttp/tests/llcorehttp_test.cpp | 6 | ||||
-rw-r--r-- | indra/llcorehttp/tests/test_allocator.cpp | 10 |
3 files changed, 12 insertions, 6 deletions
diff --git a/indra/llcorehttp/CMakeLists.txt b/indra/llcorehttp/CMakeLists.txt index a950e9180c..99b60a5995 100644 --- a/indra/llcorehttp/CMakeLists.txt +++ b/indra/llcorehttp/CMakeLists.txt @@ -78,7 +78,6 @@ target_link_libraries( # tests if (LL_TESTS) -#if (LL_TESTS AND 0) SET(llcorehttp_TEST_SOURCE_FILES tests/test_allocator.cpp ) @@ -117,5 +116,4 @@ if (LL_TESTS) ) endif (LL_TESTS) -#endif (LL_TESTS AND 0) diff --git a/indra/llcorehttp/tests/llcorehttp_test.cpp b/indra/llcorehttp/tests/llcorehttp_test.cpp index ad596d61cc..92f16be8fd 100644 --- a/indra/llcorehttp/tests/llcorehttp_test.cpp +++ b/indra/llcorehttp/tests/llcorehttp_test.cpp @@ -27,8 +27,10 @@ #include <iostream> -#include <tut/tut.hpp> -#include <tut/tut_reporter.hpp> +// These are not the right way in viewer for some reason: +// #include <tut/tut.hpp> +// #include <tut/tut_reporter.hpp> +#include "../test/lltut.h" #include <curl/curl.h> diff --git a/indra/llcorehttp/tests/test_allocator.cpp b/indra/llcorehttp/tests/test_allocator.cpp index 926de0a208..ea12dc58eb 100644 --- a/indra/llcorehttp/tests/test_allocator.cpp +++ b/indra/llcorehttp/tests/test_allocator.cpp @@ -166,13 +166,19 @@ void * operator new[](std::size_t size) THROW_BAD_ALLOC() void operator delete(void * p) THROW_NOTHING() { - FreeMem( p ); + if (p) + { + FreeMem( p ); + } } void operator delete[](void * p) THROW_NOTHING() { - FreeMem( p ); + if (p) + { + FreeMem( p ); + } } |