mirror of
https://github.com/QuasarApp/qca.git
synced 2025-04-29 04:54:31 +00:00
Refactor cipherunittest
This commit is contained in:
parent
759ff45dba
commit
6a685d6b0b
@ -1,10 +1,11 @@
|
||||
ENABLE_TESTING()
|
||||
enable_testing()
|
||||
|
||||
set( cipherunittest_bin_SRCS cipherunittest.cpp )
|
||||
set(cipherunittest_bin_HDRS cipherunittest.h)
|
||||
set(cipherunittest_bin_SRCS cipherunittest.cpp)
|
||||
|
||||
MY_AUTOMOC( cipherunittest_bin_SRCS )
|
||||
qt4_wrap_cpp(EXTRA_SRCS cipherunittest.h)
|
||||
|
||||
add_executable(cipherunittest ${cipherunittest_bin_SRCS} )
|
||||
add_executable(cipherunittest ${cipherunittest_bin_SRCS} ${EXTRA_SRCS})
|
||||
|
||||
target_link_qca_test_libraries(cipherunittest)
|
||||
|
||||
|
@ -23,6 +23,8 @@
|
||||
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "cipherunittest.h"
|
||||
|
||||
#include <QtCrypto>
|
||||
#include <QtTest/QtTest>
|
||||
|
||||
@ -30,88 +32,6 @@
|
||||
#include "import_plugins.h"
|
||||
#endif
|
||||
|
||||
class CipherUnitTest : public QObject
|
||||
{
|
||||
|
||||
Q_OBJECT
|
||||
|
||||
private slots:
|
||||
void initTestCase();
|
||||
void cleanupTestCase();
|
||||
void aes128_data();
|
||||
void aes128();
|
||||
void aes128_cbc_data();
|
||||
void aes128_cbc();
|
||||
void aes128_cbc_pkcs7_data();
|
||||
void aes128_cbc_pkcs7();
|
||||
void aes128_cfb_data();
|
||||
void aes128_cfb();
|
||||
void aes128_ofb_data();
|
||||
void aes128_ofb();
|
||||
void aes128_ctr_data();
|
||||
void aes128_ctr();
|
||||
|
||||
void aes192_data();
|
||||
void aes192();
|
||||
void aes192_cbc_data();
|
||||
void aes192_cbc();
|
||||
void aes192_cbc_pkcs7_data();
|
||||
void aes192_cbc_pkcs7();
|
||||
void aes192_cfb_data();
|
||||
void aes192_cfb();
|
||||
void aes192_ofb_data();
|
||||
void aes192_ofb();
|
||||
void aes192_ctr_data();
|
||||
void aes192_ctr();
|
||||
|
||||
void aes256_data();
|
||||
void aes256();
|
||||
void aes256_cbc_data();
|
||||
void aes256_cbc();
|
||||
void aes256_cbc_pkcs7_data();
|
||||
void aes256_cbc_pkcs7();
|
||||
void aes256_cfb_data();
|
||||
void aes256_cfb();
|
||||
void aes256_ofb_data();
|
||||
void aes256_ofb();
|
||||
void aes256_ctr_data();
|
||||
void aes256_ctr();
|
||||
|
||||
void tripleDES_data();
|
||||
void tripleDES();
|
||||
|
||||
void des_data();
|
||||
void des();
|
||||
void des_pkcs7_data();
|
||||
void des_pkcs7();
|
||||
void des_cbc_data();
|
||||
void des_cbc();
|
||||
void des_cbc_pkcs7_data();
|
||||
void des_cbc_pkcs7();
|
||||
void des_cfb_data();
|
||||
void des_cfb();
|
||||
void des_ofb_data();
|
||||
void des_ofb();
|
||||
|
||||
void blowfish_data();
|
||||
void blowfish();
|
||||
void blowfish_cbc_data();
|
||||
void blowfish_cbc();
|
||||
void blowfish_cbc_pkcs7_data();
|
||||
void blowfish_cbc_pkcs7();
|
||||
void blowfish_cfb_data();
|
||||
void blowfish_cfb();
|
||||
void blowfish_ofb_data();
|
||||
void blowfish_ofb();
|
||||
|
||||
|
||||
void cast5_data();
|
||||
void cast5();
|
||||
private:
|
||||
QCA::Initializer* m_init;
|
||||
|
||||
};
|
||||
|
||||
void CipherUnitTest::initTestCase()
|
||||
{
|
||||
m_init = new QCA::Initializer;
|
||||
@ -2980,6 +2900,3 @@ void CipherUnitTest::cast5()
|
||||
|
||||
|
||||
QTEST_MAIN(CipherUnitTest)
|
||||
|
||||
#include "cipherunittest.moc"
|
||||
|
||||
|
88
unittest/cipherunittest/cipherunittest.h
Normal file
88
unittest/cipherunittest/cipherunittest.h
Normal file
@ -0,0 +1,88 @@
|
||||
#ifndef CIPHERUNITTEST_H
|
||||
#define CIPHERUNITTEST_H
|
||||
|
||||
#include <QtCrypto>
|
||||
|
||||
class CipherUnitTest : public QObject
|
||||
{
|
||||
|
||||
Q_OBJECT
|
||||
|
||||
private slots:
|
||||
void initTestCase();
|
||||
void cleanupTestCase();
|
||||
void aes128_data();
|
||||
void aes128();
|
||||
void aes128_cbc_data();
|
||||
void aes128_cbc();
|
||||
void aes128_cbc_pkcs7_data();
|
||||
void aes128_cbc_pkcs7();
|
||||
void aes128_cfb_data();
|
||||
void aes128_cfb();
|
||||
void aes128_ofb_data();
|
||||
void aes128_ofb();
|
||||
void aes128_ctr_data();
|
||||
void aes128_ctr();
|
||||
|
||||
void aes192_data();
|
||||
void aes192();
|
||||
void aes192_cbc_data();
|
||||
void aes192_cbc();
|
||||
void aes192_cbc_pkcs7_data();
|
||||
void aes192_cbc_pkcs7();
|
||||
void aes192_cfb_data();
|
||||
void aes192_cfb();
|
||||
void aes192_ofb_data();
|
||||
void aes192_ofb();
|
||||
void aes192_ctr_data();
|
||||
void aes192_ctr();
|
||||
|
||||
void aes256_data();
|
||||
void aes256();
|
||||
void aes256_cbc_data();
|
||||
void aes256_cbc();
|
||||
void aes256_cbc_pkcs7_data();
|
||||
void aes256_cbc_pkcs7();
|
||||
void aes256_cfb_data();
|
||||
void aes256_cfb();
|
||||
void aes256_ofb_data();
|
||||
void aes256_ofb();
|
||||
void aes256_ctr_data();
|
||||
void aes256_ctr();
|
||||
|
||||
void tripleDES_data();
|
||||
void tripleDES();
|
||||
|
||||
void des_data();
|
||||
void des();
|
||||
void des_pkcs7_data();
|
||||
void des_pkcs7();
|
||||
void des_cbc_data();
|
||||
void des_cbc();
|
||||
void des_cbc_pkcs7_data();
|
||||
void des_cbc_pkcs7();
|
||||
void des_cfb_data();
|
||||
void des_cfb();
|
||||
void des_ofb_data();
|
||||
void des_ofb();
|
||||
|
||||
void blowfish_data();
|
||||
void blowfish();
|
||||
void blowfish_cbc_data();
|
||||
void blowfish_cbc();
|
||||
void blowfish_cbc_pkcs7_data();
|
||||
void blowfish_cbc_pkcs7();
|
||||
void blowfish_cfb_data();
|
||||
void blowfish_cfb();
|
||||
void blowfish_ofb_data();
|
||||
void blowfish_ofb();
|
||||
|
||||
|
||||
void cast5_data();
|
||||
void cast5();
|
||||
private:
|
||||
QCA::Initializer* m_init;
|
||||
|
||||
};
|
||||
|
||||
#endif // CIPHERUNITTEST_H
|
Loading…
x
Reference in New Issue
Block a user