File tree Expand file tree Collapse file tree 5 files changed +14
-21
lines changed Expand file tree Collapse file tree 5 files changed +14
-21
lines changed Original file line number Diff line number Diff line change 5
5
* All rights reserved.
6
6
*/
7
7
8
- #include " func .h"
8
+ #include " func_base .h"
9
9
#include " digest.h"
10
10
#include " lib/base.h"
11
11
#include < QList>
Original file line number Diff line number Diff line change @@ -57,19 +57,19 @@ void test_asn1int::ops()
57
57
a1int s (f);
58
58
QCOMPARE (s, f++);
59
59
QCOMPARE (++s, f);
60
- QCOMPARE (++s != f, true );
60
+ QVERIFY (++s != f);
61
61
QCOMPARE (s.getLong (), 392 );
62
62
QCOMPARE (f.getLong (), 391 );
63
- QCOMPARE (f < s, true );
64
- QCOMPARE (s > f, true );
63
+ QVERIFY (f < s);
64
+ QVERIFY (s > f);
65
65
QCOMPARE (QString (a1int (0x18929 )), " 018929" );
66
66
}
67
67
68
68
void test_asn1int::get ()
69
69
{
70
70
a1int f (42 );
71
71
ASN1_INTEGER *g = f.get ();
72
- QCOMPARE (g != f.get0 (), true );
72
+ QVERIFY (g != f.get0 ());
73
73
QCOMPARE (f.get0 (), f.get0 ());
74
74
ASN1_INTEGER_free (g);
75
75
}
Original file line number Diff line number Diff line change @@ -24,10 +24,10 @@ private slots:
24
24
void test_asn1time::construct_op ()
25
25
{
26
26
a1time b, a (" 20191125153015Z" );
27
- QCOMPARE (a.isValid (), true );
28
- QCOMPARE ( a.isUndefined (), false );
29
- QCOMPARE (b == a, false );
30
- QCOMPARE (b > a, true );
27
+ QVERIFY (a.isValid ());
28
+ QVERIFY (! a.isUndefined ());
29
+ QVERIFY (b != a );
30
+ QVERIFY (b > a);
31
31
b = a;
32
32
QCOMPARE (b , a);
33
33
a1time c (a.get ());
Original file line number Diff line number Diff line change @@ -44,15 +44,15 @@ void test_entropy::initTestCase()
44
44
void test_entropy::cleanupTestCase ()
45
45
{
46
46
delete e;
47
- QCOMPARE (QFileInfo::exists (rnd), true );
47
+ QVERIFY (QFileInfo::exists (rnd));
48
48
QFile::remove (rnd);
49
49
qInstallMessageHandler (0 );
50
50
}
51
51
52
52
void test_entropy::start ()
53
53
{
54
54
e->add (17 );
55
- QCOMPARE (( e->strength () > 0 ), true );
55
+ QVERIFY ( e->strength () > 0 );
56
56
e->add_buf ((unsigned char *)" SomeText" , 8 );
57
57
}
58
58
@@ -62,9 +62,9 @@ void test_entropy::muchSalt()
62
62
QString s1, s2;
63
63
for (int i=0 ; i<100 ; i++) {
64
64
s1 = e->makeSalt ();
65
- QCOMPARE (s1.contains (rx), true );
65
+ QVERIFY (s1.contains (rx));
66
66
QCOMPARE (s1.size (), 17 );
67
- QCOMPARE (s1 != s2, true );
67
+ QVERIFY (s1 != s2);
68
68
s2 = s1;
69
69
}
70
70
}
Original file line number Diff line number Diff line change 6
6
*/
7
7
8
8
#include < QTest>
9
- #if 0
10
- #include <QDebug>
11
- #include <QFile>
12
- #include <QByteArray>
13
- #include <QString>
14
- #include <QRegularExpression>
15
- #endif
16
9
#include " x509name.h"
17
10
18
11
class test_x509name : public QObject
@@ -40,7 +33,7 @@ void test_x509name::construct()
40
33
x509name y;
41
34
QCOMPARE (x.entryCount (), 2 );
42
35
QCOMPARE (y.entryCount (), 0 );
43
- QCOMPARE (x != y, true );
36
+ QVERIFY (x != y);
44
37
}
45
38
46
39
void test_x509name::d2i2d ()
You can’t perform that action at this time.
0 commit comments