diff --git a/Builds/VisualStudio2012/BeastConfig.h b/Builds/VisualStudio2012/BeastConfig.h index ebf0d9a7b..0a19d0402 100644 --- a/Builds/VisualStudio2012/BeastConfig.h +++ b/Builds/VisualStudio2012/BeastConfig.h @@ -120,6 +120,4 @@ //#define BEAST_BIND_USES_TR1 1 //#define BEAST_BIND_USES_BOOST 1 -#define BEAST_UNIT_TESTS 1 - #endif diff --git a/modules/beast_core/containers/beast_AbstractFifo.cpp b/modules/beast_core/containers/beast_AbstractFifo.cpp index 0e3dd1236..004a8b94e 100644 --- a/modules/beast_core/containers/beast_AbstractFifo.cpp +++ b/modules/beast_core/containers/beast_AbstractFifo.cpp @@ -224,6 +224,4 @@ public: } }; -#if BEAST_UNIT_TESTS static AbstractFifoTests abstractFifoTests; -#endif diff --git a/modules/beast_core/diagnostic/beast_UnitTest.cpp b/modules/beast_core/diagnostic/beast_UnitTest.cpp index 6cc4ebfae..056d5fb24 100644 --- a/modules/beast_core/diagnostic/beast_UnitTest.cpp +++ b/modules/beast_core/diagnostic/beast_UnitTest.cpp @@ -182,9 +182,9 @@ void UnitTests::beginNewTest (UnitTest* const test, const String& subCategory) r->passes = 0; r->failures = 0; - logMessage ("Test: " + r->unitTestName + "/" + subCategory + "..."); + logMessage ("Test '" + r->unitTestName + "': " + subCategory); - resultsUpdated(); + resultsUpdated (); } void UnitTests::endTest() @@ -241,8 +241,8 @@ void UnitTests::addFail (const String& failureMessage) r->failures++; - String message ("!!! Test "); - message << (r->failures + r->passes) << " failed"; + String message ("Failure, #"); + message << (r->failures + r->passes); if (failureMessage.isNotEmpty()) message << ": " << failureMessage; diff --git a/modules/beast_core/files/beast_File.cpp b/modules/beast_core/files/beast_File.cpp index 7ef709e32..f3a4f8713 100644 --- a/modules/beast_core/files/beast_File.cpp +++ b/modules/beast_core/files/beast_File.cpp @@ -1106,7 +1106,5 @@ public: } }; -#if BEAST_UNIT_TESTS static FileTests fileTests; -#endif diff --git a/modules/beast_core/files/beast_RandomAccessFile.cpp b/modules/beast_core/files/beast_RandomAccessFile.cpp index e9588a738..ee6df2b5a 100644 --- a/modules/beast_core/files/beast_RandomAccessFile.cpp +++ b/modules/beast_core/files/beast_RandomAccessFile.cpp @@ -199,16 +199,18 @@ public: HeapBlock data; }; - void runTest () { + RandomAccessFile file; + + beginTest ("open"); + Result result = file.open (File::createTempFile ("tests"), RandomAccessFile::readWrite); expect (result.wasOk (), "Should be ok"); } private: - RandomAccessFile file; }; static RandomAccessFileTests randomAccessFileTests; diff --git a/modules/beast_core/json/beast_JSON.cpp b/modules/beast_core/json/beast_JSON.cpp index d712896a1..518c5d45a 100644 --- a/modules/beast_core/json/beast_JSON.cpp +++ b/modules/beast_core/json/beast_JSON.cpp @@ -639,6 +639,4 @@ public: } }; -#if BEAST_UNIT_TESTS static JSONTests jsonTests; -#endif diff --git a/modules/beast_core/maths/beast_Random.cpp b/modules/beast_core/maths/beast_Random.cpp index ce3199699..90628f605 100644 --- a/modules/beast_core/maths/beast_Random.cpp +++ b/modules/beast_core/maths/beast_Random.cpp @@ -165,6 +165,4 @@ public: } }; -#if BEAST_UNIT_TESTS static RandomTests randomTests; -#endif diff --git a/modules/beast_core/streams/beast_MemoryInputStream.cpp b/modules/beast_core/streams/beast_MemoryInputStream.cpp index 59c607856..eef9e80fd 100644 --- a/modules/beast_core/streams/beast_MemoryInputStream.cpp +++ b/modules/beast_core/streams/beast_MemoryInputStream.cpp @@ -148,6 +148,4 @@ public: } }; -#if BEAST_UNIT_TESTS static MemoryStreamTests memoryStreamTests; -#endif diff --git a/modules/beast_core/text/beast_String.cpp b/modules/beast_core/text/beast_String.cpp index d8771bb31..dff203b2e 100644 --- a/modules/beast_core/text/beast_String.cpp +++ b/modules/beast_core/text/beast_String.cpp @@ -2402,6 +2402,4 @@ public: } }; -#if BEAST_UNIT_TESTS static StringTests stringTests; -#endif diff --git a/modules/beast_core/text/beast_TextDiff.cpp b/modules/beast_core/text/beast_TextDiff.cpp index 7a1f2a894..858968332 100644 --- a/modules/beast_core/text/beast_TextDiff.cpp +++ b/modules/beast_core/text/beast_TextDiff.cpp @@ -229,6 +229,4 @@ public: } }; -#if BEAST_UNIT_TESTS static DiffTests diffTests; -#endif diff --git a/modules/beast_core/threads/beast_ChildProcess.cpp b/modules/beast_core/threads/beast_ChildProcess.cpp index 4e809a719..da7a9accd 100644 --- a/modules/beast_core/threads/beast_ChildProcess.cpp +++ b/modules/beast_core/threads/beast_ChildProcess.cpp @@ -82,6 +82,4 @@ public: } }; -#if BEAST_UNIT_TESTS static ChildProcessTests childProcessTests; -#endif diff --git a/modules/beast_core/threads/beast_Thread.cpp b/modules/beast_core/threads/beast_Thread.cpp index 999f35d44..1ffb1b9c6 100644 --- a/modules/beast_core/threads/beast_Thread.cpp +++ b/modules/beast_core/threads/beast_Thread.cpp @@ -350,6 +350,4 @@ public: }; }; -#if BEAST_UNIT_TESTS static AtomicTests atomicTests; -#endif diff --git a/modules/beast_core/zip/beast_GZIPCompressorOutputStream.cpp b/modules/beast_core/zip/beast_GZIPCompressorOutputStream.cpp index d8febfa5a..da68fe994 100644 --- a/modules/beast_core/zip/beast_GZIPCompressorOutputStream.cpp +++ b/modules/beast_core/zip/beast_GZIPCompressorOutputStream.cpp @@ -205,6 +205,4 @@ public: } }; -#if BEAST_UNIT_TESTS static GZIPTests gzipTests; -#endif diff --git a/modules/beast_crypto/math/beast_UnsignedInteger.cpp b/modules/beast_crypto/math/beast_UnsignedInteger.cpp index 916e6bad0..a0532d38f 100644 --- a/modules/beast_crypto/math/beast_UnsignedInteger.cpp +++ b/modules/beast_crypto/math/beast_UnsignedInteger.cpp @@ -29,7 +29,7 @@ public: { String s; - s << "UnsignedInteger <" << String(Bytes) << ">"; + s << "Bytes=" << String(Bytes); beginTest (s); @@ -82,6 +82,4 @@ public: private: }; -#if BEAST_UNIT_TESTS static UnsignedIntegerTests unsignedIntegerTests; -#endif