tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / vcl / qa / cppunit / physicalfontfacecollection.cxx
blob358a5b99436b98cbc6b67e022b66ff0e49bc6597
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 <sal/config.h>
12 #include <test/bootstrapfixture.hxx>
13 #include <cppunit/TestAssert.h>
15 #include <rtl/ref.hxx>
16 #include <basegfx/polygon/b2dpolypolygon.hxx>
18 #include <vcl/fontcapabilities.hxx>
19 #include <vcl/fontcharmap.hxx>
20 #include <vcl/virdev.hxx>
22 #include "fontmocks.hxx"
24 class VclPhysicalFontFaceCollectionTest : public test::BootstrapFixture
26 public:
27 VclPhysicalFontFaceCollectionTest()
28 : BootstrapFixture(true, false)
32 void testShouldGetFontId();
34 CPPUNIT_TEST_SUITE(VclPhysicalFontFaceCollectionTest);
35 CPPUNIT_TEST(testShouldGetFontId);
36 CPPUNIT_TEST_SUITE_END();
39 void VclPhysicalFontFaceCollectionTest::testShouldGetFontId()
41 vcl::font::PhysicalFontFaceCollection aCollection;
42 aCollection.Add(new TestFontFace(1988756));
44 rtl::Reference<vcl::font::PhysicalFontFace> pActual(new TestFontFace(1988756));
45 rtl::Reference<vcl::font::PhysicalFontFace> pExpected = aCollection.Get(0);
47 CPPUNIT_ASSERT_EQUAL(pExpected->GetFontId(), pActual->GetFontId());
48 CPPUNIT_ASSERT_EQUAL(1, aCollection.Count());
51 CPPUNIT_TEST_SUITE_REGISTRATION(VclPhysicalFontFaceCollectionTest);
53 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */