diff options
Diffstat (limited to 'tests/auto/network/ssl/qasn1element/tst_qasn1element.cpp')
-rw-r--r-- | tests/auto/network/ssl/qasn1element/tst_qasn1element.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/auto/network/ssl/qasn1element/tst_qasn1element.cpp b/tests/auto/network/ssl/qasn1element/tst_qasn1element.cpp index 661d13bc69..5fb4c28282 100644 --- a/tests/auto/network/ssl/qasn1element/tst_qasn1element.cpp +++ b/tests/auto/network/ssl/qasn1element/tst_qasn1element.cpp @@ -122,6 +122,14 @@ void tst_QAsn1Element::integer() QFETCH(QByteArray, encoded); QFETCH(int, value); + // read + bool ok; + QAsn1Element elem; + QVERIFY(elem.read(encoded)); + QCOMPARE(elem.type(), quint8(QAsn1Element::IntegerType)); + QCOMPARE(elem.toInteger(&ok), value); + QVERIFY(ok); + // write QByteArray buffer; QDataStream stream(&buffer, QIODevice::WriteOnly); |