Test for Crypt in QQ Protocol
Needs ReviewPublic

Authored by himanshuvishwakarma on Jan 28 2018, 12:08 PM.

Details

Reviewers
vijaykrishnavanshi
pali
Group Reviewers
Kopete
Summary

In this patch is testing the crypt(TEA) class of QQ Protocol which encipher and decipher the text.

Diff Detail

Lint
Lint Skipped
Unit
Unit Tests Skipped
himanshuvishwakarma requested review of this revision.Jan 28 2018, 12:08 PM
himanshuvishwakarma created this revision.
tests/protocols/qq/qqcrypttest.cpp
12

Hi,

I have some difficulties in making this test into the data-driven test.
For the data-driven, I have the problem in defining the array type the data
function. how to use this function to store the array type values

QTest::addColumn<int>("result");

here in the example defining the Int
data type
but
​ ​
I
​ ​
want to use
​ ​
its
n *array* instead of
*int.*

I try Q_DECLARE_METATYPE() to define it like this
/**********
​namespace CryptData
{

struct Data {
    unsigned int a[2];
};
struct Key {
    unsigned int k[4];
};

}
Q_DECLARE_METATYPE(CryptData::Data)
Q_DECLARE_METATYPE(CryptData::Key)
/***********
but in this method I face lot of troubles in initializing the value by
function newRow().

Can I test with more values instead of data-driven?
I don't know what should I do.

please help!!

himanshuvishwakarma edited the summary of this revision. (Show Details)
himanshuvishwakarma set the repository for this revision to R434 Kopete.
himanshuvishwakarma marked an inline comment as done.Feb 1 2018, 6:29 AM

the test is now data-driven test

struct is removed