1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 #include <sal/types.h>
11 #include <cppunit/TestAssert.h>
12 #include <cppunit/TestFixture.h>
13 #include <cppunit/extensions/HelperMacros.h>
14 #include <cppunit/plugin/TestPlugIn.h>
16 #include <sfx2/ctrlitem.hxx>
20 class ControllerItemTest
21 : public ::CppUnit::TestFixture
26 CPPUNIT_TEST_SUITE(ControllerItemTest
);
28 CPPUNIT_TEST_SUITE_END();
33 bool bDeleted
= false;
35 class FooController
: public SfxControllerItem
{
37 FooController() : SfxControllerItem() {}
38 virtual ~FooController() override
{ bDeleted
= true; }
41 void ControllerItemTest::test()
43 FooController
*pController(new FooController());
45 // TESTME: binding, un-binding, re-binding, IsBound, SetId etc.
47 pController
->dispose();
49 CPPUNIT_ASSERT( bDeleted
);
52 CPPUNIT_TEST_SUITE_REGISTRATION(ControllerItemTest
);
56 CPPUNIT_PLUGIN_IMPLEMENT();
58 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */