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

Generated by: LCOV version 1.11