summaryrefslogtreecommitdiff
path: root/indra/llcorehttp/tests
diff options
context:
space:
mode:
authorMonty Brandenberg <monty@lindenlab.com>2012-05-08 10:38:08 -0400
committerMonty Brandenberg <monty@lindenlab.com>2012-05-08 10:38:08 -0400
commit7caef4bc6c348a4aad4a777df0d1ea34ab13ff00 (patch)
tree884f5acbace7bb974eb636071192d1c49e95f3b2 /indra/llcorehttp/tests
parent74d59e7128bb02a4b49af99e44f437a736a3f62b (diff)
Okay, got Mac building with Boost 1.48. Unit tests needed NULL pointer
defenses in the delete functions of the allocation support. General boost library renaming again. Linux builds in TC though it shouldn't based on what Boost.cmake lookes like...
Diffstat (limited to 'indra/llcorehttp/tests')
-rw-r--r--indra/llcorehttp/tests/llcorehttp_test.cpp6
-rw-r--r--indra/llcorehttp/tests/test_allocator.cpp10
2 files changed, 12 insertions, 4 deletions
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 );
+ }
}