diff options
author | Tor Lillqvist <tml@iki.fi> | 2011-07-11 00:40:49 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2011-07-11 00:44:40 +0300 |
commit | fd2e631d587fb9dc9260cbcb6ca5f40512cd15a7 (patch) | |
tree | eb16041a2bf03f3ad21e058a43e29d7877e8a2a9 /sal/qa | |
parent | e4518218c1efe8bde601710e69a4bf6a7b7cda38 (diff) |
Make iOS sal unit testing actually work
We must call the initialize() methods of the plugins which for iOS
aren't actually plugins in the sense of being dynamically loaded, but
still. Unfortunately this means we have to list the plugin interface
getter functions explicitly in the sal_cppunittester_all source.
Diffstat (limited to 'sal/qa')
-rw-r--r-- | sal/qa/static/makefile.mk | 1 | ||||
-rw-r--r-- | sal/qa/static/sal_cppunittester_all.cxx | 27 |
2 files changed, 25 insertions, 3 deletions
diff --git a/sal/qa/static/makefile.mk b/sal/qa/static/makefile.mk index c76cf40bee8a..0762e73378ce 100644 --- a/sal/qa/static/makefile.mk +++ b/sal/qa/static/makefile.mk @@ -54,7 +54,6 @@ APP1LIBS += \ $(SLB)/qa_ostringbuffer.lib \ $(SLB)/qa_osl_condition.lib \ $(SLB)/qa_osl_file.lib \ - $(SLB)/qa_osl_process.lib \ $(SLB)/qa_osl_security.lib APP1STDLIBS = $(CPPUNITLIB) $(SALLIB) diff --git a/sal/qa/static/sal_cppunittester_all.cxx b/sal/qa/static/sal_cppunittester_all.cxx index b5ead718d733..b5fb89b49bf9 100644 --- a/sal/qa/static/sal_cppunittester_all.cxx +++ b/sal/qa/static/sal_cppunittester_all.cxx @@ -49,6 +49,8 @@ #include "cppunit/TestResult.h" #include "cppunit/TestResultCollector.h" #include "cppunit/TestRunner.h" +#include "cppunit/plugin/TestPlugIn.h" +#include "cppunit/plugin/PlugInParameters.h" #include "cppunit/extensions/TestFactoryRegistry.h" #include "cppunit/portability/Stream.h" @@ -111,12 +113,33 @@ public: }; } +extern "C" CppUnitTestPlugIn *cppunitTest_qa_ByteSequence(void), + *cppunitTest_qa_ostringbuffer(void), + *cppunitTest_qa_osl_condition(void), + *cppunitTest_qa_osl_File(void), + *cppunitTest_tcwf(void), + *cppunitTest_osl_old_test_file(void), + *cppunitTest_qa_osl_security(void); + SAL_IMPLEMENT_MAIN() { + TestPlugInSignature plugs[] = { + cppunitTest_qa_ByteSequence, + cppunitTest_qa_ostringbuffer, + cppunitTest_qa_osl_condition, + cppunitTest_qa_osl_File, + cppunitTest_tcwf, + cppunitTest_osl_old_test_file, + cppunitTest_qa_osl_security, + NULL + }; CppUnit::TestResult result; - cppunittester::LibreOfficeProtector *throw_protector = 0; std::string args; - sal_uInt32 index = 0; bool ok = false; + for (TestPlugInSignature *plug = plugs; *plug != NULL; plug++) { + CppUnitTestPlugIn *iface; + iface = (*plug)(); + iface->initialize(&CppUnit::TestFactoryRegistry::getRegistry(), CppUnit::PlugInParameters()); + } ProtectedFixtureFunctor tests(args, result); ok = tests.run(); |