4
0
mirror of https://github.com/QuasarApp/qca.git synced 2025-05-14 03:29:32 +00:00

BigInteger: Test the toArray/fromArray

This commit is contained in:
Albert Astals Cid 2020-01-19 12:16:37 +01:00
parent c167627675
commit 691395e193

@ -61,6 +61,8 @@ void BigIntUnitTest::allTests()
QCOMPARE( QCA::BigInteger("-255").toString(), QCA::BigInteger(-255).toString() );
QCOMPARE( QCA::BigInteger("255").toString(), QString("255") );
QCOMPARE( QCA::BigInteger("-255").toString(), QString("-255") );
QCOMPARE( QCA::BigInteger("255"), QCA::BigInteger(QCA::BigInteger(255).toArray()) );
QCOMPARE( QCA::BigInteger("-255"), QCA::BigInteger(QCA::BigInteger(-255).toArray()) );
// Some operator tests
QCOMPARE( QCA::BigInteger("255") == QCA::BigInteger(255), true );