summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@qt.io>2018-08-27 15:49:03 +0200
committerFrederik Gladhorn <frederik.gladhorn@qt.io>2018-08-27 15:49:03 +0200
commit900ce73b6f8db99faa37fb9eceaba3243c08d136 (patch)
tree05b80d9ad645fb82290b731a54a32dd790356d49 /tests
parentf71048a5314c93732a8a77460b465709b632ff5e (diff)
parentbd42e2f0cebb2fe8de77a054e9d30aa803749a61 (diff)
Merge 5.11 into 5.11.2
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/corelib/animation/qvariantanimation/tst_qvariantanimation.cpp25
-rw-r--r--tests/auto/corelib/tools/qdatetime/BLACKLIST2
-rw-r--r--tests/auto/corelib/tools/qlocale/BLACKLIST2
-rw-r--r--tests/auto/corelib/tools/qlocale/tst_qlocale.cpp4
4 files changed, 33 insertions, 0 deletions
diff --git a/tests/auto/corelib/animation/qvariantanimation/tst_qvariantanimation.cpp b/tests/auto/corelib/animation/qvariantanimation/tst_qvariantanimation.cpp
index 00962afa72..ac20fb35ec 100644
--- a/tests/auto/corelib/animation/qvariantanimation/tst_qvariantanimation.cpp
+++ b/tests/auto/corelib/animation/qvariantanimation/tst_qvariantanimation.cpp
@@ -43,6 +43,7 @@ private slots:
void keyValueAt();
void keyValues();
void duration();
+ void interpolation();
};
class TestableQVariantAnimation : public QVariantAnimation
@@ -129,6 +130,30 @@ void tst_QVariantAnimation::duration()
QCOMPARE(anim.duration(), 500);
}
+void tst_QVariantAnimation::interpolation()
+{
+ QVariantAnimation unsignedAnim;
+ unsignedAnim.setStartValue(100u);
+ unsignedAnim.setEndValue(0u);
+ unsignedAnim.setDuration(100);
+ unsignedAnim.setCurrentTime(50);
+ QCOMPARE(unsignedAnim.currentValue().toUInt(), 50u);
+
+ QVariantAnimation signedAnim;
+ signedAnim.setStartValue(100);
+ signedAnim.setEndValue(0);
+ signedAnim.setDuration(100);
+ signedAnim.setCurrentTime(50);
+ QCOMPARE(signedAnim.currentValue().toInt(), 50);
+
+ QVariantAnimation pointAnim;
+ pointAnim.setStartValue(QPoint(100, 100));
+ pointAnim.setEndValue(QPoint(0, 0));
+ pointAnim.setDuration(100);
+ pointAnim.setCurrentTime(50);
+ QCOMPARE(pointAnim.currentValue().toPoint(), QPoint(50, 50));
+}
+
QTEST_MAIN(tst_QVariantAnimation)
#include "tst_qvariantanimation.moc"
diff --git a/tests/auto/corelib/tools/qdatetime/BLACKLIST b/tests/auto/corelib/tools/qdatetime/BLACKLIST
new file mode 100644
index 0000000000..3a42ee066b
--- /dev/null
+++ b/tests/auto/corelib/tools/qdatetime/BLACKLIST
@@ -0,0 +1,2 @@
+[timeZoneAbbreviation]
+osx
diff --git a/tests/auto/corelib/tools/qlocale/BLACKLIST b/tests/auto/corelib/tools/qlocale/BLACKLIST
new file mode 100644
index 0000000000..3eac7c10ed
--- /dev/null
+++ b/tests/auto/corelib/tools/qlocale/BLACKLIST
@@ -0,0 +1,2 @@
+[formatTimeZone]
+osx
diff --git a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
index 4131c44c84..b7cb8a1bdc 100644
--- a/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
+++ b/tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
@@ -2385,6 +2385,10 @@ void tst_QLocale::currency()
QCOMPARE(de_DE.toCurrencyString(double(-1234.56)), QString::fromUtf8("-1.234,56\xc2\xa0\xe2\x82\xac"));
QCOMPARE(de_DE.toCurrencyString(double(-1234.56), QLatin1String("BAZ")), QString::fromUtf8("-1.234,56\xc2\xa0" "BAZ"));
+ const QLocale es_CR(QLocale::Spanish, QLocale::CostaRica);
+ QCOMPARE(es_CR.toCurrencyString(double(1565.25)),
+ QString::fromUtf8("\xE2\x82\xA1" "1\xC2\xA0" "565,25"));
+
const QLocale system = QLocale::system();
QVERIFY(system.toCurrencyString(1, QLatin1String("FOO")).contains(QLatin1String("FOO")));
}