/* -*- 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 "cppunit/extensions/HelperMacros.h" #include using namespace css; using namespace css::uno; namespace apitest { XNameContainer::XNameContainer(): maNameToRemove("XNameContainer") { } XNameContainer::XNameContainer(const OUString& rNameToRemove): maNameToRemove(rNameToRemove) { } void XNameContainer::testRemoveByName() { uno::Reference< container::XNameContainer > xNameContainer(init(),UNO_QUERY_THROW); CPPUNIT_ASSERT(xNameContainer->hasByName(maNameToRemove)); xNameContainer->removeByName(maNameToRemove); CPPUNIT_ASSERT(!xNameContainer->hasByName(maNameToRemove)); bool bExceptionThrown = false; try { xNameContainer->removeByName(maNameToRemove); } catch( const container::NoSuchElementException& ) { std::cout << "Exception Caught" << std::endl; bExceptionThrown = true; } CPPUNIT_ASSERT_MESSAGE("no exception thrown", bExceptionThrown); } } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ fice-5-3 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Expand)Author
2016-06-23tdf#99589 - tolower / toupper - dangerous to Turks ...Gökhan Gurbetoğlu
2016-04-10Drop redundant parenthesis.Pedro Giffuni
2016-03-10Avoid reserved identifierStephan Bergmann
2016-03-10Avoid reserved identifiersStephan Bergmann
2016-03-04-Werror,-WundefStephan Bergmann
2016-03-04-Werror,-Wunused-macrosStephan Bergmann
2016-02-23new loplugin: commaoperatorNoel Grandin
2016-02-17use consistent #define checks for the Windows platformNoel Grandin
2016-02-16use consistent #define checks for the Windows platformNoel Grandin
2016-01-26-Werror,-Wunused-parameter (clang-cl)Stephan Bergmann
2016-01-10Fix typosAndrea Gelmini
2015-11-23loplugin:unusedfields in soltools/Noel Grandin
2015-11-10loplugin:nullptr (automatic rewrite; Mac-specific code)Stephan Bergmann
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann
2015-10-02loplugin:unusedmethodsNoel Grandin
2015-09-30Fix typosAndrea Gelmini