Kaydet (Commit) cc9a8c13 authored tarafından Jens Carl's avatar Jens Carl

tdf#45904 Move TableRow Java tests to C++

Move TableRow Java tests to C++ for ScTableRowObj.

Change-Id: I72cd8006b8ad932bab56681de9aac66fb40542fe
Reviewed-on: https://gerrit.libreoffice.org/70159
Tested-by: Jenkins
Reviewed-by: 's avatarJens Carl <j.carl43@gmx.de>
üst ee268253
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
/*
* 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/.
*/
#ifndef INCLUDED_TEST_TABLE_TABLEROW_HXX
#define INCLUDED_TEST_TABLE_TABLEROW_HXX
#include <test/testdllapi.hxx>
#include <com/sun/star/uno/XInterface.hpp>
#include <com/sun/star/uno/Reference.hxx>
namespace apitest
{
class OOO_DLLPUBLIC_TEST TableRow
{
public:
virtual css::uno::Reference<css::uno::XInterface> init() = 0;
void testTableRowProperties();
protected:
~TableRow() {}
};
} // namespace apitest
#endif // INCLUDED_TEST_TABLE_TABLEROW_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
"ScTableRowObj";"com::sun::star::table::TableRow";"Height"
"ScTableRowObj";"com::sun::star::table::TableRow";"OptimalHeight"
"ScTableRowObj";"com::sun::star::table::TableRow";"IsVisible"
"ScTableRowObj";"com::sun::star::table::TableRow";"IsStartOfNewPage"
"ScTableRowObj";"com::sun::star::table::XCellRange";"getCellByPosition()"
"ScTableRowObj";"com::sun::star::table::XCellRange";"getCellRangeByPosition()"
"ScTableRowObj";"com::sun::star::table::XCellRange";"getCellRangeByName()"
......@@ -9,6 +9,7 @@
#include <test/calc_unoapi_test.hxx>
#include <test/beans/xpropertyset.hxx>
#include <test/table/tablerow.hxx>
#include <com/sun/star/container/XIndexAccess.hpp>
#include <com/sun/star/lang/XComponent.hpp>
......@@ -25,7 +26,7 @@ using namespace css;
namespace sc_apitest
{
class ScTableRowObj : public CalcUnoApiTest, public apitest::XPropertySet
class ScTableRowObj : public CalcUnoApiTest, public apitest::TableRow, public apitest::XPropertySet
{
public:
ScTableRowObj();
......@@ -36,6 +37,9 @@ public:
CPPUNIT_TEST_SUITE(ScTableRowObj);
// TableRow
CPPUNIT_TEST(testTableRowProperties);
// XPropertySet
CPPUNIT_TEST(testGetPropertySetInfo);
CPPUNIT_TEST(testGetPropertyValue);
......
......@@ -162,6 +162,7 @@ $(eval $(call gb_Library_add_exception_objects,subsequenttest,\
test/source/sheet/xviewpane \
test/source/sheet/xviewsplitable \
test/source/style/xstyleloader \
test/source/table/tablerow \
test/source/table/xcell \
test/source/table/xcellcursor \
test/source/table/xcolumnrowrange \
......
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
/*
* 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 <test/table/tablerow.hxx>
#include <test/unoapi_property_testers.hxx>
#include <rtl/ustring.h>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <cppunit/extensions/HelperMacros.h>
using namespace css;
namespace apitest
{
void TableRow::testTableRowProperties()
{
uno::Reference<beans::XPropertySet> xPS(init(), uno::UNO_QUERY_THROW);
OUString aPropName;
aPropName = "Height";
testLongProperty(xPS, aPropName);
aPropName = "OptimalHeight";
testBooleanProperty(xPS, aPropName);
aPropName = "IsVisible";
testBooleanProperty(xPS, aPropName);
aPropName = "IsStartOfNewPage";
testBooleanProperty(xPS, aPropName);
}
} // namespace apitest
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
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