LCOV - code coverage report
Current view: top level - vcl/qa/cppunit - fontcharmap.cxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 18 18 100.0 %
Date: 2014-11-03 Functions: 10 11 90.9 %
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 <test/bootstrapfixture.hxx>
      11             : 
      12             : #include <osl/file.hxx>
      13             : #include <osl/process.h>
      14             : 
      15             : #include <vcl/metric.hxx>
      16             : 
      17           4 : class VclFontCharMapTest : public test::BootstrapFixture
      18             : {
      19             : public:
      20           2 :     VclFontCharMapTest() : BootstrapFixture(true, false) {}
      21             : 
      22             :     void testDefaultFontCharMap();
      23             : 
      24           4 :     CPPUNIT_TEST_SUITE(VclFontCharMapTest);
      25           2 :     CPPUNIT_TEST(testDefaultFontCharMap);
      26           4 :     CPPUNIT_TEST_SUITE_END();
      27             : };
      28             : 
      29           2 : void VclFontCharMapTest::testDefaultFontCharMap()
      30             : {
      31           2 :     FontCharMapPtr pfcmap( new FontCharMap() ); // gets default map
      32             : 
      33           2 :     CPPUNIT_ASSERT( pfcmap->IsDefaultMap() );
      34             : 
      35           2 :     sal_uInt32 nStartBMPPlane = pfcmap->GetFirstChar();
      36           2 :     sal_uInt32 nStartSupBMPPlane = pfcmap->GetNextChar(0xD800);
      37           2 :     sal_uInt32 nEndBMPPlane = pfcmap->GetLastChar();
      38             : 
      39           2 :     CPPUNIT_ASSERT( nStartBMPPlane == 0x0020 );
      40           2 :     CPPUNIT_ASSERT( nStartSupBMPPlane == 0xE000 );
      41           2 :     CPPUNIT_ASSERT( nEndBMPPlane == 0xFFF0-1 );
      42             : 
      43           2 :     pfcmap = 0;
      44           2 : }
      45             : 
      46           2 : CPPUNIT_TEST_SUITE_REGISTRATION(VclFontCharMapTest);
      47             : 
      48           8 : CPPUNIT_PLUGIN_IMPLEMENT();
      49             : 
      50             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10