2004-10-23 11:28:42 +00:00
|
|
|
/**
|
|
|
|
* kunittest.cpp
|
|
|
|
*
|
|
|
|
* Copyright (C) 2004 Zack Rusin <zack@kde.org>
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
*
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
|
|
* documentation and/or other materials provided with the distribution.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
|
|
|
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
|
|
|
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
|
|
|
* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
|
|
|
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
|
|
|
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
|
|
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
|
|
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
|
|
|
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
*/
|
|
|
|
#include "kunittest.h"
|
|
|
|
|
Big fixup of the unit test harness, and each unit test case, to match
the new Qt4 stuff, and the removal of QCString from the API
When I run this, I get:
# Running normal tests... #
Base64UnitTest - 22 tests passed, 0 tests failed
BigIntUnitTest - 252 tests passed, 0 tests failed
CertUnitTest - 0 tests passed, 1 test failed
Unexpected failure:
certunittest.cpp[40]: failed on "QCA::haveSystemStore()"
result = '0', expected = '1'
CipherUnitTest - 2740 tests passed, 0 tests failed
HashUnitTest - 186 tests passed, 0 tests failed
HexUnitTest - 17 tests passed, 0 tests failed
KDFUnitTest - 0 tests passed, 0 tests failed; also 2 skipped
Skipped tests:
kdfunittest.cpp[80]: "PBKDF version 1 with SHA1 not supported"
kdfunittest.cpp[98]: "PBKDF version 2 with SHA1 not supported"
KeyLengthUnitTest - 9 tests passed, 0 tests failed
MACUnitTest - 33 tests passed, 0 tests failed
RandomUnitTest - 67 tests passed, 0 tests failed
SecureArrayUnitTest - 32 tests passed, 0 tests failed
StaticUnitTest - 31 tests passed, 0 tests failed
SymmetricKeyUnitTest - 13 tests passed, 0 tests failed
# Done with normal tests:
Total test cases: 13
Total test steps : 3405
Total passed test steps (including unexpected) : 3402
Total unexpected passed test steps : 0
Total failed test steps (including expected) : 1
Total expected failed test steps : 0
Total skipped test steps : 2
CCMAIL: delta-affinix.com@lists.affinix.com
svn path=/trunk/kdesupport/qca/; revision=394072
2005-03-01 11:15:25 +00:00
|
|
|
#include "securearrayunittest.h"
|
2005-01-01 04:20:34 +00:00
|
|
|
#include "hexunittest.h"
|
2004-10-24 06:34:11 +00:00
|
|
|
#include "bigintunittest.h"
|
Big fixup of the unit test harness, and each unit test case, to match
the new Qt4 stuff, and the removal of QCString from the API
When I run this, I get:
# Running normal tests... #
Base64UnitTest - 22 tests passed, 0 tests failed
BigIntUnitTest - 252 tests passed, 0 tests failed
CertUnitTest - 0 tests passed, 1 test failed
Unexpected failure:
certunittest.cpp[40]: failed on "QCA::haveSystemStore()"
result = '0', expected = '1'
CipherUnitTest - 2740 tests passed, 0 tests failed
HashUnitTest - 186 tests passed, 0 tests failed
HexUnitTest - 17 tests passed, 0 tests failed
KDFUnitTest - 0 tests passed, 0 tests failed; also 2 skipped
Skipped tests:
kdfunittest.cpp[80]: "PBKDF version 1 with SHA1 not supported"
kdfunittest.cpp[98]: "PBKDF version 2 with SHA1 not supported"
KeyLengthUnitTest - 9 tests passed, 0 tests failed
MACUnitTest - 33 tests passed, 0 tests failed
RandomUnitTest - 67 tests passed, 0 tests failed
SecureArrayUnitTest - 32 tests passed, 0 tests failed
StaticUnitTest - 31 tests passed, 0 tests failed
SymmetricKeyUnitTest - 13 tests passed, 0 tests failed
# Done with normal tests:
Total test cases: 13
Total test steps : 3405
Total passed test steps (including unexpected) : 3402
Total unexpected passed test steps : 0
Total failed test steps (including expected) : 1
Total expected failed test steps : 0
Total skipped test steps : 2
CCMAIL: delta-affinix.com@lists.affinix.com
svn path=/trunk/kdesupport/qca/; revision=394072
2005-03-01 11:15:25 +00:00
|
|
|
#include "randomunittest.h"
|
2004-11-09 09:00:22 +00:00
|
|
|
#include "keylengthunittest.h"
|
|
|
|
#include "symmetrickeyunittest.h"
|
Big fixup of the unit test harness, and each unit test case, to match
the new Qt4 stuff, and the removal of QCString from the API
When I run this, I get:
# Running normal tests... #
Base64UnitTest - 22 tests passed, 0 tests failed
BigIntUnitTest - 252 tests passed, 0 tests failed
CertUnitTest - 0 tests passed, 1 test failed
Unexpected failure:
certunittest.cpp[40]: failed on "QCA::haveSystemStore()"
result = '0', expected = '1'
CipherUnitTest - 2740 tests passed, 0 tests failed
HashUnitTest - 186 tests passed, 0 tests failed
HexUnitTest - 17 tests passed, 0 tests failed
KDFUnitTest - 0 tests passed, 0 tests failed; also 2 skipped
Skipped tests:
kdfunittest.cpp[80]: "PBKDF version 1 with SHA1 not supported"
kdfunittest.cpp[98]: "PBKDF version 2 with SHA1 not supported"
KeyLengthUnitTest - 9 tests passed, 0 tests failed
MACUnitTest - 33 tests passed, 0 tests failed
RandomUnitTest - 67 tests passed, 0 tests failed
SecureArrayUnitTest - 32 tests passed, 0 tests failed
StaticUnitTest - 31 tests passed, 0 tests failed
SymmetricKeyUnitTest - 13 tests passed, 0 tests failed
# Done with normal tests:
Total test cases: 13
Total test steps : 3405
Total passed test steps (including unexpected) : 3402
Total unexpected passed test steps : 0
Total failed test steps (including expected) : 1
Total expected failed test steps : 0
Total skipped test steps : 2
CCMAIL: delta-affinix.com@lists.affinix.com
svn path=/trunk/kdesupport/qca/; revision=394072
2005-03-01 11:15:25 +00:00
|
|
|
#include "staticunittest.h"
|
|
|
|
#include "hashunittest.h"
|
|
|
|
#include "macunittest.h"
|
2004-11-20 05:46:38 +00:00
|
|
|
#include "cipherunittest.h"
|
2004-12-30 09:37:08 +00:00
|
|
|
#include "kdfunittest.h"
|
2005-01-01 08:49:45 +00:00
|
|
|
#include "base64unittest.h"
|
2005-01-12 11:25:08 +00:00
|
|
|
#include "certunittest.h"
|
2004-10-23 11:28:42 +00:00
|
|
|
|
|
|
|
#include "qtester.h"
|
|
|
|
#include "tester.h"
|
|
|
|
|
Big fixup of the unit test harness, and each unit test case, to match
the new Qt4 stuff, and the removal of QCString from the API
When I run this, I get:
# Running normal tests... #
Base64UnitTest - 22 tests passed, 0 tests failed
BigIntUnitTest - 252 tests passed, 0 tests failed
CertUnitTest - 0 tests passed, 1 test failed
Unexpected failure:
certunittest.cpp[40]: failed on "QCA::haveSystemStore()"
result = '0', expected = '1'
CipherUnitTest - 2740 tests passed, 0 tests failed
HashUnitTest - 186 tests passed, 0 tests failed
HexUnitTest - 17 tests passed, 0 tests failed
KDFUnitTest - 0 tests passed, 0 tests failed; also 2 skipped
Skipped tests:
kdfunittest.cpp[80]: "PBKDF version 1 with SHA1 not supported"
kdfunittest.cpp[98]: "PBKDF version 2 with SHA1 not supported"
KeyLengthUnitTest - 9 tests passed, 0 tests failed
MACUnitTest - 33 tests passed, 0 tests failed
RandomUnitTest - 67 tests passed, 0 tests failed
SecureArrayUnitTest - 32 tests passed, 0 tests failed
StaticUnitTest - 31 tests passed, 0 tests failed
SymmetricKeyUnitTest - 13 tests passed, 0 tests failed
# Done with normal tests:
Total test cases: 13
Total test steps : 3405
Total passed test steps (including unexpected) : 3402
Total unexpected passed test steps : 0
Total failed test steps (including expected) : 1
Total expected failed test steps : 0
Total skipped test steps : 2
CCMAIL: delta-affinix.com@lists.affinix.com
svn path=/trunk/kdesupport/qca/; revision=394072
2005-03-01 11:15:25 +00:00
|
|
|
#include <QtCore>
|
2004-10-23 11:28:42 +00:00
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
void KUnitTest::registerTests()
|
|
|
|
{
|
2005-01-01 04:20:34 +00:00
|
|
|
ADD_TEST( HexUnitTest );
|
2004-10-23 11:28:42 +00:00
|
|
|
ADD_TEST( StaticUnitTest );
|
|
|
|
ADD_TEST( HashUnitTest );
|
2004-10-24 06:34:11 +00:00
|
|
|
ADD_TEST( BigIntUnitTest );
|
2004-11-05 03:10:59 +00:00
|
|
|
ADD_TEST( SecureArrayUnitTest );
|
2004-11-07 09:19:48 +00:00
|
|
|
ADD_TEST( MACUnitTest );
|
2004-11-09 09:00:22 +00:00
|
|
|
ADD_TEST( KeyLengthUnitTest );
|
|
|
|
ADD_TEST( SymmetricKeyUnitTest );
|
|
|
|
ADD_TEST( RandomUnitTest );
|
2004-11-20 05:46:38 +00:00
|
|
|
ADD_TEST( CipherUnitTest );
|
2004-12-30 09:37:08 +00:00
|
|
|
ADD_TEST( KDFUnitTest );
|
2005-01-01 08:49:45 +00:00
|
|
|
ADD_TEST( Base64UnitTest );
|
2005-01-12 11:25:08 +00:00
|
|
|
ADD_TEST( CertUnitTest );
|
2004-10-23 11:28:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
KUnitTest::KUnitTest()
|
|
|
|
{
|
|
|
|
registerTests();
|
|
|
|
}
|
|
|
|
|
|
|
|
int KUnitTest::runTests()
|
|
|
|
{
|
|
|
|
int globalSteps = 0;
|
|
|
|
int globalPasses = 0;
|
|
|
|
int globalFails = 0;
|
|
|
|
int globalXFails = 0;
|
|
|
|
int globalXPasses = 0;
|
|
|
|
int globalSkipped = 0;
|
|
|
|
|
|
|
|
cout << "# Running normal tests... #" << endl << endl;
|
Big fixup of the unit test harness, and each unit test case, to match
the new Qt4 stuff, and the removal of QCString from the API
When I run this, I get:
# Running normal tests... #
Base64UnitTest - 22 tests passed, 0 tests failed
BigIntUnitTest - 252 tests passed, 0 tests failed
CertUnitTest - 0 tests passed, 1 test failed
Unexpected failure:
certunittest.cpp[40]: failed on "QCA::haveSystemStore()"
result = '0', expected = '1'
CipherUnitTest - 2740 tests passed, 0 tests failed
HashUnitTest - 186 tests passed, 0 tests failed
HexUnitTest - 17 tests passed, 0 tests failed
KDFUnitTest - 0 tests passed, 0 tests failed; also 2 skipped
Skipped tests:
kdfunittest.cpp[80]: "PBKDF version 1 with SHA1 not supported"
kdfunittest.cpp[98]: "PBKDF version 2 with SHA1 not supported"
KeyLengthUnitTest - 9 tests passed, 0 tests failed
MACUnitTest - 33 tests passed, 0 tests failed
RandomUnitTest - 67 tests passed, 0 tests failed
SecureArrayUnitTest - 32 tests passed, 0 tests failed
StaticUnitTest - 31 tests passed, 0 tests failed
SymmetricKeyUnitTest - 13 tests passed, 0 tests failed
# Done with normal tests:
Total test cases: 13
Total test steps : 3405
Total passed test steps (including unexpected) : 3402
Total unexpected passed test steps : 0
Total failed test steps (including expected) : 1
Total expected failed test steps : 0
Total skipped test steps : 2
CCMAIL: delta-affinix.com@lists.affinix.com
svn path=/trunk/kdesupport/qca/; revision=394072
2005-03-01 11:15:25 +00:00
|
|
|
|
|
|
|
Tester* test;
|
|
|
|
foreach( test, m_tests ) {
|
2004-10-23 11:28:42 +00:00
|
|
|
test->allTests();
|
Big fixup of the unit test harness, and each unit test case, to match
the new Qt4 stuff, and the removal of QCString from the API
When I run this, I get:
# Running normal tests... #
Base64UnitTest - 22 tests passed, 0 tests failed
BigIntUnitTest - 252 tests passed, 0 tests failed
CertUnitTest - 0 tests passed, 1 test failed
Unexpected failure:
certunittest.cpp[40]: failed on "QCA::haveSystemStore()"
result = '0', expected = '1'
CipherUnitTest - 2740 tests passed, 0 tests failed
HashUnitTest - 186 tests passed, 0 tests failed
HexUnitTest - 17 tests passed, 0 tests failed
KDFUnitTest - 0 tests passed, 0 tests failed; also 2 skipped
Skipped tests:
kdfunittest.cpp[80]: "PBKDF version 1 with SHA1 not supported"
kdfunittest.cpp[98]: "PBKDF version 2 with SHA1 not supported"
KeyLengthUnitTest - 9 tests passed, 0 tests failed
MACUnitTest - 33 tests passed, 0 tests failed
RandomUnitTest - 67 tests passed, 0 tests failed
SecureArrayUnitTest - 32 tests passed, 0 tests failed
StaticUnitTest - 31 tests passed, 0 tests failed
SymmetricKeyUnitTest - 13 tests passed, 0 tests failed
# Done with normal tests:
Total test cases: 13
Total test steps : 3405
Total passed test steps (including unexpected) : 3402
Total unexpected passed test steps : 0
Total failed test steps (including expected) : 1
Total expected failed test steps : 0
Total skipped test steps : 2
CCMAIL: delta-affinix.com@lists.affinix.com
svn path=/trunk/kdesupport/qca/; revision=394072
2005-03-01 11:15:25 +00:00
|
|
|
cout << m_tests.key(test).toLatin1().data() << " - ";
|
2004-11-20 05:46:38 +00:00
|
|
|
int numPass = test->testsFinished() - ( test->errorList().count() + test->xfailList().count() + test->skipList().count() );
|
|
|
|
int numFail = test->errorList().count() + test->xfailList().count();
|
|
|
|
int numXFail = test->xfailList().count();
|
|
|
|
int numXPass = test->xpassList().count();
|
|
|
|
int numSkip = test->skipList().count();
|
|
|
|
|
|
|
|
globalSteps += test->testsFinished();
|
|
|
|
globalPasses += numPass;
|
|
|
|
globalFails += numFail;
|
|
|
|
globalXFails += numXFail;
|
|
|
|
globalXPasses += numXPass;
|
|
|
|
globalSkipped += numSkip;
|
|
|
|
|
|
|
|
cout << numPass << " test" << ( ( 1 == numPass )?"":"s") << " passed";
|
|
|
|
if ( 0 < test->xpassList().count() ) {
|
|
|
|
cout << " (" << numXPass << " unexpected pass" << ( ( 1 == numXPass )?"":"es") << ")";
|
|
|
|
}
|
|
|
|
cout << ", " << numFail << " test" << ( ( 1 == numFail )?"":"s") << " failed";
|
|
|
|
if ( 0 < numXFail ) {
|
|
|
|
cout << " (" << numXFail << " expected failure" << ( ( 1 == numXFail )?"":"s") << ")";
|
|
|
|
}
|
|
|
|
if ( 0 < numSkip ) {
|
|
|
|
cout << "; also " << numSkip << " skipped";
|
|
|
|
}
|
|
|
|
cout << endl;
|
|
|
|
|
|
|
|
if ( 0 < numXPass ) {
|
Big fixup of the unit test harness, and each unit test case, to match
the new Qt4 stuff, and the removal of QCString from the API
When I run this, I get:
# Running normal tests... #
Base64UnitTest - 22 tests passed, 0 tests failed
BigIntUnitTest - 252 tests passed, 0 tests failed
CertUnitTest - 0 tests passed, 1 test failed
Unexpected failure:
certunittest.cpp[40]: failed on "QCA::haveSystemStore()"
result = '0', expected = '1'
CipherUnitTest - 2740 tests passed, 0 tests failed
HashUnitTest - 186 tests passed, 0 tests failed
HexUnitTest - 17 tests passed, 0 tests failed
KDFUnitTest - 0 tests passed, 0 tests failed; also 2 skipped
Skipped tests:
kdfunittest.cpp[80]: "PBKDF version 1 with SHA1 not supported"
kdfunittest.cpp[98]: "PBKDF version 2 with SHA1 not supported"
KeyLengthUnitTest - 9 tests passed, 0 tests failed
MACUnitTest - 33 tests passed, 0 tests failed
RandomUnitTest - 67 tests passed, 0 tests failed
SecureArrayUnitTest - 32 tests passed, 0 tests failed
StaticUnitTest - 31 tests passed, 0 tests failed
SymmetricKeyUnitTest - 13 tests passed, 0 tests failed
# Done with normal tests:
Total test cases: 13
Total test steps : 3405
Total passed test steps (including unexpected) : 3402
Total unexpected passed test steps : 0
Total failed test steps (including expected) : 1
Total expected failed test steps : 0
Total skipped test steps : 2
CCMAIL: delta-affinix.com@lists.affinix.com
svn path=/trunk/kdesupport/qca/; revision=394072
2005-03-01 11:15:25 +00:00
|
|
|
cout << " Unexpected pass" << ( ( 1 == numXPass )?"":"es") << ":" << endl;
|
|
|
|
QStringList list = test->xpassList();
|
|
|
|
for ( QStringList::Iterator itr = list.begin(); itr != list.end(); ++itr ) {
|
|
|
|
cout << "\t" << (*itr).toLatin1().data() << endl;
|
|
|
|
}
|
2004-11-20 05:46:38 +00:00
|
|
|
}
|
|
|
|
if ( 0 < (numFail - numXFail) ) {
|
Big fixup of the unit test harness, and each unit test case, to match
the new Qt4 stuff, and the removal of QCString from the API
When I run this, I get:
# Running normal tests... #
Base64UnitTest - 22 tests passed, 0 tests failed
BigIntUnitTest - 252 tests passed, 0 tests failed
CertUnitTest - 0 tests passed, 1 test failed
Unexpected failure:
certunittest.cpp[40]: failed on "QCA::haveSystemStore()"
result = '0', expected = '1'
CipherUnitTest - 2740 tests passed, 0 tests failed
HashUnitTest - 186 tests passed, 0 tests failed
HexUnitTest - 17 tests passed, 0 tests failed
KDFUnitTest - 0 tests passed, 0 tests failed; also 2 skipped
Skipped tests:
kdfunittest.cpp[80]: "PBKDF version 1 with SHA1 not supported"
kdfunittest.cpp[98]: "PBKDF version 2 with SHA1 not supported"
KeyLengthUnitTest - 9 tests passed, 0 tests failed
MACUnitTest - 33 tests passed, 0 tests failed
RandomUnitTest - 67 tests passed, 0 tests failed
SecureArrayUnitTest - 32 tests passed, 0 tests failed
StaticUnitTest - 31 tests passed, 0 tests failed
SymmetricKeyUnitTest - 13 tests passed, 0 tests failed
# Done with normal tests:
Total test cases: 13
Total test steps : 3405
Total passed test steps (including unexpected) : 3402
Total unexpected passed test steps : 0
Total failed test steps (including expected) : 1
Total expected failed test steps : 0
Total skipped test steps : 2
CCMAIL: delta-affinix.com@lists.affinix.com
svn path=/trunk/kdesupport/qca/; revision=394072
2005-03-01 11:15:25 +00:00
|
|
|
cout << " Unexpected failure" << ( ( 1 == numFail )?"":"s") << ":" << endl;
|
|
|
|
QStringList list = test->errorList();
|
|
|
|
for ( QStringList::Iterator itr = list.begin(); itr != list.end(); ++itr ) {
|
|
|
|
cout << "\t" << (*itr).toLatin1().data() << endl;
|
|
|
|
}
|
2004-11-20 05:46:38 +00:00
|
|
|
}
|
|
|
|
if ( 0 < numXFail ) {
|
Big fixup of the unit test harness, and each unit test case, to match
the new Qt4 stuff, and the removal of QCString from the API
When I run this, I get:
# Running normal tests... #
Base64UnitTest - 22 tests passed, 0 tests failed
BigIntUnitTest - 252 tests passed, 0 tests failed
CertUnitTest - 0 tests passed, 1 test failed
Unexpected failure:
certunittest.cpp[40]: failed on "QCA::haveSystemStore()"
result = '0', expected = '1'
CipherUnitTest - 2740 tests passed, 0 tests failed
HashUnitTest - 186 tests passed, 0 tests failed
HexUnitTest - 17 tests passed, 0 tests failed
KDFUnitTest - 0 tests passed, 0 tests failed; also 2 skipped
Skipped tests:
kdfunittest.cpp[80]: "PBKDF version 1 with SHA1 not supported"
kdfunittest.cpp[98]: "PBKDF version 2 with SHA1 not supported"
KeyLengthUnitTest - 9 tests passed, 0 tests failed
MACUnitTest - 33 tests passed, 0 tests failed
RandomUnitTest - 67 tests passed, 0 tests failed
SecureArrayUnitTest - 32 tests passed, 0 tests failed
StaticUnitTest - 31 tests passed, 0 tests failed
SymmetricKeyUnitTest - 13 tests passed, 0 tests failed
# Done with normal tests:
Total test cases: 13
Total test steps : 3405
Total passed test steps (including unexpected) : 3402
Total unexpected passed test steps : 0
Total failed test steps (including expected) : 1
Total expected failed test steps : 0
Total skipped test steps : 2
CCMAIL: delta-affinix.com@lists.affinix.com
svn path=/trunk/kdesupport/qca/; revision=394072
2005-03-01 11:15:25 +00:00
|
|
|
cout << " Expected failure" << ( ( 1 == numXFail)?"":"s") << ":" << endl;
|
|
|
|
QStringList list = test->xfailList();
|
|
|
|
for ( QStringList::Iterator itr = list.begin(); itr != list.end(); ++itr ) {
|
|
|
|
cout << "\t" << (*itr).toLatin1().data() << endl;
|
|
|
|
}
|
2004-11-20 05:46:38 +00:00
|
|
|
}
|
|
|
|
if ( 0 < numSkip ) {
|
|
|
|
cout << " Skipped test" << ( ( 1 == numSkip )?"":"s") << ":" << endl;
|
|
|
|
QStringList list = test->skipList();
|
|
|
|
for ( QStringList::Iterator itr = list.begin(); itr != list.end(); ++itr ) {
|
Big fixup of the unit test harness, and each unit test case, to match
the new Qt4 stuff, and the removal of QCString from the API
When I run this, I get:
# Running normal tests... #
Base64UnitTest - 22 tests passed, 0 tests failed
BigIntUnitTest - 252 tests passed, 0 tests failed
CertUnitTest - 0 tests passed, 1 test failed
Unexpected failure:
certunittest.cpp[40]: failed on "QCA::haveSystemStore()"
result = '0', expected = '1'
CipherUnitTest - 2740 tests passed, 0 tests failed
HashUnitTest - 186 tests passed, 0 tests failed
HexUnitTest - 17 tests passed, 0 tests failed
KDFUnitTest - 0 tests passed, 0 tests failed; also 2 skipped
Skipped tests:
kdfunittest.cpp[80]: "PBKDF version 1 with SHA1 not supported"
kdfunittest.cpp[98]: "PBKDF version 2 with SHA1 not supported"
KeyLengthUnitTest - 9 tests passed, 0 tests failed
MACUnitTest - 33 tests passed, 0 tests failed
RandomUnitTest - 67 tests passed, 0 tests failed
SecureArrayUnitTest - 32 tests passed, 0 tests failed
StaticUnitTest - 31 tests passed, 0 tests failed
SymmetricKeyUnitTest - 13 tests passed, 0 tests failed
# Done with normal tests:
Total test cases: 13
Total test steps : 3405
Total passed test steps (including unexpected) : 3402
Total unexpected passed test steps : 0
Total failed test steps (including expected) : 1
Total expected failed test steps : 0
Total skipped test steps : 2
CCMAIL: delta-affinix.com@lists.affinix.com
svn path=/trunk/kdesupport/qca/; revision=394072
2005-03-01 11:15:25 +00:00
|
|
|
cout << "\t" << (*itr).toLatin1().data() << endl;
|
2004-10-23 11:28:42 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
cout << endl;
|
2005-03-26 11:28:16 +00:00
|
|
|
delete(test);
|
2004-10-23 11:28:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
cout << "# Done with normal tests:" << endl;
|
|
|
|
cout << " Total test cases: " << m_tests.count() << endl;
|
|
|
|
cout << " Total test steps : " << globalSteps << endl;
|
|
|
|
cout << " Total passed test steps (including unexpected) : " << globalPasses << endl;
|
|
|
|
cout << " Total unexpected passed test steps : " << globalXPasses << endl;
|
|
|
|
cout << " Total failed test steps (including expected) : " << globalFails << endl;
|
|
|
|
cout << " Total expected failed test steps : " << globalXFails << endl;
|
|
|
|
cout << " Total skipped test steps : " << globalSkipped << endl;
|
|
|
|
|
2004-11-20 05:46:38 +00:00
|
|
|
return m_tests.count();
|
2004-10-23 11:28:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// #include "kunittest.moc"
|