summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/network/ssl/qasn1element/tst_qasn1element.cpp27
-rw-r--r--tests/auto/tools/qmakelib/evaltest.cpp4
2 files changed, 31 insertions, 0 deletions
diff --git a/tests/auto/network/ssl/qasn1element/tst_qasn1element.cpp b/tests/auto/network/ssl/qasn1element/tst_qasn1element.cpp
index 401ed85587..0928ecc5a1 100644
--- a/tests/auto/network/ssl/qasn1element/tst_qasn1element.cpp
+++ b/tests/auto/network/ssl/qasn1element/tst_qasn1element.cpp
@@ -134,6 +134,33 @@ void tst_QAsn1Element::dateTime_data()
QTest::newRow("UTCTime - no trailing Z")
<< QByteArray::fromHex("170d30373034313730373430323659")
<< QDateTime();
+ QTest::newRow("UTCTime - year 1950")
+ << QByteArray::fromHex("170d3530313232343035353530305a")
+ << QDateTime(QDate(1950, 12, 24), QTime(5, 55), Qt::UTC);
+ QTest::newRow("UTCTime - year 1999")
+ << QByteArray::fromHex("170d3939313232343035353530305a")
+ << QDateTime(QDate(1999, 12, 24), QTime(5, 55), Qt::UTC);
+ QTest::newRow("UTCTime - year 2000")
+ << QByteArray::fromHex("170d3030313232343035353530305a")
+ << QDateTime(QDate(2000, 12, 24), QTime(5, 55), Qt::UTC);
+ QTest::newRow("UTCTime - year 2049")
+ << QByteArray::fromHex("170d3439313232343035353530305a")
+ << QDateTime(QDate(2049, 12, 24), QTime(5, 55), Qt::UTC);
+ QTest::newRow("UTCTime - invalid year ('-9')")
+ << QByteArray::fromHex("170d2d39313232343035353530305a")
+ << QDateTime();
+ QTest::newRow("UTCTime - invalid year ('*9')")
+ << QByteArray::fromHex("170d2a39313232343035353530305a")
+ << QDateTime();
+ QTest::newRow("UTCTime - invalid year ('5*')")
+ << QByteArray::fromHex("170d352a313232343035353530305a")
+ << QDateTime();
+ QTest::newRow("UTCTime - invalid year ('AB')")
+ << QByteArray::fromHex("170d4142313232343035353530305a")
+ << QDateTime();
+ QTest::newRow("UTCTime - invalid year ('+1')")
+ << QByteArray::fromHex("170d2b31313232343035353530305a")
+ << QDateTime();
QTest::newRow("GeneralizedTime - 20510829095341Z")
<< QByteArray::fromHex("180f32303531303832393039353334315a")
<< QDateTime(QDate(2051, 8, 29), QTime(9, 53, 41), Qt::UTC);
diff --git a/tests/auto/tools/qmakelib/evaltest.cpp b/tests/auto/tools/qmakelib/evaltest.cpp
index 10a5d7c0c3..387a2fb84e 100644
--- a/tests/auto/tools/qmakelib/evaltest.cpp
+++ b/tests/auto/tools/qmakelib/evaltest.cpp
@@ -2341,7 +2341,11 @@ void tst_qmakelib::addTestFunctions(const QString &qindir)
QTest::newRow("include(): fail")
<< "include(include/nope.pri): OK = 1"
<< "OK = UNDEF"
+#ifdef Q_OS_WIN
+ << "Cannot read " + m_indir + "/include/nope.pri: The system cannot find the file specified."
+#else
<< "Cannot read " + m_indir + "/include/nope.pri: No such file or directory"
+#endif
<< true;
QTest::newRow("include(): silent fail")