1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/.
10 #include <test/bootstrapfixture.hxx>
12 #include <vcl/fontcharmap.hxx>
14 class VclFontCharMapTest
: public test::BootstrapFixture
18 : 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 FontCharMapRef
xfcmap(new FontCharMap()); // gets default map
33 CPPUNIT_ASSERT(xfcmap
->IsDefaultMap());
35 sal_uInt32 nStartBMPPlane
= xfcmap
->GetFirstChar();
36 sal_uInt32 nStartSupBMPPlane
= xfcmap
->GetNextChar(0xD800);
37 sal_uInt32 nEndBMPPlane
= xfcmap
->GetLastChar();
39 CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32
>(0x0020), nStartBMPPlane
);
40 CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32
>(0xE000), nStartSupBMPPlane
);
41 CPPUNIT_ASSERT_EQUAL(static_cast<sal_uInt32
>(0xFFF0 - 1), nEndBMPPlane
);
44 CPPUNIT_TEST_SUITE_REGISTRATION(VclFontCharMapTest
);
46 CPPUNIT_PLUGIN_IMPLEMENT();
48 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */