on xenial help sign in
Make the test when your locale is not the locale the test expects
29a72aeAlbert Astals
tests/plugins/Utils/timeformattertest.cpp+11
@@ -21,6 +21,15 @@
21#include <QtTest>
21#include <QtTest>
22#include <QDebug>
22#include <QDebug>
23
23
24+class LCALLSetter
25+{
26+public:
27+ LCALLSetter()
28+ {
29+ setenv("LC_ALL", "C", 1);
30+ }
31+};
32+
24class TimeFormatterTest : public QObject
33class TimeFormatterTest : public QObject
25{
34{
26 Q_OBJECT
35 Q_OBJECT
@@ -63,6 +72,8 @@ private Q_SLOTS:
63 }
72 }
64};
73};
65
74
75+static LCALLSetter setter;
76+
66QTEST_GUILESS_MAIN(TimeFormatterTest)
77QTEST_GUILESS_MAIN(TimeFormatterTest)
67
78
68#include "timeformattertest.moc"
79#include "timeformattertest.moc"