summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2022-11-22 11:18:55 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2022-11-22 14:32:40 +0100
commit86545868163667d7de4c7d1ef38f16d6d47f2b45 (patch)
treec60ed6c6cf503de85dd8f60bdcea69056064662f /framework
parent9d4627322f5e2753b29cc310f1da9e433d986ae7 (diff)
CppunitTest_framework_loadenv: inherit from UnoApiTest
Change-Id: I9c997691d6b7f0c46089eec86b614bcd1a0d71a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143102 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'framework')
-rw-r--r--framework/CppunitTest_framework_loadenv.mk3
-rw-r--r--framework/qa/cppunit/loadenv.cxx22
2 files changed, 10 insertions, 15 deletions
diff --git a/framework/CppunitTest_framework_loadenv.mk b/framework/CppunitTest_framework_loadenv.mk
index b1e01e474e66..4f5f4b8e8337 100644
--- a/framework/CppunitTest_framework_loadenv.mk
+++ b/framework/CppunitTest_framework_loadenv.mk
@@ -21,8 +21,11 @@ $(eval $(call gb_CppunitTest_use_libraries,framework_loadenv, \
cppuhelper \
sal \
salhelper \
+ subsequenttest \
test \
unotest \
+ utl \
+ tl \
vcl \
))
diff --git a/framework/qa/cppunit/loadenv.cxx b/framework/qa/cppunit/loadenv.cxx
index 4842645bb75c..c9aa2789d9ca 100644
--- a/framework/qa/cppunit/loadenv.cxx
+++ b/framework/qa/cppunit/loadenv.cxx
@@ -7,8 +7,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#include <test/bootstrapfixture.hxx>
-#include <unotest/macros_test.hxx>
+#include <test/unoapi_test.hxx>
#include <com/sun/star/frame/Desktop.hpp>
#include <com/sun/star/frame/XFrame.hpp>
@@ -22,21 +21,15 @@ using namespace ::com::sun::star;
namespace
{
/// Covers framework/source/loadenv/ fixes.
-class Test : public test::BootstrapFixture, public unotest::MacrosTest
+class Test : public UnoApiTest
{
public:
- void setUp() override;
+ Test()
+ : UnoApiTest("/framework/qa/cppunit/data/")
+ {
+ }
};
-void Test::setUp()
-{
- test::BootstrapFixture::setUp();
-
- mxDesktop.set(frame::Desktop::create(mxComponentContext));
-}
-
-constexpr OUStringLiteral DATA_DIRECTORY = u"/framework/qa/cppunit/data/";
-
class DocumentOpener
{
public:
@@ -61,8 +54,7 @@ CPPUNIT_TEST_FIXTURE(Test, testDoubleLoading)
// path.
for (int i = 0; i < 2; ++i)
{
- auto pURL = std::make_unique<OUString>(m_directories.getURLFromSrc(DATA_DIRECTORY)
- + "double-loading.odt");
+ auto pURL = std::make_unique<OUString>(createFileURL(u"double-loading.odt"));
Application::PostUserEvent(LINK(nullptr, DocumentOpener, OpenDocument), pURL.release());
}
Scheduler::ProcessEventsToIdle();