LCOV - code coverage report
Current view: top level - sal/qa/rtl/oustringbuffer - test_oustringbuffer_appendchar.cxx (source / functions) Hit Total Coverage
Test: commit c8344322a7af75b84dd3ca8f78b05543a976dfd5 Lines: 11 11 100.0 %
Date: 2015-06-13 12:38:46 Functions: 12 12 100.0 %
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 <sal/types.h>
      11             : #include <cppunit/TestFixture.h>
      12             : #include <cppunit/TestAssert.h>
      13             : #include <cppunit/extensions/HelperMacros.h>
      14             : #include "rtl/ustrbuf.hxx"
      15             : 
      16             : namespace test { namespace oustringbuffer {
      17             : 
      18           3 : class AppendChar: public CppUnit::TestFixture {
      19             : private:
      20             :     void testAppendChar();
      21             : 
      22           2 :     CPPUNIT_TEST_SUITE(AppendChar);
      23           1 :     CPPUNIT_TEST(testAppendChar);
      24           5 :     CPPUNIT_TEST_SUITE_END();
      25             : };
      26             : 
      27           1 : void AppendChar::testAppendChar() {
      28             :     // Check that append('a') does not unexpectedly pick
      29             :     // append(sal_Int32 i, sal_Int16 radix = 10):
      30           1 :     rtl::OUStringBuffer s;
      31           1 :     s.append('a');
      32           1 :     CPPUNIT_ASSERT_EQUAL(sal_Int32(1), s.getLength());
      33           1 :     CPPUNIT_ASSERT_EQUAL(sal_Unicode('a'), s[0]);
      34           1 : }
      35             : 
      36             : } }
      37             : 
      38           3 : CPPUNIT_TEST_SUITE_REGISTRATION(test::oustringbuffer::AppendChar);
      39             : 
      40             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.11