LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/test/source/container - xnamed.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 15 15 100.0 %
Date: 2013-07-09 Functions: 5 6 83.3 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  */
       9             : 
      10             : #include <com/sun/star/container/XNamed.hpp>
      11             : #include <test/container/xnamed.hxx>
      12             : #include "cppunit/extensions/HelperMacros.h"
      13             : 
      14             : using namespace css;
      15             : using namespace css::uno;
      16             : 
      17             : namespace apitest {
      18             : 
      19           2 : void XNamed::testGetName()
      20             : {
      21           2 :     uno::Reference< container::XNamed > xNamed(init(), UNO_QUERY_THROW);
      22           2 :     CPPUNIT_ASSERT( maName == xNamed->getName() );
      23           2 : }
      24             : 
      25           2 : void XNamed::testSetName()
      26             : {
      27           2 :     uno::Reference< container::XNamed > xNamed(init(), UNO_QUERY_THROW);
      28           4 :     OUString aName("NewName");
      29             : 
      30           2 :     xNamed->setName(aName);
      31           2 :     CPPUNIT_ASSERT( aName == xNamed->getName() );
      32             : 
      33             :     // restore old name
      34           2 :     xNamed->setName(maName);
      35           4 :     CPPUNIT_ASSERT(maName == xNamed->getName());
      36           2 : }
      37             : 
      38          25 : XNamed::~XNamed()
      39             : {
      40          25 : }
      41             : 
      42          45 : }
      43             : 
      44             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10