diff options
author | Jens Carl <j.carl43@gmx.de> | 2018-04-10 04:46:44 +0000 |
---|---|---|
committer | Jens Carl <j.carl43@gmx.de> | 2018-04-17 17:45:53 +0200 |
commit | 73a7c7ddbc52ed3fe512d4c5206e90810f14b50c (patch) | |
tree | afda9369f3ef62d5556a0f836413065a75e6db97 | |
parent | a418c365644a4bfb0e40621d1b36b1708978a500 (diff) |
tdf#45904 Move _SheetSortDescriptor Java tests to C++
The C++ tests are now located in sheetsortdescriptor2.(hxx|cxx), because
this is the latest implementation of the UNO API interface
(SheetSortDescriptor2.idl).
Change-Id: I5b11a38f6cd0473714c4d57ee92889bfd7605e83
Reviewed-on: https://gerrit.libreoffice.org/52930
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jens Carl <j.carl43@gmx.de>
-rw-r--r-- | include/test/sheet/sheetsortdescriptor2.hxx | 34 | ||||
-rw-r--r-- | qadevOOo/Jar_OOoRunner.mk | 2 | ||||
-rw-r--r-- | qadevOOo/tests/java/ifc/sheet/_SheetSortDescriptor.java | 135 | ||||
-rw-r--r-- | qadevOOo/tests/java/mod/_sc/ScSortDescriptorBase.java | 130 | ||||
-rw-r--r-- | sc/CppunitTest_sc_sortdescriptorbaseobj.mk | 43 | ||||
-rw-r--r-- | sc/Module_sc.mk | 1 | ||||
-rw-r--r-- | sc/qa/extras/scsortdescriptorbaseobj.cxx | 87 | ||||
-rw-r--r-- | test/Library_subsequenttest.mk | 1 | ||||
-rw-r--r-- | test/source/sheet/sheetsortdescriptor2.cxx | 121 |
9 files changed, 287 insertions, 267 deletions
diff --git a/include/test/sheet/sheetsortdescriptor2.hxx b/include/test/sheet/sheetsortdescriptor2.hxx new file mode 100644 index 000000000000..0f3c5713d94c --- /dev/null +++ b/include/test/sheet/sheetsortdescriptor2.hxx @@ -0,0 +1,34 @@ +/* -*- 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_SHEET_SHEETSORTDESCRIPTOR2_HXX +#define INCLUDED_TEST_SHEET_SHEETSORTDESCRIPTOR2_HXX + +#include <com/sun/star/uno/XInterface.hpp> +#include <com/sun/star/uno/Reference.hxx> + +#include <test/testdllapi.hxx> + +namespace apitest +{ +class OOO_DLLPUBLIC_TEST SheetSortDescriptor2 +{ +public: + virtual css::uno::Reference<css::uno::XInterface> init() = 0; + + void testSheetSortDescriptor2Properties(); + +protected: + ~SheetSortDescriptor2() {} +}; +} // namespace apitest + +#endif // INCLUDED_TEST_SHEET_SHEETSORTDESCRIPTOR2_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/qadevOOo/Jar_OOoRunner.mk b/qadevOOo/Jar_OOoRunner.mk index 56d52e04ffc6..575e130efcd8 100644 --- a/qadevOOo/Jar_OOoRunner.mk +++ b/qadevOOo/Jar_OOoRunner.mk @@ -562,7 +562,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\ qadevOOo/tests/java/ifc/sdb/_XSingleSelectQueryAnalyzer \ qadevOOo/tests/java/ifc/sdb/_XSingleSelectQueryComposer \ qadevOOo/tests/java/ifc/sdb/_XSQLErrorBroadcaster \ - qadevOOo/tests/java/ifc/sheet/_SheetSortDescriptor \ qadevOOo/tests/java/ifc/sheet/_SpreadsheetDocument \ qadevOOo/tests/java/ifc/sheet/_TableAutoFormatField \ qadevOOo/tests/java/ifc/sheet/_XCellRangeData \ @@ -1037,7 +1036,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\ qadevOOo/tests/java/mod/_sc/ScShapeObj \ qadevOOo/tests/java/mod/_sc/ScSheetLinkObj \ qadevOOo/tests/java/mod/_sc/ScSheetLinksObj \ - qadevOOo/tests/java/mod/_sc/ScSortDescriptorBase \ qadevOOo/tests/java/mod/_sc/ScSpreadsheetSettings \ qadevOOo/tests/java/mod/_sc/ScSpreadsheetSettingsObj \ qadevOOo/tests/java/mod/_sc/ScStyleFamiliesObj \ diff --git a/qadevOOo/tests/java/ifc/sheet/_SheetSortDescriptor.java b/qadevOOo/tests/java/ifc/sheet/_SheetSortDescriptor.java deleted file mode 100644 index f540d77db610..000000000000 --- a/qadevOOo/tests/java/ifc/sheet/_SheetSortDescriptor.java +++ /dev/null @@ -1,135 +0,0 @@ -/* - * 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/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package ifc.sheet; - -import lib.MultiMethodTest; -import util.ValueChanger; - -import com.sun.star.beans.PropertyValue; -import com.sun.star.beans.XPropertySet; -import com.sun.star.table.CellAddress; -import com.sun.star.util.XSortable; - -/** -* Testing <code>com.sun.star.sheet.SheetSortDescriptor</code> -* service properties: <p> -* <ul> -* <li><code>BindFormatsToContent</code></li> -* <li><code>CopyOutputData</code></li> -* <li><code>IsCaseSensitive</code></li> -* <li><code>IsUserListEnabled</code></li> -* <li><code>OutputPosition</code></li> -* <li><code>SortAscending</code></li> -* <li><code>UserListIndex</code></li> -* </ul> <p> -* @see com.sun.star.sheet.SheetSortDescriptor -*/ -public class _SheetSortDescriptor extends MultiMethodTest { - - public XPropertySet oObj = null; - public XSortable xSORT = null; - public PropertyValue[] props = null; - - public void _BindFormatsToContent() { - xSORT = (XSortable) tEnv.getObjRelation("xSORT"); - props = xSORT.createSortDescriptor(); - changeProp("BindFormatsToContent",5); - } - - public void _CopyOutputData() { - changeProp("CopyOutputData",6); - } - - public void _IsCaseSensitive() { - changeProp("IsCaseSensitive",4); - } - - public void _IsUserListEnabled() { - changeProp("IsUserListEnabled",8); - } - - public void _OutputPosition() { - changeProp("OutputPosition",7); - } - - public void _SortAscending() { - log.println("Property 'SortAscending' is not part of the "+ - "property array"); - log.println("Available properties:"); - for (int i=0; i<props.length;i++) { - log.println("\t"+props[i].Name); - } - tRes.tested("SortAscending",false); - } - - public void _UserListIndex() { - changeProp("UserListIndex",9); - } - - public void changeProp(String name, int nr) { - - Object gValue = null; - Object sValue = null; - Object ValueToSet = null; - int gInt = 0; - int sInt = 0; - - if ( ! name.equals(props[nr].Name) ) { - log.println("Property '"+props[nr].Name+"' is tested"); - log.println("But the status is for '"+name+"'"); - } - - - try { - gValue = props[nr].Value; - if ( name.equals("OutputPosition")) { - gInt = ((CellAddress) gValue).Row; - } - ValueToSet = ValueChanger.changePValue(gValue); - props[nr].Value=ValueToSet; - sValue = props[nr].Value; - if ( name.equals("OutputPosition")) { - sInt = ((CellAddress) sValue).Row; - gValue = Integer.valueOf(gInt); - sValue = Integer.valueOf(sInt); - } - - //check get-set methods - if ( (gValue.equals(sValue)) || (sValue == null) ) { - log.println("Value for '"+name+"' hasn't changed"); - tRes.tested(name, false); - } - else { - log.println("Property '"+name+"' OK"); - tRes.tested(name, true); - } - } catch (Exception e) { - log.println("Exception occurred while testing property '" + - name + "'"); - e.printStackTrace(log); - tRes.tested(name, false); - } - - - }// end of changeProp - - -} // finish class _SheetSortDescriptor - - diff --git a/qadevOOo/tests/java/mod/_sc/ScSortDescriptorBase.java b/qadevOOo/tests/java/mod/_sc/ScSortDescriptorBase.java deleted file mode 100644 index 74a2d085f9a5..000000000000 --- a/qadevOOo/tests/java/mod/_sc/ScSortDescriptorBase.java +++ /dev/null @@ -1,130 +0,0 @@ -/* - * 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/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package mod._sc; - -import java.io.PrintWriter; - -import lib.TestCase; -import lib.TestEnvironment; -import lib.TestParameters; -import util.SOfficeFactory; - -import com.sun.star.container.XIndexAccess; -import com.sun.star.lang.XComponent; -import com.sun.star.sheet.XSpreadsheetDocument; -import com.sun.star.sheet.XSpreadsheets; -import com.sun.star.uno.UnoRuntime; -import com.sun.star.uno.XInterface; -import com.sun.star.util.XSortable; - - -/** - * - * initial description - * @see com.sun.star.beans.XPropertySet - * @see com.sun.star.sheet.SheetSortDescriptor - * - */ -public class ScSortDescriptorBase extends TestCase { - - private XSpreadsheetDocument xSpreadsheetDoc; - - /** - * in general this method creates a testdocument - * - * @param tParam class which contains additional test parameters - * @param log class to log the test state and result - * - * - * @see TestParameters - * @see PrintWriter - * - */ - @Override - protected void initialize( TestParameters tParam, PrintWriter log ) throws Exception { - SOfficeFactory SOF = SOfficeFactory.getFactory( tParam.getMSF() ); - log.println( "creating a Spreadsheet document" ); - xSpreadsheetDoc = SOF.createCalcDoc(null); - } - - /** - * in general this method disposes the testenvironment and document - * - * @param tParam class which contains additional test parameters - * @param log class to log the test state and result - * - * - * @see TestParameters - * @see PrintWriter - * - */ - @Override - protected void cleanup( TestParameters tParam, PrintWriter log ) { - log.println( " disposing xSheetDoc " ); - XComponent oComp = UnoRuntime.queryInterface - (XComponent.class, xSpreadsheetDoc) ; - util.DesktopTools.closeDoc(oComp); - } - - - - /** - * creating a TestEnvironment for the interfaces to be tested - * - * @param tParam class which contains additional test parameters - * @param log class to log the test state and result - * - * @return Status class - * - * @see TestParameters - * @see PrintWriter - */ - @Override - public TestEnvironment createTestEnvironment( TestParameters tParam, - PrintWriter log ) - throws Exception { - - XInterface oObj = null; - XSortable xSORT = null; - - // creation of testobject here - // first we write what we are intend to do to log file - log.println( "creating a test environment" ); - - // create testobject here - - log.println("getting sheets"); - XSpreadsheets xSpreadsheets = xSpreadsheetDoc.getSheets(); - if (xSpreadsheets == null) log.println("FAILED"); else log.println("OK"); - - log.println("getting a sheet"); - XIndexAccess oIndexAccess = UnoRuntime.queryInterface(XIndexAccess.class, xSpreadsheets); - - oObj = UnoRuntime.queryInterface(XInterface.class,oIndexAccess.getByIndex(0)); - - xSORT = UnoRuntime.queryInterface(XSortable.class,oObj); - - TestEnvironment tEnv = new TestEnvironment(oObj); - tEnv.addObjRelation("xSORT",xSORT); - return tEnv; - - } // finish method getTestEnvironment - -} // finish class ScSortDescriptorBase - diff --git a/sc/CppunitTest_sc_sortdescriptorbaseobj.mk b/sc/CppunitTest_sc_sortdescriptorbaseobj.mk new file mode 100644 index 000000000000..efc099a32a44 --- /dev/null +++ b/sc/CppunitTest_sc_sortdescriptorbaseobj.mk @@ -0,0 +1,43 @@ +# -*- 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,sc_sortdescriptorbaseobj)) + +$(eval $(call gb_CppunitTest_use_external,sc_sortdescriptorbaseobj,boost_headers)) + +$(eval $(call gb_CppunitTest_add_exception_objects,sc_sortdescriptorbaseobj, \ + sc/qa/extras/scsortdescriptorbaseobj \ +)) + +$(eval $(call gb_CppunitTest_use_libraries,sc_sortdescriptorbaseobj, \ + cppu \ + sal \ + subsequenttest \ + test \ + unotest \ +)) + +$(eval $(call gb_CppunitTest_set_include,sc_sortdescriptorbaseobj,\ + $$(INCLUDE) \ +)) + +$(eval $(call gb_CppunitTest_use_sdk_api,sc_sortdescriptorbaseobj)) + +$(eval $(call gb_CppunitTest_use_ure,sc_sortdescriptorbaseobj)) +$(eval $(call gb_CppunitTest_use_vcl,sc_sortdescriptorbaseobj)) + +$(eval $(call gb_CppunitTest_use_components,sc_sortdescriptorbaseobj,\ + $(sc_unoapi_common_components) \ +)) + +$(eval $(call gb_CppunitTest_use_configuration,sc_sortdescriptorbaseobj)) + +# vim: set noet sw=4 ts=4: diff --git a/sc/Module_sc.mk b/sc/Module_sc.mk index 9afc0d0fe56f..35277496202a 100644 --- a/sc/Module_sc.mk +++ b/sc/Module_sc.mk @@ -159,6 +159,7 @@ $(eval $(call gb_Module_add_subsequentcheck_targets,sc,\ CppunitTest_sc_spreadsheetsettingsobj \ CppunitTest_sc_ddelinkobj \ CppunitTest_sc_functiondescriptionobj \ + CppunitTest_sc_sortdescriptorbaseobj \ )) $(eval $(call gb_Module_add_perfcheck_targets,sc,\ diff --git a/sc/qa/extras/scsortdescriptorbaseobj.cxx b/sc/qa/extras/scsortdescriptorbaseobj.cxx new file mode 100644 index 000000000000..6933ca8be769 --- /dev/null +++ b/sc/qa/extras/scsortdescriptorbaseobj.cxx @@ -0,0 +1,87 @@ +/* -*- 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/calc_unoapi_test.hxx> +#include <test/sheet/sheetsortdescriptor2.hxx> + +#include <com/sun/star/container/XIndexAccess.hpp> +#include <com/sun/star/lang/XComponent.hpp> +#include <com/sun/star/lang/XMultiServiceFactory.hpp> +#include <com/sun/star/sheet/XSpreadsheetDocument.hpp> +#include <com/sun/star/sheet/XSpreadsheet.hpp> +#include <com/sun/star/sheet/XSpreadsheets.hpp> +#include <com/sun/star/uno/XInterface.hpp> +#include <com/sun/star/util/XSortable.hpp> + +#include <com/sun/star/uno/Reference.hxx> + +using namespace css; +using namespace css::uno; +using namespace com::sun::star; + +namespace sc_apitest +{ +class ScSortDescriptorBaseObj : public CalcUnoApiTest, public apitest::SheetSortDescriptor2 +{ +public: + ScSortDescriptorBaseObj(); + + virtual uno::Reference<uno::XInterface> init() override; + virtual void setUp() override; + virtual void tearDown() override; + + CPPUNIT_TEST_SUITE(ScSortDescriptorBaseObj); + + // SheetSortDescriptor2 + CPPUNIT_TEST(testSheetSortDescriptor2Properties); + + CPPUNIT_TEST_SUITE_END(); + +private: + uno::Reference<lang::XComponent> mxComponent; +}; + +ScSortDescriptorBaseObj::ScSortDescriptorBaseObj() + : CalcUnoApiTest("/sc/qa/extras/testdocuments") +{ +} + +uno::Reference<uno::XInterface> ScSortDescriptorBaseObj::init() +{ + uno::Reference<sheet::XSpreadsheetDocument> xDoc(mxComponent, UNO_QUERY_THROW); + CPPUNIT_ASSERT_MESSAGE("no calc document", xDoc.is()); + + uno::Reference<sheet::XSpreadsheets> xSheets(xDoc->getSheets(), UNO_QUERY_THROW); + uno::Reference<container::XIndexAccess> xIA(xSheets, UNO_QUERY_THROW); + + uno::Reference<sheet::XSpreadsheet> xSheet(xIA->getByIndex(0), UNO_QUERY_THROW); + uno::Reference<util::XSortable> xSortable(xSheet, UNO_QUERY_THROW); + return xSortable; +} + +void ScSortDescriptorBaseObj::setUp() +{ + CalcUnoApiTest::setUp(); + // create a calc document + mxComponent = loadFromDesktop("private:factory/scalc"); +} + +void ScSortDescriptorBaseObj::tearDown() +{ + closeDocument(mxComponent); + CalcUnoApiTest::tearDown(); +} + +CPPUNIT_TEST_SUITE_REGISTRATION(ScSortDescriptorBaseObj); + +} // namespace sc_apitest + +CPPUNIT_PLUGIN_IMPLEMENT(); + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/test/Library_subsequenttest.mk b/test/Library_subsequenttest.mk index 885d645c240c..222efe6dd289 100644 --- a/test/Library_subsequenttest.mk +++ b/test/Library_subsequenttest.mk @@ -67,6 +67,7 @@ $(eval $(call gb_Library_add_exception_objects,subsequenttest,\ test/source/sheet/sheetcellranges \ test/source/sheet/sheetfilterdescriptor \ test/source/sheet/sheetlink \ + test/source/sheet/sheetsortdescriptor2 \ test/source/sheet/spreadsheet \ test/source/sheet/tableautoformat \ test/source/sheet/tablevalidation \ diff --git a/test/source/sheet/sheetsortdescriptor2.cxx b/test/source/sheet/sheetsortdescriptor2.cxx new file mode 100644 index 000000000000..291d9565127f --- /dev/null +++ b/test/source/sheet/sheetsortdescriptor2.cxx @@ -0,0 +1,121 @@ +/* -*- 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/cppunitasserthelper.hxx> +#include <test/sheet/sheetsortdescriptor2.hxx> + +#include <com/sun/star/beans/PropertyValue.hpp> +#include <com/sun/star/util/XSortable.hpp> +#include <com/sun/star/table/CellAddress.hpp> +#include <com/sun/star/table/TableSortField.hpp> +#include <com/sun/star/uno/Reference.hxx> +#include <com/sun/star/uno/Sequence.hxx> + +#include <cppunit/extensions/HelperMacros.h> + +using namespace com::sun::star; +using namespace com::sun::star::uno; + +namespace apitest +{ +void SheetSortDescriptor2::testSheetSortDescriptor2Properties() +{ + uno::Reference<util::XSortable> xSortable(init(), UNO_QUERY_THROW); + uno::Sequence<beans::PropertyValue> values = xSortable->createSortDescriptor(); + + std::vector<OUString> names; + // Only test the the get/read operation of the values, because set/write operation doesn't + // make any sense. It doesn't trigger any changes. + // See discussion: nabble.documentfoundation.org/Testing-UNO-API-service-properties-td4236286.html. + for (auto& value : values) + { + if (value.Name == "BindFormatsToContent") + { + names.push_back(value.Name); + bool bValue = false; + CPPUNIT_ASSERT(value.Value >>= bValue); + } + else if (value.Name == "IsUserListEnabled") + { + names.push_back(value.Name); + bool bValue = false; + CPPUNIT_ASSERT(value.Value >>= bValue); + } + else if (value.Name == "UserListIndex") + { + names.push_back(value.Name); + sal_Int32 nValue = 0; + CPPUNIT_ASSERT(value.Value >>= nValue); + } + else if (value.Name == "CopyOutputData") + { + names.push_back(value.Name); + bool bValue = false; + CPPUNIT_ASSERT(value.Value >>= bValue); + } + else if (value.Name == "OutputPosition") + { + names.push_back(value.Name); + table::CellAddress cellAddr; + CPPUNIT_ASSERT(value.Value >>= cellAddr); + } + else if (value.Name == "SortFields") + { + names.push_back(value.Name); + uno::Sequence<table::TableSortField> sSortFields; + CPPUNIT_ASSERT(value.Value >>= sSortFields); + } + else if (value.Name == "MaxFieldCount") + { + names.push_back(value.Name); + sal_Int32 nValue = 0; + CPPUNIT_ASSERT(value.Value >>= nValue); + } + else if (value.Name == "IsSortColumns") + { + names.push_back(value.Name); + bool bValue = false; + CPPUNIT_ASSERT(value.Value >>= bValue); + } + else if (value.Name == "ContainsHeader") + { + names.push_back(value.Name); + bool bValue = false; + CPPUNIT_ASSERT(value.Value >>= bValue); + } + else + { + OString sMsg = "Unsupported PropertyValue: " + + OUStringToOString(value.Name, RTL_TEXTENCODING_UTF8); + CPPUNIT_FAIL(sMsg.getStr()); + } + } + + CPPUNIT_ASSERT_MESSAGE("Property BindFormatsToContent not found", + std::count(std::begin(names), std::end(names), "BindFormatsToContent")); + CPPUNIT_ASSERT_MESSAGE("Property IsUserListEnabled not found", + std::count(std::begin(names), std::end(names), "IsUserListEnabled")); + CPPUNIT_ASSERT_MESSAGE("Property UserListIndex not found", + std::count(std::begin(names), std::end(names), "UserListIndex")); + CPPUNIT_ASSERT_MESSAGE("Property CopyOutputData not found", + std::count(std::begin(names), std::end(names), "CopyOutputData")); + CPPUNIT_ASSERT_MESSAGE("Property OutputPosition not found", + std::count(std::begin(names), std::end(names), "OutputPosition")); + CPPUNIT_ASSERT_MESSAGE("Property SortFields not found", + std::count(std::begin(names), std::end(names), "SortFields")); + CPPUNIT_ASSERT_MESSAGE("Property MaxFieldCount not found", + std::count(std::begin(names), std::end(names), "MaxFieldCount")); + CPPUNIT_ASSERT_MESSAGE("Property IsSortColumns not found", + std::count(std::begin(names), std::end(names), "IsSortColumns")); + CPPUNIT_ASSERT_MESSAGE("Property ContainsHeader not found", + std::count(std::begin(names), std::end(names), "ContainsHeader")); +} +} // namespace apitest + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ |