From 2dd592f0836184e3f275e8ff3248639f08a3f647 Mon Sep 17 00:00:00 2001 From: Xisco Fauli Date: Thu, 3 Nov 2022 11:42:17 +0100 Subject: UnoApiXmlTest: add new wrapper for XmlTestTools tests Change-Id: I767f464ec666330a2e8e832b6d6f5736a6bef54d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142228 Tested-by: Jenkins Reviewed-by: Xisco Fauli --- test/Library_subsequenttest.mk | 2 ++ test/source/unoapixml_test.cxx | 36 ++++++++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 test/source/unoapixml_test.cxx (limited to 'test') diff --git a/test/Library_subsequenttest.mk b/test/Library_subsequenttest.mk index 1476d00997aa..98eb17a5a557 100644 --- a/test/Library_subsequenttest.mk +++ b/test/Library_subsequenttest.mk @@ -38,10 +38,12 @@ $(eval $(call gb_Library_use_libraries,subsequenttest,\ $(eval $(call gb_Library_use_externals,subsequenttest,\ boost_headers \ cppunit \ + libxml2 \ )) $(eval $(call gb_Library_add_exception_objects,subsequenttest,\ test/source/unoapi_test \ + test/source/unoapixml_test \ test/source/a11y/AccessibilityTools \ test/source/a11y/accessibletestbase \ test/source/a11y/swaccessibletestbase \ diff --git a/test/source/unoapixml_test.cxx b/test/source/unoapixml_test.cxx new file mode 100644 index 000000000000..b2b3848ab937 --- /dev/null +++ b/test/source/unoapixml_test.cxx @@ -0,0 +1,36 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include + +#include +#include +#include +#include + +#include +#include +#include + +using namespace css; +using namespace css::uno; + +UnoApiXmlTest::UnoApiXmlTest(OUString path) + : UnoApiTest(path) +{ +} + +xmlDocUniquePtr UnoApiXmlTest::parseExport(OUString const& url, OUString const& rStreamName) +{ + std::unique_ptr const pStream(parseExportStream(url, rStreamName)); + xmlDocUniquePtr pXmlDoc = parseXmlStream(pStream.get()); + return pXmlDoc; +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit