Line | Source | Count |
1 | | - |
2 | | - |
3 | | - |
4 | | - |
5 | | - |
6 | | - |
7 | | - |
8 | | - |
9 | | - |
10 | | - |
11 | | - |
12 | | - |
13 | | - |
14 | | - |
15 | | - |
16 | | - |
17 | | - |
18 | | - |
19 | | - |
20 | | - |
21 | | - |
22 | | - |
23 | | - |
24 | | - |
25 | | - |
26 | | - |
27 | | - |
28 | | - |
29 | | - |
30 | | - |
31 | | - |
32 | | - |
33 | | - |
34 | | - |
35 | | - |
36 | | - |
37 | | - |
38 | | - |
39 | | - |
40 | #include "qbytearraymatcher.h" | - |
41 | | - |
42 | #include <limits.h> | - |
43 | | - |
44 | QT_BEGIN_NAMESPACE | - |
45 | | - |
46 | static inline void bm_init_skiptable(const uchar *cc, int len, uchar *skiptable) | - |
47 | { | - |
48 | int l = qMin(len, 255); | - |
49 | memset(skiptable, l, 256*sizeof(uchar)); | - |
50 | cc += len - l; | - |
51 | while (l--)TRUE | evaluated 1028873 times by 18 testsEvaluated by:- tst_Collections
- tst_NetworkSelfTest
- tst_QByteArray
- tst_QByteArrayMatcher
- tst_QNetworkReply
- tst_QPrinter
- tst_QResourceEngine
- tst_QSslCertificate
- tst_QSslKey
- tst_QSslSocket
- tst_QSslSocket_onDemandCertificates_static
- tst_QString
- tst_QTextCodec
- tst_QTextEdit
- tst_Selftests
- tst_Spdy
- tst_qlogging - unknown status
- tst_qmessagehandler
| FALSE | evaluated 42590 times by 18 testsEvaluated by:- tst_Collections
- tst_NetworkSelfTest
- tst_QByteArray
- tst_QByteArrayMatcher
- tst_QNetworkReply
- tst_QPrinter
- tst_QResourceEngine
- tst_QSslCertificate
- tst_QSslKey
- tst_QSslSocket
- tst_QSslSocket_onDemandCertificates_static
- tst_QString
- tst_QTextCodec
- tst_QTextEdit
- tst_Selftests
- tst_Spdy
- tst_qlogging - unknown status
- tst_qmessagehandler
|
| 42590-1028873 |
52 | skiptable[*cc++] = l;executed 1028873 times by 18 tests: skiptable[*cc++] = l; Executed by:- tst_Collections
- tst_NetworkSelfTest
- tst_QByteArray
- tst_QByteArrayMatcher
- tst_QNetworkReply
- tst_QPrinter
- tst_QResourceEngine
- tst_QSslCertificate
- tst_QSslKey
- tst_QSslSocket
- tst_QSslSocket_onDemandCertificates_static
- tst_QString
- tst_QTextCodec
- tst_QTextEdit
- tst_Selftests
- tst_Spdy
- tst_qlogging - unknown status
- tst_qmessagehandler
| 1028873 |
53 | }executed 42590 times by 18 tests: end of block Executed by:- tst_Collections
- tst_NetworkSelfTest
- tst_QByteArray
- tst_QByteArrayMatcher
- tst_QNetworkReply
- tst_QPrinter
- tst_QResourceEngine
- tst_QSslCertificate
- tst_QSslKey
- tst_QSslSocket
- tst_QSslSocket_onDemandCertificates_static
- tst_QString
- tst_QTextCodec
- tst_QTextEdit
- tst_Selftests
- tst_Spdy
- tst_qlogging - unknown status
- tst_qmessagehandler
| 42590 |
54 | | - |
55 | static inline int bm_find(const uchar *cc, int l, int index, const uchar *puc, uint pl, | - |
56 | const uchar *skiptable) | - |
57 | { | - |
58 | if (pl == 0)TRUE | evaluated 8 times by 1 test | FALSE | evaluated 42641 times by 18 testsEvaluated by:- tst_Collections
- tst_NetworkSelfTest
- tst_QByteArray
- tst_QByteArrayMatcher
- tst_QNetworkReply
- tst_QPrinter
- tst_QResourceEngine
- tst_QSslCertificate
- tst_QSslKey
- tst_QSslSocket
- tst_QSslSocket_onDemandCertificates_static
- tst_QString
- tst_QTextCodec
- tst_QTextEdit
- tst_Selftests
- tst_Spdy
- tst_qlogging - unknown status
- tst_qmessagehandler
|
| 8-42641 |
59 | return index > l ? -1 : index;executed 8 times by 1 test: return index > l ? -1 : index; | 8 |
60 | const uint pl_minus_one = pl - 1; | - |
61 | | - |
62 | const uchar *current = cc + index + pl_minus_one; | - |
63 | const uchar *end = cc + l; | - |
64 | while (current < end) {TRUE | evaluated 14180096 times by 18 testsEvaluated by:- tst_Collections
- tst_NetworkSelfTest
- tst_QByteArray
- tst_QByteArrayMatcher
- tst_QNetworkReply
- tst_QPrinter
- tst_QResourceEngine
- tst_QSslCertificate
- tst_QSslKey
- tst_QSslSocket
- tst_QSslSocket_onDemandCertificates_static
- tst_QString
- tst_QTextCodec
- tst_QTextEdit
- tst_Selftests
- tst_Spdy
- tst_qlogging - unknown status
- tst_qmessagehandler
| FALSE | evaluated 2700 times by 10 testsEvaluated by:- tst_Collections
- tst_QByteArray
- tst_QResourceEngine
- tst_QSslCertificate
- tst_QSslKey
- tst_QString
- tst_Selftests
- tst_Spdy
- tst_qlogging - unknown status
- tst_qmessagehandler
|
| 2700-14180096 |
65 | uint skip = skiptable[*current]; | - |
66 | if (!skip) {TRUE | evaluated 50904 times by 16 testsEvaluated by:- tst_Collections
- tst_NetworkSelfTest
- tst_QByteArray
- tst_QByteArrayMatcher
- tst_QNetworkReply
- tst_QPrinter
- tst_QSslCertificate
- tst_QSslKey
- tst_QSslSocket
- tst_QSslSocket_onDemandCertificates_static
- tst_QString
- tst_QTextCodec
- tst_QTextEdit
- tst_Selftests
- tst_qlogging - unknown status
- tst_qmessagehandler
| FALSE | evaluated 14129192 times by 18 testsEvaluated by:- tst_Collections
- tst_NetworkSelfTest
- tst_QByteArray
- tst_QByteArrayMatcher
- tst_QNetworkReply
- tst_QPrinter
- tst_QResourceEngine
- tst_QSslCertificate
- tst_QSslKey
- tst_QSslSocket
- tst_QSslSocket_onDemandCertificates_static
- tst_QString
- tst_QTextCodec
- tst_QTextEdit
- tst_Selftests
- tst_Spdy
- tst_qlogging - unknown status
- tst_qmessagehandler
|
| 50904-14129192 |
67 | | - |
68 | while (skip < pl) {TRUE | evaluated 1074300 times by 16 testsEvaluated by:- tst_Collections
- tst_NetworkSelfTest
- tst_QByteArray
- tst_QByteArrayMatcher
- tst_QNetworkReply
- tst_QPrinter
- tst_QSslCertificate
- tst_QSslKey
- tst_QSslSocket
- tst_QSslSocket_onDemandCertificates_static
- tst_QString
- tst_QTextCodec
- tst_QTextEdit
- tst_Selftests
- tst_qlogging - unknown status
- tst_qmessagehandler
| FALSE | evaluated 38959 times by 14 testsEvaluated by:- tst_Collections
- tst_NetworkSelfTest
- tst_QByteArray
- tst_QByteArrayMatcher
- tst_QNetworkReply
- tst_QPrinter
- tst_QSslCertificate
- tst_QSslKey
- tst_QSslSocket
- tst_QSslSocket_onDemandCertificates_static
- tst_QString
- tst_QTextCodec
- tst_QTextEdit
- tst_qmessagehandler
|
| 38959-1074300 |
69 | if (*(current - skip) != puc[pl_minus_one - skip])TRUE | evaluated 11945 times by 13 testsEvaluated by:- tst_NetworkSelfTest
- tst_QByteArray
- tst_QNetworkReply
- tst_QSslCertificate
- tst_QSslKey
- tst_QSslSocket
- tst_QSslSocket_onDemandCertificates_static
- tst_QString
- tst_QTextCodec
- tst_QTextEdit
- tst_Selftests
- tst_qlogging - unknown status
- tst_qmessagehandler
| FALSE | evaluated 1062355 times by 16 testsEvaluated by:- tst_Collections
- tst_NetworkSelfTest
- tst_QByteArray
- tst_QByteArrayMatcher
- tst_QNetworkReply
- tst_QPrinter
- tst_QSslCertificate
- tst_QSslKey
- tst_QSslSocket
- tst_QSslSocket_onDemandCertificates_static
- tst_QString
- tst_QTextCodec
- tst_QTextEdit
- tst_Selftests
- tst_qlogging - unknown status
- tst_qmessagehandler
|
| 11945-1062355 |
70 | break;executed 11945 times by 13 tests: break; Executed by:- tst_NetworkSelfTest
- tst_QByteArray
- tst_QNetworkReply
- tst_QSslCertificate
- tst_QSslKey
- tst_QSslSocket
- tst_QSslSocket_onDemandCertificates_static
- tst_QString
- tst_QTextCodec
- tst_QTextEdit
- tst_Selftests
- tst_qlogging - unknown status
- tst_qmessagehandler
| 11945 |
71 | skip++; | - |
72 | }executed 1062355 times by 16 tests: end of block Executed by:- tst_Collections
- tst_NetworkSelfTest
- tst_QByteArray
- tst_QByteArrayMatcher
- tst_QNetworkReply
- tst_QPrinter
- tst_QSslCertificate
- tst_QSslKey
- tst_QSslSocket
- tst_QSslSocket_onDemandCertificates_static
- tst_QString
- tst_QTextCodec
- tst_QTextEdit
- tst_Selftests
- tst_qlogging - unknown status
- tst_qmessagehandler
| 1062355 |
73 | if (skip > pl_minus_one) TRUE | evaluated 38959 times by 14 testsEvaluated by:- tst_Collections
- tst_NetworkSelfTest
- tst_QByteArray
- tst_QByteArrayMatcher
- tst_QNetworkReply
- tst_QPrinter
- tst_QSslCertificate
- tst_QSslKey
- tst_QSslSocket
- tst_QSslSocket_onDemandCertificates_static
- tst_QString
- tst_QTextCodec
- tst_QTextEdit
- tst_qmessagehandler
| FALSE | evaluated 11945 times by 13 testsEvaluated by:- tst_NetworkSelfTest
- tst_QByteArray
- tst_QNetworkReply
- tst_QSslCertificate
- tst_QSslKey
- tst_QSslSocket
- tst_QSslSocket_onDemandCertificates_static
- tst_QString
- tst_QTextCodec
- tst_QTextEdit
- tst_Selftests
- tst_qlogging - unknown status
- tst_qmessagehandler
|
| 11945-38959 |
74 | return (current - cc) - skip + 1;executed 38959 times by 14 tests: return (current - cc) - skip + 1; Executed by:- tst_Collections
- tst_NetworkSelfTest
- tst_QByteArray
- tst_QByteArrayMatcher
- tst_QNetworkReply
- tst_QPrinter
- tst_QSslCertificate
- tst_QSslKey
- tst_QSslSocket
- tst_QSslSocket_onDemandCertificates_static
- tst_QString
- tst_QTextCodec
- tst_QTextEdit
- tst_qmessagehandler
| 38959 |
75 | | - |
76 | | - |
77 | | - |
78 | if (skiptable[*(current - skip)] == pl)TRUE | evaluated 4271 times by 11 testsEvaluated by:- tst_NetworkSelfTest
- tst_QNetworkReply
- tst_QSslCertificate
- tst_QSslKey
- tst_QSslSocket
- tst_QSslSocket_onDemandCertificates_static
- tst_QTextCodec
- tst_QTextEdit
- tst_Selftests
- tst_qlogging - unknown status
- tst_qmessagehandler
| FALSE | evaluated 7674 times by 9 testsEvaluated by:- tst_NetworkSelfTest
- tst_QByteArray
- tst_QNetworkReply
- tst_QSslCertificate
- tst_QSslKey
- tst_QSslSocket
- tst_QSslSocket_onDemandCertificates_static
- tst_QString
- tst_qmessagehandler
|
| 4271-7674 |
79 | skip = pl - skip;executed 4271 times by 11 tests: skip = pl - skip; Executed by:- tst_NetworkSelfTest
- tst_QNetworkReply
- tst_QSslCertificate
- tst_QSslKey
- tst_QSslSocket
- tst_QSslSocket_onDemandCertificates_static
- tst_QTextCodec
- tst_QTextEdit
- tst_Selftests
- tst_qlogging - unknown status
- tst_qmessagehandler
| 4271 |
80 | else | - |
81 | skip = 1;executed 7674 times by 9 tests: skip = 1; Executed by:- tst_NetworkSelfTest
- tst_QByteArray
- tst_QNetworkReply
- tst_QSslCertificate
- tst_QSslKey
- tst_QSslSocket
- tst_QSslSocket_onDemandCertificates_static
- tst_QString
- tst_qmessagehandler
| 7674 |
82 | } | - |
83 | if (current > end - skip)TRUE | evaluated 982 times by 8 testsEvaluated by:- tst_QByteArray
- tst_QByteArrayMatcher
- tst_QSslCertificate
- tst_QSslKey
- tst_QString
- tst_Selftests
- tst_qlogging - unknown status
- tst_qmessagehandler
| FALSE | evaluated 14140155 times by 18 testsEvaluated by:- tst_Collections
- tst_NetworkSelfTest
- tst_QByteArray
- tst_QByteArrayMatcher
- tst_QNetworkReply
- tst_QPrinter
- tst_QResourceEngine
- tst_QSslCertificate
- tst_QSslKey
- tst_QSslSocket
- tst_QSslSocket_onDemandCertificates_static
- tst_QString
- tst_QTextCodec
- tst_QTextEdit
- tst_Selftests
- tst_Spdy
- tst_qlogging - unknown status
- tst_qmessagehandler
|
| 982-14140155 |
84 | break;executed 982 times by 8 tests: break; Executed by:- tst_QByteArray
- tst_QByteArrayMatcher
- tst_QSslCertificate
- tst_QSslKey
- tst_QString
- tst_Selftests
- tst_qlogging - unknown status
- tst_qmessagehandler
| 982 |
85 | current += skip; | - |
86 | }executed 14140155 times by 18 tests: end of block Executed by:- tst_Collections
- tst_NetworkSelfTest
- tst_QByteArray
- tst_QByteArrayMatcher
- tst_QNetworkReply
- tst_QPrinter
- tst_QResourceEngine
- tst_QSslCertificate
- tst_QSslKey
- tst_QSslSocket
- tst_QSslSocket_onDemandCertificates_static
- tst_QString
- tst_QTextCodec
- tst_QTextEdit
- tst_Selftests
- tst_Spdy
- tst_qlogging - unknown status
- tst_qmessagehandler
| 14140155 |
87 | return -1; executed 3682 times by 11 tests: return -1; Executed by:- tst_Collections
- tst_QByteArray
- tst_QByteArrayMatcher
- tst_QResourceEngine
- tst_QSslCertificate
- tst_QSslKey
- tst_QString
- tst_Selftests
- tst_Spdy
- tst_qlogging - unknown status
- tst_qmessagehandler
| 3682 |
88 | } | - |
89 | | - |
90 | | - |
91 | | - |
92 | | - |
93 | | - |
94 | | - |
95 | | - |
96 | | - |
97 | | - |
98 | | - |
99 | | - |
100 | | - |
101 | | - |
102 | | - |
103 | | - |
104 | | - |
105 | | - |
106 | | - |
107 | | - |
108 | | - |
109 | | - |
110 | | - |
111 | | - |
112 | | - |
113 | | - |
114 | | - |
115 | | - |
116 | | - |
117 | | - |
118 | QByteArrayMatcher::QByteArrayMatcher() | - |
119 | : d(0) | - |
120 | { | - |
121 | p.p = 0; | - |
122 | p.l = 0; | - |
123 | memset(p.q_skiptable, 0, sizeof(p.q_skiptable)); | - |
124 | }executed 2 times by 1 test: end of block | 2 |
125 | | - |
126 | | - |
127 | | - |
128 | | - |
129 | | - |
130 | | - |
131 | QByteArrayMatcher::QByteArrayMatcher(const char *pattern, int length) | - |
132 | : d(0) | - |
133 | { | - |
134 | p.p = reinterpret_cast<const uchar *>(pattern); | - |
135 | p.l = length; | - |
136 | bm_init_skiptable(p.p, p.l, p.q_skiptable); | - |
137 | }executed 2754 times by 10 tests: end of block Executed by:- tst_Collections
- tst_QByteArray
- tst_QByteArrayMatcher
- tst_QResourceEngine
- tst_QSslCertificate
- tst_QSslKey
- tst_Selftests
- tst_Spdy
- tst_qlogging - unknown status
- tst_qmessagehandler
| 2754 |
138 | | - |
139 | | - |
140 | | - |
141 | | - |
142 | | - |
143 | QByteArrayMatcher::QByteArrayMatcher(const QByteArray &pattern) | - |
144 | : d(0), q_pattern(pattern) | - |
145 | { | - |
146 | p.p = reinterpret_cast<const uchar *>(pattern.constData()); | - |
147 | p.l = pattern.size(); | - |
148 | bm_init_skiptable(p.p, p.l, p.q_skiptable); | - |
149 | }executed 42 times by 2 tests: end of block Executed by:- tst_QByteArrayMatcher
- tst_QString
| 42 |
150 | | - |
151 | | - |
152 | | - |
153 | | - |
154 | QByteArrayMatcher::QByteArrayMatcher(const QByteArrayMatcher &other) | - |
155 | : d(0) | - |
156 | { | - |
157 | operator=(other); | - |
158 | }executed 1 time by 1 test: end of block | 1 |
159 | | - |
160 | | - |
161 | | - |
162 | | - |
163 | QByteArrayMatcher::~QByteArrayMatcher() | - |
164 | { | - |
165 | Q_UNUSED(d); | - |
166 | }executed 2801 times by 12 tests: end of block Executed by:- tst_Collections
- tst_QByteArray
- tst_QByteArrayMatcher
- tst_QResourceEngine
- tst_QSslCertificate
- tst_QSslKey
- tst_QString
- tst_Selftests
- tst_Spdy
- tst_qbytearraymatcher - unknown status
- tst_qlogging - unknown status
- tst_qmessagehandler
| 2801 |
167 | | - |
168 | | - |
169 | | - |
170 | | - |
171 | QByteArrayMatcher &QByteArrayMatcher::operator=(const QByteArrayMatcher &other) | - |
172 | { | - |
173 | q_pattern = other.q_pattern; | - |
174 | memcpy(&p, &other.p, sizeof(p)); | - |
175 | return *this;executed 5 times by 1 test: return *this; | 5 |
176 | } | - |
177 | | - |
178 | | - |
179 | | - |
180 | | - |
181 | | - |
182 | | - |
183 | | - |
184 | void QByteArrayMatcher::setPattern(const QByteArray &pattern) | - |
185 | { | - |
186 | q_pattern = pattern; | - |
187 | p.p = reinterpret_cast<const uchar *>(pattern.constData()); | - |
188 | p.l = pattern.size(); | - |
189 | bm_init_skiptable(p.p, p.l, p.q_skiptable); | - |
190 | }executed 3 times by 1 test: end of block | 3 |
191 | | - |
192 | | - |
193 | | - |
194 | | - |
195 | | - |
196 | | - |
197 | | - |
198 | | - |
199 | int QByteArrayMatcher::indexIn(const QByteArray &ba, int from) const | - |
200 | { | - |
201 | if (from < 0)TRUE | never evaluated | FALSE | evaluated 2855 times by 11 testsEvaluated by:- tst_Collections
- tst_QByteArray
- tst_QByteArrayMatcher
- tst_QResourceEngine
- tst_QSslCertificate
- tst_QSslKey
- tst_QString
- tst_Selftests
- tst_Spdy
- tst_qlogging - unknown status
- tst_qmessagehandler
|
| 0-2855 |
202 | from = 0; never executed: from = 0; | 0 |
203 | return bm_find(reinterpret_cast<const uchar *>(ba.constData()), ba.size(), from,executed 2855 times by 11 tests: return bm_find(reinterpret_cast<const uchar *>(ba.constData()), ba.size(), from, p.p, p.l, p.q_skiptable); Executed by:- tst_Collections
- tst_QByteArray
- tst_QByteArrayMatcher
- tst_QResourceEngine
- tst_QSslCertificate
- tst_QSslKey
- tst_QString
- tst_Selftests
- tst_Spdy
- tst_qlogging - unknown status
- tst_qmessagehandler
| 2855 |
204 | p.p, p.l, p.q_skiptable);executed 2855 times by 11 tests: return bm_find(reinterpret_cast<const uchar *>(ba.constData()), ba.size(), from, p.p, p.l, p.q_skiptable); Executed by:- tst_Collections
- tst_QByteArray
- tst_QByteArrayMatcher
- tst_QResourceEngine
- tst_QSslCertificate
- tst_QSslKey
- tst_QString
- tst_Selftests
- tst_Spdy
- tst_qlogging - unknown status
- tst_qmessagehandler
| 2855 |
205 | } | - |
206 | | - |
207 | | - |
208 | | - |
209 | | - |
210 | | - |
211 | | - |
212 | | - |
213 | | - |
214 | int QByteArrayMatcher::indexIn(const char *str, int len, int from) const | - |
215 | { | - |
216 | if (from < 0)TRUE | never evaluated | FALSE | evaluated 3 times by 1 test |
| 0-3 |
217 | from = 0; never executed: from = 0; | 0 |
218 | return bm_find(reinterpret_cast<const uchar *>(str), len, from,executed 3 times by 1 test: return bm_find(reinterpret_cast<const uchar *>(str), len, from, p.p, p.l, p.q_skiptable); | 3 |
219 | p.p, p.l, p.q_skiptable);executed 3 times by 1 test: return bm_find(reinterpret_cast<const uchar *>(str), len, from, p.p, p.l, p.q_skiptable); | 3 |
220 | } | - |
221 | | - |
222 | | - |
223 | | - |
224 | | - |
225 | | - |
226 | | - |
227 | | - |
228 | | - |
229 | | - |
230 | | - |
231 | | - |
232 | static int findChar(const char *str, int len, char ch, int from) | - |
233 | { | - |
234 | const uchar *s = (const uchar *)str; | - |
235 | uchar c = (uchar)ch; | - |
236 | if (from < 0)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
237 | from = qMax(from + len, 0); never executed: from = qMax(from + len, 0); | 0 |
238 | if (from < len) {TRUE | never evaluated | FALSE | never evaluated |
| 0 |
239 | const uchar *n = s + from - 1; | - |
240 | const uchar *e = s + len; | - |
241 | while (++n != e)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
242 | if (*n == c)TRUE | never evaluated | FALSE | never evaluated |
| 0 |
243 | return n - s; never executed: return n - s; | 0 |
244 | } never executed: end of block | 0 |
245 | return -1; never executed: return -1; | 0 |
246 | } | - |
247 | | - |
248 | | - |
249 | | - |
250 | | - |
251 | static int qFindByteArrayBoyerMoore( | - |
252 | const char *haystack, int haystackLen, int haystackOffset, | - |
253 | const char *needle, int needleLen) | - |
254 | { | - |
255 | uchar skiptable[256]; | - |
256 | bm_init_skiptable((const uchar *)needle, needleLen, skiptable); | - |
257 | if (haystackOffset < 0)TRUE | never evaluated | FALSE | evaluated 39791 times by 12 testsEvaluated by:- tst_NetworkSelfTest
- tst_QByteArray
- tst_QNetworkReply
- tst_QPrinter
- tst_QSslCertificate
- tst_QSslKey
- tst_QSslSocket
- tst_QSslSocket_onDemandCertificates_static
- tst_QTextCodec
- tst_QTextEdit
- tst_Selftests
- tst_qmessagehandler
|
| 0-39791 |
258 | haystackOffset = 0; never executed: haystackOffset = 0; | 0 |
259 | return bm_find((const uchar *)haystack, haystackLen, haystackOffset,executed 39791 times by 12 tests: return bm_find((const uchar *)haystack, haystackLen, haystackOffset, (const uchar *)needle, needleLen, skiptable); Executed by:- tst_NetworkSelfTest
- tst_QByteArray
- tst_QNetworkReply
- tst_QPrinter
- tst_QSslCertificate
- tst_QSslKey
- tst_QSslSocket
- tst_QSslSocket_onDemandCertificates_static
- tst_QTextCodec
- tst_QTextEdit
- tst_Selftests
- tst_qmessagehandler
| 39791 |
260 | (const uchar *)needle, needleLen, skiptable);executed 39791 times by 12 tests: return bm_find((const uchar *)haystack, haystackLen, haystackOffset, (const uchar *)needle, needleLen, skiptable); Executed by:- tst_NetworkSelfTest
- tst_QByteArray
- tst_QNetworkReply
- tst_QPrinter
- tst_QSslCertificate
- tst_QSslKey
- tst_QSslSocket
- tst_QSslSocket_onDemandCertificates_static
- tst_QTextCodec
- tst_QTextEdit
- tst_Selftests
- tst_qmessagehandler
| 39791 |
261 | } | - |
262 | | - |
263 | #define REHASH(a) \ | - |
264 | if (sl_minus_1 < sizeof(uint) * CHAR_BIT) \ | - |
265 | hashHaystack -= uint(a) << sl_minus_1; \ | - |
266 | hashHaystack <<= 1 | - |
267 | | - |
268 | | - |
269 | | - |
270 | | - |
271 | int qFindByteArray( | - |
272 | const char *haystack0, int haystackLen, int from, | - |
273 | const char *needle, int needleLen) | - |
274 | { | - |
275 | const int l = haystackLen; | - |
276 | const int sl = needleLen; | - |
277 | if (from < 0)TRUE | never evaluated | FALSE | evaluated 730530 times by 34 testsEvaluated by:- tst_Collections
- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QApplication
- tst_QByteArray
- tst_QGuiApplication
- tst_QHttpNetworkConnection
- tst_QHttpSocketEngine
- tst_QMimeData
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QOpenGlConfig
- tst_QPrinter
- tst_QSslCertificate
- tst_QSslKey
- tst_QSslSocket
- tst_QSslSocket_onDemandCertificates_member
- tst_QSslSocket_onDemandCertificates_static
- tst_QString
- tst_QTcpSocket
- tst_QTextBrowser
- tst_QTextCodec
- tst_QTextDocument
- ...
|
| 0-730530 |
278 | from += l; never executed: from += l; | 0 |
279 | if (uint(sl + from) > (uint)l)TRUE | never evaluated | FALSE | evaluated 730530 times by 34 testsEvaluated by:- tst_Collections
- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QApplication
- tst_QByteArray
- tst_QGuiApplication
- tst_QHttpNetworkConnection
- tst_QHttpSocketEngine
- tst_QMimeData
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QOpenGlConfig
- tst_QPrinter
- tst_QSslCertificate
- tst_QSslKey
- tst_QSslSocket
- tst_QSslSocket_onDemandCertificates_member
- tst_QSslSocket_onDemandCertificates_static
- tst_QString
- tst_QTcpSocket
- tst_QTextBrowser
- tst_QTextCodec
- tst_QTextDocument
- ...
|
| 0-730530 |
280 | return -1; never executed: return -1; | 0 |
281 | if (!sl)TRUE | never evaluated | FALSE | evaluated 730530 times by 34 testsEvaluated by:- tst_Collections
- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QApplication
- tst_QByteArray
- tst_QGuiApplication
- tst_QHttpNetworkConnection
- tst_QHttpSocketEngine
- tst_QMimeData
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QOpenGlConfig
- tst_QPrinter
- tst_QSslCertificate
- tst_QSslKey
- tst_QSslSocket
- tst_QSslSocket_onDemandCertificates_member
- tst_QSslSocket_onDemandCertificates_static
- tst_QString
- tst_QTcpSocket
- tst_QTextBrowser
- tst_QTextCodec
- tst_QTextDocument
- ...
|
| 0-730530 |
282 | return from; never executed: return from; | 0 |
283 | if (!l)TRUE | never evaluated | FALSE | evaluated 730530 times by 34 testsEvaluated by:- tst_Collections
- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QApplication
- tst_QByteArray
- tst_QGuiApplication
- tst_QHttpNetworkConnection
- tst_QHttpSocketEngine
- tst_QMimeData
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QOpenGlConfig
- tst_QPrinter
- tst_QSslCertificate
- tst_QSslKey
- tst_QSslSocket
- tst_QSslSocket_onDemandCertificates_member
- tst_QSslSocket_onDemandCertificates_static
- tst_QString
- tst_QTcpSocket
- tst_QTextBrowser
- tst_QTextCodec
- tst_QTextDocument
- ...
|
| 0-730530 |
284 | return -1; never executed: return -1; | 0 |
285 | | - |
286 | if (sl == 1)TRUE | never evaluated | FALSE | evaluated 730530 times by 34 testsEvaluated by:- tst_Collections
- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QApplication
- tst_QByteArray
- tst_QGuiApplication
- tst_QHttpNetworkConnection
- tst_QHttpSocketEngine
- tst_QMimeData
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QOpenGlConfig
- tst_QPrinter
- tst_QSslCertificate
- tst_QSslKey
- tst_QSslSocket
- tst_QSslSocket_onDemandCertificates_member
- tst_QSslSocket_onDemandCertificates_static
- tst_QString
- tst_QTcpSocket
- tst_QTextBrowser
- tst_QTextCodec
- tst_QTextDocument
- ...
|
| 0-730530 |
287 | return findChar(haystack0, haystackLen, needle[0], from); never executed: return findChar(haystack0, haystackLen, needle[0], from); | 0 |
288 | | - |
289 | | - |
290 | | - |
291 | | - |
292 | | - |
293 | | - |
294 | if (l > 500 && sl > 5)TRUE | evaluated 39823 times by 13 testsEvaluated by:- tst_NetworkSelfTest
- tst_QByteArray
- tst_QNetworkReply
- tst_QPrinter
- tst_QSslCertificate
- tst_QSslKey
- tst_QSslSocket
- tst_QSslSocket_onDemandCertificates_static
- tst_QTextBrowser
- tst_QTextCodec
- tst_QTextEdit
- tst_Selftests
- tst_qmessagehandler
| FALSE | evaluated 690707 times by 33 testsEvaluated by:- tst_Collections
- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QApplication
- tst_QByteArray
- tst_QGuiApplication
- tst_QHttpNetworkConnection
- tst_QHttpSocketEngine
- tst_QMimeData
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QOpenGlConfig
- tst_QSslCertificate
- tst_QSslKey
- tst_QSslSocket
- tst_QSslSocket_onDemandCertificates_member
- tst_QSslSocket_onDemandCertificates_static
- tst_QString
- tst_QTcpSocket
- tst_QTextBrowser
- tst_QTextCodec
- tst_QTextDocument
- tst_QTextEdit
- ...
|
TRUE | evaluated 39791 times by 12 testsEvaluated by:- tst_NetworkSelfTest
- tst_QByteArray
- tst_QNetworkReply
- tst_QPrinter
- tst_QSslCertificate
- tst_QSslKey
- tst_QSslSocket
- tst_QSslSocket_onDemandCertificates_static
- tst_QTextCodec
- tst_QTextEdit
- tst_Selftests
- tst_qmessagehandler
| FALSE | evaluated 32 times by 4 testsEvaluated by:- tst_QNetworkReply
- tst_QTextBrowser
- tst_QTextCodec
- tst_QTextEdit
|
| 32-690707 |
295 | return qFindByteArrayBoyerMoore(haystack0, haystackLen, from,executed 39791 times by 12 tests: return qFindByteArrayBoyerMoore(haystack0, haystackLen, from, needle, needleLen); Executed by:- tst_NetworkSelfTest
- tst_QByteArray
- tst_QNetworkReply
- tst_QPrinter
- tst_QSslCertificate
- tst_QSslKey
- tst_QSslSocket
- tst_QSslSocket_onDemandCertificates_static
- tst_QTextCodec
- tst_QTextEdit
- tst_Selftests
- tst_qmessagehandler
| 39791 |
296 | needle, needleLen);executed 39791 times by 12 tests: return qFindByteArrayBoyerMoore(haystack0, haystackLen, from, needle, needleLen); Executed by:- tst_NetworkSelfTest
- tst_QByteArray
- tst_QNetworkReply
- tst_QPrinter
- tst_QSslCertificate
- tst_QSslKey
- tst_QSslSocket
- tst_QSslSocket_onDemandCertificates_static
- tst_QTextCodec
- tst_QTextEdit
- tst_Selftests
- tst_qmessagehandler
| 39791 |
297 | | - |
298 | | - |
299 | | - |
300 | | - |
301 | | - |
302 | | - |
303 | const char *haystack = haystack0 + from; | - |
304 | const char *end = haystack0 + (l - sl); | - |
305 | const uint sl_minus_1 = sl - 1; | - |
306 | uint hashNeedle = 0, hashHaystack = 0; | - |
307 | int idx; | - |
308 | for (idx = 0; idx < sl; ++idx) {TRUE | evaluated 4905989 times by 33 testsEvaluated by:- tst_Collections
- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QApplication
- tst_QByteArray
- tst_QGuiApplication
- tst_QHttpNetworkConnection
- tst_QHttpSocketEngine
- tst_QMimeData
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QOpenGlConfig
- tst_QSslCertificate
- tst_QSslKey
- tst_QSslSocket
- tst_QSslSocket_onDemandCertificates_member
- tst_QSslSocket_onDemandCertificates_static
- tst_QString
- tst_QTcpSocket
- tst_QTextBrowser
- tst_QTextCodec
- tst_QTextDocument
- tst_QTextEdit
- ...
| FALSE | evaluated 690739 times by 33 testsEvaluated by:- tst_Collections
- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QApplication
- tst_QByteArray
- tst_QGuiApplication
- tst_QHttpNetworkConnection
- tst_QHttpSocketEngine
- tst_QMimeData
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QOpenGlConfig
- tst_QSslCertificate
- tst_QSslKey
- tst_QSslSocket
- tst_QSslSocket_onDemandCertificates_member
- tst_QSslSocket_onDemandCertificates_static
- tst_QString
- tst_QTcpSocket
- tst_QTextBrowser
- tst_QTextCodec
- tst_QTextDocument
- tst_QTextEdit
- ...
|
| 690739-4905989 |
309 | hashNeedle = ((hashNeedle<<1) + needle[idx]); | - |
310 | hashHaystack = ((hashHaystack<<1) + haystack[idx]); | - |
311 | }executed 4905989 times by 33 tests: end of block Executed by:- tst_Collections
- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QApplication
- tst_QByteArray
- tst_QGuiApplication
- tst_QHttpNetworkConnection
- tst_QHttpSocketEngine
- tst_QMimeData
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QOpenGlConfig
- tst_QSslCertificate
- tst_QSslKey
- tst_QSslSocket
- tst_QSslSocket_onDemandCertificates_member
- tst_QSslSocket_onDemandCertificates_static
- tst_QString
- tst_QTcpSocket
- tst_QTextBrowser
- tst_QTextCodec
- tst_QTextDocument
- tst_QTextEdit
- ...
| 4905989 |
312 | hashHaystack -= *(haystack + sl_minus_1); | - |
313 | | - |
314 | while (haystack <= end) {TRUE | evaluated 19519443 times by 33 testsEvaluated by:- tst_Collections
- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QApplication
- tst_QByteArray
- tst_QGuiApplication
- tst_QHttpNetworkConnection
- tst_QHttpSocketEngine
- tst_QMimeData
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QOpenGlConfig
- tst_QSslCertificate
- tst_QSslKey
- tst_QSslSocket
- tst_QSslSocket_onDemandCertificates_member
- tst_QSslSocket_onDemandCertificates_static
- tst_QString
- tst_QTcpSocket
- tst_QTextBrowser
- tst_QTextCodec
- tst_QTextDocument
- tst_QTextEdit
- ...
| FALSE | evaluated 569544 times by 22 testsEvaluated by:- tst_Collections
- tst_QAbstractNetworkCache
- tst_QApplication
- tst_QByteArray
- tst_QGuiApplication
- tst_QHttpNetworkConnection
- tst_QHttpSocketEngine
- tst_QMimeData
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QSslCertificate
- tst_QSslKey
- tst_QString
- tst_QTextBrowser
- tst_QTextCodec
- tst_Selftests
- tst_Spdy
- tst_qapplication - unknown status
- tst_qmessagehandler
- tst_qprocess - unknown status
- tst_selftests - unknown status
|
| 569544-19519443 |
315 | hashHaystack += *(haystack + sl_minus_1); | - |
316 | if (hashHaystack == hashNeedle && *needle == *haystackTRUE | evaluated 121219 times by 25 testsEvaluated by:- tst_Collections
- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QByteArray
- tst_QHttpNetworkConnection
- tst_QHttpSocketEngine
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QOpenGlConfig
- tst_QSslCertificate
- tst_QSslKey
- tst_QSslSocket
- tst_QSslSocket_onDemandCertificates_member
- tst_QSslSocket_onDemandCertificates_static
- tst_QString
- tst_QTcpSocket
- tst_QTextBrowser
- tst_QTextCodec
- tst_QTextDocument
- tst_QTextEdit
- tst_QXmlStream
- tst_Selftests
- tst_Spdy
- tst_qmake
- tst_qmessagehandler
| FALSE | evaluated 19398224 times by 29 testsEvaluated by:- tst_Collections
- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QApplication
- tst_QByteArray
- tst_QGuiApplication
- tst_QHttpNetworkConnection
- tst_QHttpSocketEngine
- tst_QMimeData
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QOpenGlConfig
- tst_QSslCertificate
- tst_QSslKey
- tst_QString
- tst_QTextBrowser
- tst_QTextCodec
- tst_QTextDocument
- tst_QTextEdit
- tst_QXmlStream
- tst_Selftests
- tst_Spdy
- tst_qapplication - unknown status
- ...
|
TRUE | evaluated 121197 times by 24 testsEvaluated by:- tst_Collections
- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QByteArray
- tst_QHttpNetworkConnection
- tst_QHttpSocketEngine
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QOpenGlConfig
- tst_QSslCertificate
- tst_QSslKey
- tst_QSslSocket
- tst_QSslSocket_onDemandCertificates_member
- tst_QSslSocket_onDemandCertificates_static
- tst_QString
- tst_QTcpSocket
- tst_QTextCodec
- tst_QTextDocument
- tst_QTextEdit
- tst_QXmlStream
- tst_Selftests
- tst_Spdy
- tst_qmake
- tst_qmessagehandler
| FALSE | evaluated 22 times by 1 test |
| 22-19398224 |
317 | && memcmp(needle, haystack, sl) == 0)TRUE | evaluated 121195 times by 24 testsEvaluated by:- tst_Collections
- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QByteArray
- tst_QHttpNetworkConnection
- tst_QHttpSocketEngine
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QOpenGlConfig
- tst_QSslCertificate
- tst_QSslKey
- tst_QSslSocket
- tst_QSslSocket_onDemandCertificates_member
- tst_QSslSocket_onDemandCertificates_static
- tst_QString
- tst_QTcpSocket
- tst_QTextCodec
- tst_QTextDocument
- tst_QTextEdit
- tst_QXmlStream
- tst_Selftests
- tst_Spdy
- tst_qmake
- tst_qmessagehandler
| FALSE | evaluated 2 times by 1 test |
| 2-121195 |
318 | return haystack - haystack0;executed 121195 times by 24 tests: return haystack - haystack0; Executed by:- tst_Collections
- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QByteArray
- tst_QHttpNetworkConnection
- tst_QHttpSocketEngine
- tst_QNetworkDiskCache
- tst_QNetworkReply
- tst_QOpenGlConfig
- tst_QSslCertificate
- tst_QSslKey
- tst_QSslSocket
- tst_QSslSocket_onDemandCertificates_member
- tst_QSslSocket_onDemandCertificates_static
- tst_QString
- tst_QTcpSocket
- tst_QTextCodec
- tst_QTextDocument
- tst_QTextEdit
- tst_QXmlStream
- tst_Selftests
- tst_Spdy
- tst_qmake
- tst_qmessagehandler
| 121195 |
319 | | - |
320 | REHASH(*haystack);executed 19396717 times by 28 tests: hashHaystack -= uint(*haystack) << sl_minus_1; Executed by:- tst_Collections
- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QApplication
- tst_QByteArray
- tst_QGuiApplication
- tst_QHttpNetworkConnection
- tst_QHttpSocketEngine
- tst_QMimeData
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QSslCertificate
- tst_QSslKey
- tst_QString
- tst_QTextBrowser
- tst_QTextCodec
- tst_QTextDocument
- tst_QTextEdit
- tst_QXmlStream
- tst_Selftests
- tst_Spdy
- tst_qapplication - unknown status
- tst_qmake
- ...
TRUE | evaluated 19396717 times by 28 testsEvaluated by:- tst_Collections
- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QApplication
- tst_QByteArray
- tst_QGuiApplication
- tst_QHttpNetworkConnection
- tst_QHttpSocketEngine
- tst_QMimeData
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QSslCertificate
- tst_QSslKey
- tst_QString
- tst_QTextBrowser
- tst_QTextCodec
- tst_QTextDocument
- tst_QTextEdit
- tst_QXmlStream
- tst_Selftests
- tst_Spdy
- tst_qapplication - unknown status
- tst_qmake
- ...
| FALSE | evaluated 1531 times by 3 testsEvaluated by:- tst_QOpenGlConfig
- tst_QString
- tst_qmessagehandler
|
| 1531-19396717 |
321 | ++haystack; | - |
322 | }executed 19398248 times by 29 tests: end of block Executed by:- tst_Collections
- tst_NetworkSelfTest
- tst_QAbstractNetworkCache
- tst_QApplication
- tst_QByteArray
- tst_QGuiApplication
- tst_QHttpNetworkConnection
- tst_QHttpSocketEngine
- tst_QMimeData
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkDiskCache
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QOpenGlConfig
- tst_QSslCertificate
- tst_QSslKey
- tst_QString
- tst_QTextBrowser
- tst_QTextCodec
- tst_QTextDocument
- tst_QTextEdit
- tst_QXmlStream
- tst_Selftests
- tst_Spdy
- tst_qapplication - unknown status
- ...
| 19398248 |
323 | return -1;executed 569544 times by 22 tests: return -1; Executed by:- tst_Collections
- tst_QAbstractNetworkCache
- tst_QApplication
- tst_QByteArray
- tst_QGuiApplication
- tst_QHttpNetworkConnection
- tst_QHttpSocketEngine
- tst_QMimeData
- tst_QNetworkAccessManager_And_QProgressDialog
- tst_QNetworkProxyFactory
- tst_QNetworkReply
- tst_QSslCertificate
- tst_QSslKey
- tst_QString
- tst_QTextBrowser
- tst_QTextCodec
- tst_Selftests
- tst_Spdy
- tst_qapplication - unknown status
- tst_qmessagehandler
- tst_qprocess - unknown status
- tst_selftests - unknown status
| 569544 |
324 | } | - |
325 | | - |
326 | QT_END_NAMESPACE | - |
| | |