From 39a77a855ebef725564412adcb1b4e052dbad93e Mon Sep 17 00:00:00 2001 From: KimLS Date: Sat, 23 Feb 2013 00:37:12 -0800 Subject: [PATCH] Stupid design choice in cppunit fixt -.- --- tests/cppunit/cpptest-suite.h | 2 +- tests/cppunit/suite.cpp | 4 ++-- tests/main.cpp | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/cppunit/cpptest-suite.h b/tests/cppunit/cpptest-suite.h index 6e9aefc0a..b42a19fa1 100644 --- a/tests/cppunit/cpptest-suite.h +++ b/tests/cppunit/cpptest-suite.h @@ -55,7 +55,7 @@ namespace Test Suite(); virtual ~Suite(); - void add(std::auto_ptr suite); + void add(Suite* suite); bool run(Output& output, bool cont_after_fail = true); diff --git a/tests/cppunit/suite.cpp b/tests/cppunit/suite.cpp index 954b4a2c4..f531e6c8f 100644 --- a/tests/cppunit/suite.cpp +++ b/tests/cppunit/suite.cpp @@ -117,9 +117,9 @@ namespace Test /// \param suite %Test suite to add. /// void - Suite::add(auto_ptr suite) + Suite::add(Suite* suite) { - _suites.push_back(suite.release()); + _suites.push_back(suite); } /// Registers a test function. diff --git a/tests/main.cpp b/tests/main.cpp index ff7dc8095..b52dba6d8 100644 --- a/tests/main.cpp +++ b/tests/main.cpp @@ -46,10 +46,10 @@ int main() { std::ofstream outfile("test_output.txt"); std::unique_ptr output(new Test::TextOutput(Test::TextOutput::Verbose, outfile)); Test::Suite tests; - tests.add(std::auto_ptr(new MemoryMappedFileTest())); - tests.add(std::auto_ptr(new IPCMutexTest())); - tests.add(std::auto_ptr(new FixedMemoryHashTest())); - tests.add(std::auto_ptr(new FixedMemoryVariableHashTest())); + tests.add(new MemoryMappedFileTest()); + tests.add(new IPCMutexTest()); + tests.add(new FixedMemoryHashTest()); + tests.add(new FixedMemoryVariableHashTest()); tests.run(*output, true); } catch(...) { return -1;