bump product version to 5.0.4.1
[LibreOffice.git] / vcl / qa / cppunit / fontcharmap.cxx
blob2a88b66764b5f7401b41352b4de21d18805b0d2e
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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 */
10 #include <test/bootstrapfixture.hxx>
12 #include <osl/file.hxx>
13 #include <osl/process.h>
15 #include <vcl/metric.hxx>
17 class VclFontCharMapTest : public test::BootstrapFixture
19 public:
20 VclFontCharMapTest() : BootstrapFixture(true, false) {}
22 void testDefaultFontCharMap();
24 CPPUNIT_TEST_SUITE(VclFontCharMapTest);
25 CPPUNIT_TEST(testDefaultFontCharMap);
26 CPPUNIT_TEST_SUITE_END();
29 void VclFontCharMapTest::testDefaultFontCharMap()
31 FontCharMapPtr pfcmap( new FontCharMap() ); // gets default map
33 CPPUNIT_ASSERT( pfcmap->IsDefaultMap() );
35 sal_uInt32 nStartBMPPlane = pfcmap->GetFirstChar();
36 sal_uInt32 nStartSupBMPPlane = pfcmap->GetNextChar(0xD800);
37 sal_uInt32 nEndBMPPlane = pfcmap->GetLastChar();
39 CPPUNIT_ASSERT( nStartBMPPlane == 0x0020 );
40 CPPUNIT_ASSERT( nStartSupBMPPlane == 0xE000 );
41 CPPUNIT_ASSERT( nEndBMPPlane == 0xFFF0-1 );
43 pfcmap = 0;
46 CPPUNIT_TEST_SUITE_REGISTRATION(VclFontCharMapTest);
48 CPPUNIT_PLUGIN_IMPLEMENT();
50 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */