/* -*- 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 namespace { class Test: public CppUnit::TestFixture { private: CPPUNIT_TEST_SUITE(Test); CPPUNIT_TEST(testGet); CPPUNIT_TEST(testHas); CPPUNIT_TEST(testExtract); CPPUNIT_TEST(testInsert); CPPUNIT_TEST_SUITE_END(); void testGet() { css::uno::Any a(false); CPPUNIT_ASSERT_EQUAL(a, a.get()); CPPUNIT_ASSERT_EQUAL(false, a.get()); } void testHas() { css::uno::Any a(false); CPPUNIT_ASSERT_EQUAL(true, a.has()); CPPUNIT_ASSERT_EQUAL(true, a.has()); } void testExtract() { css::uno::Any a1(false); css::uno::Any a2; CPPUNIT_ASSERT(a1 >>= a2); CPPUNIT_ASSERT_EQUAL(a1, a2); } void testInsert() { css::uno::Any a; a <<= css::uno::Any(false); CPPUNIT_ASSERT_EQUAL(css::uno::Any(false), a); } }; CPPUNIT_TEST_SUITE_REGISTRATION(Test); } CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ alue='distro/cib/libreoffice-6-0'>distro/cib/libreoffice-6-0 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Expand)Author
2017-07-13use more OUString::operator== comphelper..cuiNoel Grandin
2017-06-05spelling instanciate -> instantiateNoel Grandin
2017-04-21gbuild: Remove MSVC 2013 legacy codeDavid Ostrovsky
2017-03-25Fix typosAndrea Gelmini
2017-03-11Fix typosAndrea Gelmini
2017-02-28new loplugin unoanyNoel Grandin
2017-02-24makeAny->Any in cppuhelper..cuiNoel Grandin
2017-02-21loplugin:subtlezeroinit: cpputoolsStephan Bergmann
2017-02-15Some simplifications, using UNO_QUERY_THROWStephan Bergmann
2017-01-26Remove dynamic exception specificationsStephan Bergmann
2017-01-19New loplugin:dynexcspec: Add @throws documentation, cpputoolsStephan Bergmann
2016-03-11tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionalsRohan Kumar
2016-02-09Remove excess newlinesChris Sherlock
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann
2015-11-09new loplugin: oncevarNoel Grandin
2015-11-06loplugin:stringconstant: elide explicit ctor usage (automatic rewrite)Stephan Bergmann
2015-10-30use uno::Reference::set method instead of assignmentNoel Grandin
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann
2015-07-17tdf#88206 replace cppu::WeakImplHelper* etc.Takeshi Abe
2015-05-29loplugin:loopvartoosmallNoel Grandin
2015-03-29Clean up template-parameter-dependent C-style castsStephan Bergmann
2014-12-12cpputools: Use appropriate OUString functions on string constantsStephan Bergmann
2014-11-05markup with event type not checker typeCaolán McNamara
2014-10-28coverity#982593 experiment with silencing Infinite loopCaolán McNamara
2014-05-29remove more unnecesary OUString constructor useNoel Grandin
2014-05-27remove unnecessary use of OUString constructor when throwingNoel Grandin
2014-05-23remove boilerplate in UNO Exception constructor callsNoel Grandin
2014-05-23add default value for Context param in uno::Exception constructorsNoel Grandin
2014-05-08various: sal_Bool->boolNoel Grandin
2014-03-26First batch of adding SAL_OVERRRIDE to overriding function declarationsStephan Bergmann