diff options
author | aavit <qt-info@nokia.com> | 2011-05-02 09:26:47 (GMT) |
---|---|---|
committer | aavit <qt-info@nokia.com> | 2011-05-02 09:26:47 (GMT) |
commit | 903cd489d77a7a432c1d5127e238382f42f6e89f (patch) | |
tree | 86bb5583b23ea55863cab3ae76ace37bf3c3a2e9 /tests | |
parent | ab29e9f1ab52901a5ed98055cf203817d2248dd2 (diff) | |
parent | ac9e63b58533a3215106ed9da82cff3a3e3dda3a (diff) | |
download | Qt-903cd489d77a7a432c1d5127e238382f42f6e89f.zip Qt-903cd489d77a7a432c1d5127e238382f42f6e89f.tar.gz Qt-903cd489d77a7a432c1d5127e238382f42f6e89f.tar.bz2 |
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-fire-team
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qrawfont/tst_qrawfont.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/tests/auto/qrawfont/tst_qrawfont.cpp b/tests/auto/qrawfont/tst_qrawfont.cpp index 3aa4006..4b42c74 100644 --- a/tests/auto/qrawfont/tst_qrawfont.cpp +++ b/tests/auto/qrawfont/tst_qrawfont.cpp @@ -104,7 +104,7 @@ void tst_QRawFont::invalidRawFont() { QRawFont font; QVERIFY(!font.isValid()); - QCOMPARE(font.pixelSize(), -1); + QCOMPARE(font.pixelSize(), 0.0); QVERIFY(font.familyName().isEmpty()); QCOMPARE(font.style(), QFont::StyleNormal); QCOMPARE(font.weight(), -1); @@ -165,7 +165,7 @@ void tst_QRawFont::correctFontData_data() QTest::addColumn<QFont::Weight>("weight"); QTest::addColumn<QFont::HintingPreference>("hintingPreference"); QTest::addColumn<qreal>("unitsPerEm"); - QTest::addColumn<int>("pixelSize"); + QTest::addColumn<qreal>("pixelSize"); int hintingPreferences[] = { int(QFont::PreferDefaultHinting), @@ -189,7 +189,7 @@ void tst_QRawFont::correctFontData_data() << QFont::Normal << QFont::HintingPreference(*hintingPreference) << 1000.0 - << 10; + << 10.0; fileName = QLatin1String(SRCDIR "testfont_bold_italic.ttf"); title = fileName @@ -203,7 +203,7 @@ void tst_QRawFont::correctFontData_data() << QFont::Bold << QFont::HintingPreference(*hintingPreference) << 1000.0 - << 10; + << 10.0; ++hintingPreference; } @@ -217,7 +217,7 @@ void tst_QRawFont::correctFontData() QFETCH(QFont::Weight, weight); QFETCH(QFont::HintingPreference, hintingPreference); QFETCH(qreal, unitsPerEm); - QFETCH(int, pixelSize); + QFETCH(qreal, pixelSize); QRawFont font(fileName, 10, hintingPreference); QVERIFY(font.isValid()); @@ -284,7 +284,7 @@ void tst_QRawFont::textLayout() QString familyName = QString::fromLatin1("QtBidiTestFont"); QFont font(familyName); - font.setPixelSize(18); + font.setPixelSize(18.0); QCOMPARE(QFontInfo(font).family(), familyName); QTextLayout layout(QLatin1String("Foobar")); @@ -301,7 +301,7 @@ void tst_QRawFont::textLayout() QRawFont rawFont = glyphs.font(); QVERIFY(rawFont.isValid()); QCOMPARE(rawFont.familyName(), familyName); - QCOMPARE(rawFont.pixelSize(), 18); + QCOMPARE(rawFont.pixelSize(), 18.0); QVector<quint32> expectedGlyphIndices; expectedGlyphIndices << 44 << 83 << 83 << 70 << 69 << 86; @@ -597,12 +597,12 @@ void tst_QRawFont::fromFont() QFont font(familyName); font.setHintingPreference(hintingPreference); - font.setPixelSize(26); + font.setPixelSize(26.0); QRawFont rawFont = QRawFont::fromFont(font, writingSystem); QVERIFY(rawFont.isValid()); QCOMPARE(rawFont.familyName(), familyName); - QCOMPARE(rawFont.pixelSize(), 26); + QCOMPARE(rawFont.pixelSize(), 26.0); QVERIFY(fontDatabase.removeApplicationFont(id)); } @@ -623,7 +623,7 @@ void tst_QRawFont::copyConstructor() { QString rawFontFamilyName; - int rawFontPixelSize; + qreal rawFontPixelSize; qreal rawFontAscent; qreal rawFontDescent; int rawFontTableSize; @@ -691,7 +691,7 @@ void tst_QRawFont::detach() { QString rawFontFamilyName; - int rawFontPixelSize; + qreal rawFontPixelSize; qreal rawFontAscent; qreal rawFontDescent; int rawFontTableSize; @@ -773,15 +773,15 @@ void tst_QRawFont::unsupportedWritingSystem() QFont font("QtBidiTestFont"); font.setHintingPreference(hintingPreference); - font.setPixelSize(12); + font.setPixelSize(12.0); QRawFont rawFont = QRawFont::fromFont(font, QFontDatabase::Any); QCOMPARE(rawFont.familyName(), QString::fromLatin1("QtBidiTestFont")); - QCOMPARE(rawFont.pixelSize(), 12); + QCOMPARE(rawFont.pixelSize(), 12.0); rawFont = QRawFont::fromFont(font, QFontDatabase::Hebrew); QCOMPARE(rawFont.familyName(), QString::fromLatin1("QtBidiTestFont")); - QCOMPARE(rawFont.pixelSize(), 12); + QCOMPARE(rawFont.pixelSize(), 12.0); QString arabicText = QFontDatabase::writingSystemSample(QFontDatabase::Arabic); @@ -798,11 +798,11 @@ void tst_QRawFont::unsupportedWritingSystem() QGlyphs glyphs = glyphss.at(0); QRawFont layoutFont = glyphs.font(); QVERIFY(layoutFont.familyName() != QString::fromLatin1("QtBidiTestFont")); - QCOMPARE(layoutFont.pixelSize(), 12); + QCOMPARE(layoutFont.pixelSize(), 12.0); rawFont = QRawFont::fromFont(font, QFontDatabase::Arabic); QCOMPARE(rawFont.familyName(), layoutFont.familyName()); - QCOMPARE(rawFont.pixelSize(), 12); + QCOMPARE(rawFont.pixelSize(), 12.0); fontDatabase.removeApplicationFont(id); } |