Kaydet (Commit) 4355a784 authored tarafından Caolán McNamara's avatar Caolán McNamara

extend CppUnit::Protector for context-less protection

üst 5a85cf50
......@@ -32,14 +32,20 @@
#include "sal/types.h"
namespace CppUnit { class Protector; }
namespace cppunittester {
// The type of CppUnit::Protector factory functions that can be plugged into
// cppunittester:
extern "C" typedef CppUnit::Protector * SAL_CALL ProtectorFactory();
#include <cppunit/Protector.h>
namespace cppunittester
{
class LibreOfficeProtector : public CppUnit::Protector
{
public:
virtual bool protect(CppUnit::Functor const & functor) = 0;
using CppUnit::Protector::protect;
};
// The type of CppUnit::Protector factory functions that can be plugged into
// cppunittester:
extern "C" typedef LibreOfficeProtector * SAL_CALL ProtectorFactory();
}
#endif
......@@ -35,6 +35,18 @@
#include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h>
#include <cppunit/plugin/TestPlugIn.h>
#include <cppunit/Protector.h>
namespace cppunittester
{
class LibreOfficeProtecter : public CppUnit::Protector
{
public:
virtual bool protect(CppUnit::Functor const & functor) = 0;
using CppUnit::Protector::protect;
};
}
#undef CPPUNIT_PLUGIN_EXPORT
#define CPPUNIT_PLUGIN_EXPORT extern "C" SAL_DLLPUBLIC_EXPORT
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment