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

add dxf import tests

Change-Id: Ied78545abb9807acfc634ca97a1ca00a163ffa19
üst d6d73b8e
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# 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/.
#
$(eval $(call gb_CppunitTest_CppunitTest,filter_dxf_test))
$(eval $(call gb_CppunitTest_use_external,filter_dxf_test,boost_headers))
$(eval $(call gb_CppunitTest_add_exception_objects,filter_dxf_test, \
filter/qa/cppunit/filters-dxf-test \
))
$(eval $(call gb_CppunitTest_use_libraries,filter_dxf_test, \
idx \
sal \
test \
tl \
unotest \
vcl \
$(gb_UWINAPI) \
))
$(eval $(call gb_CppunitTest_use_api,filter_dxf_test,\
udkapi \
offapi \
))
$(eval $(call gb_CppunitTest_use_ure,filter_dxf_test))
$(eval $(call gb_CppunitTest_use_vcl,filter_dxf_test))
$(eval $(call gb_CppunitTest_use_components,filter_dxf_test,\
configmgr/source/configmgr \
i18npool/util/i18npool \
))
$(eval $(call gb_CppunitTest_use_configuration,filter_dxf_test))
# vim: set noet sw=4 ts=4:
......@@ -85,6 +85,7 @@ $(eval $(call gb_Module_add_check_targets,filter,\
ifneq ($(DISABLE_CVE_TESTS),TRUE)
$(eval $(call gb_Module_add_check_targets,filter,\
CppunitTest_filter_dxf_test \
CppunitTest_filter_pcx_test \
CppunitTest_filter_pict_test \
CppunitTest_filter_ppm_test \
......
/* -*- 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 <unotest/filters-test.hxx>
#include <test/bootstrapfixture.hxx>
#include <vcl/FilterConfigItem.hxx>
#include <tools/stream.hxx>
#include <vcl/graph.hxx>
#include <osl/file.hxx>
#include <osl/process.h>
extern "C"
{
SAL_DLLPUBLIC_EXPORT bool SAL_CALL
GraphicImport(SvStream & rStream, Graphic & rGraphic,
FilterConfigItem*);
}
using namespace ::com::sun::star;
/* Implementation of Filters test */
class DxfFilterTest
: public test::FiltersTest
, public test::BootstrapFixture
{
public:
DxfFilterTest() : BootstrapFixture(true, false) {}
virtual bool load(const OUString &,
const OUString &rURL, const OUString &,
unsigned int, unsigned int, unsigned int) SAL_OVERRIDE;
/**
* Ensure CVEs remain unbroken
*/
void testCVEs();
CPPUNIT_TEST_SUITE(DxfFilterTest);
CPPUNIT_TEST(testCVEs);
CPPUNIT_TEST_SUITE_END();
};
bool DxfFilterTest::load(const OUString &,
const OUString &rURL, const OUString &,
unsigned int, unsigned int, unsigned int)
{
SvFileStream aFileStream(rURL, STREAM_READ);
Graphic aGraphic;
return GraphicImport(aFileStream, aGraphic, NULL);
}
void DxfFilterTest::testCVEs()
{
testDir(OUString(),
getURLFromSrc("/filter/qa/cppunit/data/dxf/"),
OUString());
}
CPPUNIT_TEST_SUITE_REGISTRATION(DxfFilterTest);
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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