Merge lp:~zorba-coders/zorba/bug-896426 into lp:zorba
- bug-896426
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Chris Hillery |
Approved revision: | 10558 |
Merged at revision: | 10634 |
Proposed branch: | lp:~zorba-coders/zorba/bug-896426 |
Merge into: | lp:zorba |
Diff against target: |
616 lines (+99/-62) 19 files modified
src/unit_tests/CMakeLists.txt (+19/-1) src/unit_tests/stemmer.cpp (+8/-1) src/unit_tests/string.cpp (+10/-1) src/unit_tests/string_instantiate.cpp (+8/-1) src/unit_tests/thesaurus.cpp (+8/-1) src/unit_tests/tokenizer.cpp (+8/-1) src/unit_tests/unique_ptr.cpp (+7/-1) src/unit_tests/unit_test_list.h (+8/-3) src/unit_tests/unit_tests.cpp (+9/-1) src/util/ascii_util.h (+1/-6) src/util/regex.h (+2/-2) src/util/regex_ascii.h (+0/-2) src/util/string_util.h (+0/-2) src/util/unicode_util.h (+0/-9) src/util/uri_util.h (+2/-2) src/util/utf8_util.h (+0/-5) src/util/utf8_util_base.h (+0/-12) src/util/xml_util.h (+0/-1) test/unit/CMakeLists.txt (+9/-10) |
To merge this branch: | bzr merge lp:~zorba-coders/zorba/bug-896426 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Chris Hillery | Approve | ||
Paul J. Lucas | Approve | ||
Matthias Brantner | Needs Information | ||
Review via email: mp+83885@code.launchpad.net |
Commit message
Migrated several unit tests to libunittest.
Description of the change
Matthias Brantner (matthias-brantner) wrote : | # |
Paul J. Lucas (paul-lucas) wrote : | # |
It's not critical. I was hoping that Chris would have migrated more unit tests.
Chris Hillery (ceejatec) wrote : | # |
No reason not to incorporate these changes, though; I'm starting the remote queue for them (probably the branch will need to be updated from the trunk).
Zorba Build Bot (zorba-buildbot) wrote : | # |
Attempt to merge into lp:zorba failed due to conflicts:
text conflict in src/unit_
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue starting for merge proposal.
Log at: http://
Zorba Build Bot (zorba-buildbot) wrote : | # |
The attempt to merge lp:~zorba-coders/zorba/bug-896426 into lp:zorba failed. Below is the output from the failed tests.
CMake Error at /home/ceej/
Validation queue job bug-896426-2012-01-
final status was:
No tests were run - build or configure step must have failed.
Not commiting changes.
Error in read script: /home/ceej/
Chris Hillery (ceejatec) wrote : | # |
I killed the validation queue job above. It was doomed to fail because of a mistaken merge to the trunk. I am correcting the trunk and will re-start the validation queue for this proposal when it is fixed.
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue starting for merge proposal.
Log at: http://
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue job bug-896426-2012-01-
All tests succeeded!
Zorba Build Bot (zorba-buildbot) wrote : | # |
Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1. Got: 1 Needs Information, 1 Pending.
Paul J. Lucas (paul-lucas) : | # |
Chris Hillery (ceejatec) : | # |
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue starting for merge proposal.
Log at: http://
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue job bug-896426-2012-01-
All tests succeeded!
Paul J. Lucas (paul-lucas) wrote : | # |
Uhm.... I don't think it was ever the intention to move *all* unit tests from test/unit to src/unit_tests. Tests that test things that are *supposed* to be in the public API (as opposed to things declared ZORBA_DLL_PUBLIC just so they'd link) should *stay* in test/unit, e.g., stemmer.cpp, tokenizer.cpp, thesaurus.cpp.
Preview Diff
1 | === modified file 'src/unit_tests/CMakeLists.txt' |
2 | --- src/unit_tests/CMakeLists.txt 2011-12-21 14:40:33 +0000 |
3 | +++ src/unit_tests/CMakeLists.txt 2012-01-19 09:11:24 +0000 |
4 | @@ -14,6 +14,24 @@ |
5 | |
6 | |
7 | SET(UNIT_TEST_SRCS |
8 | + string_instantiate.cpp |
9 | + string.cpp |
10 | + test_uri.cpp |
11 | + unique_ptr.cpp |
12 | unit_tests.cpp |
13 | - test_uri.cpp |
14 | ) |
15 | + |
16 | +IF (NOT ZORBA_NO_FULL_TEXT) |
17 | + LIST (APPEND UNIT_TEST_SRCS |
18 | + stemmer.cpp |
19 | + thesaurus.cpp |
20 | + tokenizer.cpp) |
21 | +ENDIF (NOT ZORBA_NO_FULL_TEXT) |
22 | + |
23 | +IF(ZORBA_WITH_DEBUGGER) |
24 | + LIST(APPEND UNIT_TEST_SRCS |
25 | +# test_debugger_protocol.cpp |
26 | + ) |
27 | +ENDIF(ZORBA_WITH_DEBUGGER) |
28 | + |
29 | +# vim:set et sw=2 tw=2: |
30 | |
31 | === renamed file 'test/unit/stemmer.cpp' => 'src/unit_tests/stemmer.cpp' |
32 | --- test/unit/stemmer.cpp 2011-08-25 15:54:19 +0000 |
33 | +++ src/unit_tests/stemmer.cpp 2012-01-19 09:11:24 +0000 |
34 | @@ -74,7 +74,10 @@ |
35 | |
36 | /////////////////////////////////////////////////////////////////////////////// |
37 | |
38 | -int stemmer( int argc, char *argv[] ) { |
39 | +namespace zorba { |
40 | +namespace UnitTests { |
41 | + |
42 | +int test_stemmer( int argc, char *argv[] ) { |
43 | void *const zstore = StoreManager::getStore(); |
44 | Zorba *const zorba = Zorba::getInstance( zstore ); |
45 | |
46 | @@ -113,4 +116,8 @@ |
47 | StoreManager::shutdownStore( zstore ); |
48 | return result; |
49 | } |
50 | + |
51 | +} // namespace UnitTests |
52 | +} // namespace zorba |
53 | + |
54 | /* vim:set et sw=2 ts=2: */ |
55 | |
56 | === renamed file 'test/unit/string_test.cpp' => 'src/unit_tests/string.cpp' |
57 | --- test/unit/string_test.cpp 2011-08-24 12:48:09 +0000 |
58 | +++ src/unit_tests/string.cpp 2012-01-19 09:11:24 +0000 |
59 | @@ -778,7 +778,12 @@ |
60 | ASSERT_TRUE( xml::parse_entity( "&", &c ) == -1 ); |
61 | } |
62 | |
63 | -int string_test( int, char*[] ) { |
64 | +/////////////////////////////////////////////////////////////////////////////// |
65 | + |
66 | +namespace zorba { |
67 | +namespace UnitTests { |
68 | + |
69 | +int test_string( int, char*[] ) { |
70 | |
71 | ////////// basic string functionality /////////////////////////////////////// |
72 | |
73 | @@ -898,4 +903,8 @@ |
74 | cout << failures << " test(s) failed\n"; |
75 | return failures ? 1 : 0; |
76 | } |
77 | + |
78 | +} // namespace UnitTests |
79 | +} // namespace zorba |
80 | + |
81 | /* vim:set et sw=2 ts=2: */ |
82 | |
83 | === renamed file 'test/unit/string_instantiate.cpp' => 'src/unit_tests/string_instantiate.cpp' |
84 | --- test/unit/string_instantiate.cpp 2011-06-14 17:26:33 +0000 |
85 | +++ src/unit_tests/string_instantiate.cpp 2012-01-19 09:11:24 +0000 |
86 | @@ -547,7 +547,10 @@ |
87 | |
88 | /////////////////////////////////////////////////////////////////////////////// |
89 | |
90 | -int string_instantiate( int, char*[] ) { |
91 | +namespace zorba { |
92 | +namespace UnitTests { |
93 | + |
94 | +int test_string_instantiate( int, char*[] ) { |
95 | return 0; // don't actually call anything |
96 | |
97 | instantiate_common<zstring>(); |
98 | @@ -570,4 +573,8 @@ |
99 | |
100 | return 0; |
101 | } |
102 | + |
103 | +} // namespace UnitTests |
104 | +} // namespace zorba |
105 | + |
106 | /* vim:set et sw=2 ts=2: */ |
107 | |
108 | === renamed file 'test/unit/thesaurus.cpp' => 'src/unit_tests/thesaurus.cpp' |
109 | --- test/unit/thesaurus.cpp 2011-10-24 23:26:11 +0000 |
110 | +++ src/unit_tests/thesaurus.cpp 2012-01-19 09:11:24 +0000 |
111 | @@ -118,7 +118,10 @@ |
112 | |
113 | /////////////////////////////////////////////////////////////////////////////// |
114 | |
115 | -int thesaurus( int argc, char *argv[] ) { |
116 | +namespace zorba { |
117 | +namespace UnitTests { |
118 | + |
119 | +int test_thesaurus( int argc, char *argv[] ) { |
120 | void *const zstore = StoreManager::getStore(); |
121 | Zorba *const zorba = Zorba::getInstance( zstore ); |
122 | |
123 | @@ -157,4 +160,8 @@ |
124 | StoreManager::shutdownStore( zstore ); |
125 | return result; |
126 | } |
127 | + |
128 | +} // namespace UnitTests |
129 | +} // namespace zorba |
130 | + |
131 | /* vim:set et sw=2 ts=2: */ |
132 | |
133 | === renamed file 'test/unit/tokenizer.cpp' => 'src/unit_tests/tokenizer.cpp' |
134 | --- test/unit/tokenizer.cpp 2011-08-31 01:59:30 +0000 |
135 | +++ src/unit_tests/tokenizer.cpp 2012-01-19 09:11:24 +0000 |
136 | @@ -341,7 +341,10 @@ |
137 | |
138 | /////////////////////////////////////////////////////////////////////////////// |
139 | |
140 | -int tokenizer( int argc, char *argv[] ) { |
141 | +namespace zorba { |
142 | +namespace UnitTests { |
143 | + |
144 | +int test_tokenizer( int argc, char *argv[] ) { |
145 | int result = 0; |
146 | |
147 | void *const zstore = StoreManager::getStore(); |
148 | @@ -389,4 +392,8 @@ |
149 | StoreManager::shutdownStore( zstore ); |
150 | return result; |
151 | } |
152 | + |
153 | +} // namespace UnitTests |
154 | +} // namespace zorba |
155 | + |
156 | /* vim:set et sw=2 ts=2: */ |
157 | |
158 | === renamed file 'test/unit/unique_ptr.cpp' => 'src/unit_tests/unique_ptr.cpp' |
159 | --- test/unit/unique_ptr.cpp 2011-08-27 14:57:52 +0000 |
160 | +++ src/unit_tests/unique_ptr.cpp 2012-01-19 09:11:24 +0000 |
161 | @@ -221,7 +221,10 @@ |
162 | |
163 | /////////////////////////////////////////////////////////////////////////////// |
164 | |
165 | -int unique_ptr( int, char*[] ) { |
166 | +namespace zorba { |
167 | +namespace UnitTests { |
168 | + |
169 | +int test_unique_ptr( int, char*[] ) { |
170 | compile_test(); |
171 | test_array(); |
172 | test_basic(); |
173 | @@ -239,6 +242,9 @@ |
174 | return failures ? 1 : 0; |
175 | } |
176 | |
177 | +} // namespace UnitTests |
178 | +} // namespace zorba |
179 | + |
180 | /////////////////////////////////////////////////////////////////////////////// |
181 | |
182 | /* vim:set et sw=2 ts=2: */ |
183 | |
184 | === modified file 'src/unit_tests/unit_test_list.h' |
185 | --- src/unit_tests/unit_test_list.h 2011-06-14 17:26:33 +0000 |
186 | +++ src/unit_tests/unit_test_list.h 2012-01-19 09:11:24 +0000 |
187 | @@ -17,19 +17,24 @@ |
188 | #ifndef ZORBA_UNIT_TEST_LIST_H |
189 | #define ZORBA_UNIT_TEST_LIST_H |
190 | |
191 | -#include <iostream> |
192 | - |
193 | +#include <zorba/config.h> |
194 | |
195 | namespace zorba { |
196 | |
197 | namespace UnitTests { |
198 | int runUriTest(int argc, char* argv[]); |
199 | int runDebuggerProtocolTest(int argc, char* argv[]); |
200 | + int test_string( int, char*[] ); |
201 | + int test_unique_ptr( int, char*[] ); |
202 | +#ifndef ZORBA_NO_FULL_TEXT |
203 | + int test_stemmer( int, char*[] ); |
204 | + int test_thesaurus( int, char*[] ); |
205 | + int test_tokenizer( int, char*[] ); |
206 | +#endif /* ZORBA_NO_FULL_TEXT */ |
207 | /** |
208 | * ADD NEW UNIT TESTS HERE |
209 | */ |
210 | |
211 | - |
212 | void initializeTestList(); |
213 | }; |
214 | |
215 | |
216 | === modified file 'src/unit_tests/unit_tests.cpp' |
217 | --- src/unit_tests/unit_tests.cpp 2011-06-14 17:26:33 +0000 |
218 | +++ src/unit_tests/unit_tests.cpp 2012-01-19 09:11:24 +0000 |
219 | @@ -37,10 +37,18 @@ |
220 | * ADD NEW UNIT TESTS HERE |
221 | */ |
222 | void initializeTestList() { |
223 | + libunittests["string"] = test_string; |
224 | libunittests["uri"] = runUriTest; |
225 | + libunittests["unique_ptr"] = test_unique_ptr; |
226 | +#ifndef ZORBA_NO_FULL_TEXT |
227 | + libunittests["stemmer"] = test_stemmer; |
228 | + libunittests["thesaurus"] = test_thesaurus; |
229 | + libunittests["tokenizer"] = test_tokenizer; |
230 | +#endif /* ZORBA_NO_FULL_TEXT */ |
231 | + |
232 | #ifdef ZORBA_WITH_DEBUGGER |
233 | // libunittests["debugger_protocol"] = runDebuggerProtocolTest; |
234 | -#endif |
235 | +#endif /* ZORBA_WITH_DEBUGGER */ |
236 | } |
237 | |
238 | int runUnitTest(int argc, char* argv[]) { |
239 | |
240 | === modified file 'src/util/ascii_util.h' |
241 | --- src/util/ascii_util.h 2011-06-19 16:17:46 +0000 |
242 | +++ src/util/ascii_util.h 2012-01-19 09:11:24 +0000 |
243 | @@ -22,8 +22,6 @@ |
244 | #include <cstddef> |
245 | #include <cstring> |
246 | |
247 | -#include <zorba/config.h> |
248 | - |
249 | #include "stl_util.h" |
250 | |
251 | namespace zorba { |
252 | @@ -205,7 +203,7 @@ |
253 | * @param s The NULL-terminated C string to check. |
254 | * @return Returns \c true only if the entire string is whitespace. |
255 | */ |
256 | -ZORBA_DLL_PUBLIC bool is_whitespace( char const *s ); |
257 | +bool is_whitespace( char const *s ); |
258 | |
259 | /** |
260 | * Checks whether an entire string is whitespace. |
261 | @@ -684,7 +682,6 @@ |
262 | * @return Returns a pointer to the first character in \a s that is not among |
263 | * the characters in \a chars. |
264 | */ |
265 | -ZORBA_DLL_PUBLIC |
266 | char const* trim_start( char const *s, char const *chars ); |
267 | |
268 | /** |
269 | @@ -696,7 +693,6 @@ |
270 | * @return Returns a pointer to the first character in \a s that is not among |
271 | * the characters in \a chars. |
272 | */ |
273 | -ZORBA_DLL_PUBLIC |
274 | char const* trim_start( char const *s, size_type s_len, char const *chars ); |
275 | |
276 | /** |
277 | @@ -782,7 +778,6 @@ |
278 | * @param chars The characters to trim. |
279 | * @return Returns the new length of \a s. |
280 | */ |
281 | -ZORBA_DLL_PUBLIC |
282 | size_type trim_end( char const *s, size_type s_len, char const *chars ); |
283 | |
284 | /** |
285 | |
286 | === modified file 'src/util/regex.h' |
287 | --- src/util/regex.h 2011-07-18 14:25:21 +0000 |
288 | +++ src/util/regex.h 2012-01-19 09:11:24 +0000 |
289 | @@ -48,7 +48,7 @@ |
290 | /** |
291 | * The %regex class wraps the underlying Unicode regular expression library. |
292 | */ |
293 | -class ZORBA_DLL_PUBLIC regex { |
294 | +class regex { |
295 | public: |
296 | /** |
297 | * Constructs a %regex. |
298 | @@ -520,7 +520,7 @@ |
299 | /** |
300 | * The %regex class wraps the underlying Unicode regular expression library. |
301 | */ |
302 | -class ZORBA_DLL_PUBLIC regex { |
303 | +class regex { |
304 | public: |
305 | /** |
306 | * Constructs a %regex. |
307 | |
308 | === modified file 'src/util/regex_ascii.h' |
309 | --- src/util/regex_ascii.h 2011-07-18 14:25:21 +0000 |
310 | +++ src/util/regex_ascii.h 2012-01-19 09:11:24 +0000 |
311 | @@ -20,8 +20,6 @@ |
312 | #include <list> |
313 | #include <vector> |
314 | |
315 | -#include <zorba/config.h> |
316 | - |
317 | namespace zorba { |
318 | namespace regex_ascii{ |
319 | |
320 | |
321 | === modified file 'src/util/string_util.h' |
322 | --- src/util/string_util.h 2012-01-11 17:30:25 +0000 |
323 | +++ src/util/string_util.h 2012-01-19 09:11:24 +0000 |
324 | @@ -561,7 +561,6 @@ |
325 | * sufficient size. |
326 | * @return Returns \a buf for convenience. |
327 | */ |
328 | -ZORBA_DLL_PUBLIC |
329 | char* itoa( long long n, char *buf ); |
330 | |
331 | /** |
332 | @@ -632,7 +631,6 @@ |
333 | * sufficient size. |
334 | * @return Returns \a buf for convenience. |
335 | */ |
336 | -ZORBA_DLL_PUBLIC |
337 | char* itoa( unsigned long long n, char *buf ); |
338 | |
339 | /** |
340 | |
341 | === modified file 'src/util/unicode_util.h' |
342 | --- src/util/unicode_util.h 2011-12-21 14:40:33 +0000 |
343 | +++ src/util/unicode_util.h 2012-01-19 09:11:24 +0000 |
344 | @@ -78,7 +78,6 @@ |
345 | * @return Returns \c true only if the character is invalid in an IRI. |
346 | * See RFC 3987. |
347 | */ |
348 | -ZORBA_DLL_PUBLIC |
349 | bool is_invalid_in_iri( code_point c ); |
350 | |
351 | /** |
352 | @@ -88,7 +87,6 @@ |
353 | * @return Returns \c true only if the character is a "iprivate". |
354 | * See RFC 3987. |
355 | */ |
356 | -ZORBA_DLL_PUBLIC |
357 | bool is_iprivate( code_point c ); |
358 | |
359 | /** |
360 | @@ -114,7 +112,6 @@ |
361 | * @return Returns \c true only if the character is a "ucschar". |
362 | * See RFC 3987. |
363 | */ |
364 | -ZORBA_DLL_PUBLIC |
365 | bool is_ucschar( code_point c ); |
366 | |
367 | /** |
368 | @@ -138,7 +135,6 @@ |
369 | * @param c The character. |
370 | * @return Returns \c true only if the character is lower-case. |
371 | */ |
372 | -ZORBA_DLL_PUBLIC |
373 | bool is_lower( code_point c ); |
374 | |
375 | /** |
376 | @@ -147,7 +143,6 @@ |
377 | * @param c The character. |
378 | * @return Returns \c true only if the character is upper-case. |
379 | */ |
380 | -ZORBA_DLL_PUBLIC |
381 | bool is_upper( code_point c ); |
382 | |
383 | /** |
384 | @@ -157,7 +152,6 @@ |
385 | * @return Returns the given character converted to lower-case or the original |
386 | * character if either it was already lower-case or not a letter. |
387 | */ |
388 | -ZORBA_DLL_PUBLIC |
389 | code_point to_lower( code_point c ); |
390 | |
391 | /** |
392 | @@ -167,7 +161,6 @@ |
393 | * @return Returns the given character converted to upper-case or the original |
394 | * character if either it was already upper-case or not a letter. |
395 | */ |
396 | -ZORBA_DLL_PUBLIC |
397 | code_point to_upper( code_point c ); |
398 | |
399 | ////////// normalization ////////////////////////////////////////////////////// |
400 | @@ -179,7 +172,6 @@ |
401 | * @param out The normalized string. It is overwritten. |
402 | * @return Returns \c true only if the normalization succeeded. |
403 | */ |
404 | -ZORBA_DLL_PUBLIC |
405 | bool normalize( string const &in, normalization::type n, string *out ); |
406 | |
407 | ////////// string conversion ////////////////////////////////////////////////// |
408 | @@ -214,7 +206,6 @@ |
409 | * @param out The Unicode string result. |
410 | * @return Returns \c true only if the conversion succeeded. |
411 | */ |
412 | -ZORBA_DLL_PUBLIC |
413 | bool to_string( char const *in, size_type in_len, string *out ); |
414 | |
415 | /** |
416 | |
417 | === modified file 'src/util/uri_util.h' |
418 | --- src/util/uri_util.h 2011-07-17 20:05:49 +0000 |
419 | +++ src/util/uri_util.h 2012-01-19 09:11:24 +0000 |
420 | @@ -80,8 +80,8 @@ |
421 | |
422 | ////////// Encoding /////////////////////////////////////////////////////////// |
423 | |
424 | -ZORBA_DLL_PUBLIC extern char const uri_safe[]; |
425 | -ZORBA_DLL_PUBLIC extern signed char const hex2dec[]; |
426 | +extern char const uri_safe[]; |
427 | +extern signed char const hex2dec[]; |
428 | |
429 | /** |
430 | * A %back_insert_iterator can be used to append characters to a string |
431 | |
432 | === modified file 'src/util/utf8_util.h' |
433 | --- src/util/utf8_util.h 2011-07-17 20:05:49 +0000 |
434 | +++ src/util/utf8_util.h 2012-01-19 09:11:24 +0000 |
435 | @@ -21,8 +21,6 @@ |
436 | #include <cwchar> |
437 | #include <string> |
438 | |
439 | -#include <zorba/config.h> |
440 | - |
441 | #include "ascii_util.h" |
442 | #include "cxx_util.h" |
443 | #include "unicode_util.h" |
444 | @@ -319,7 +317,6 @@ |
445 | * the UTF-8 string are put here. |
446 | * @return Returns \c true only if the conversion succeeded. |
447 | */ |
448 | -ZORBA_DLL_PUBLIC |
449 | bool to_string( unicode::char_type const *in, unicode::size_type in_len, |
450 | storage_type **out, size_type *out_len = nullptr ); |
451 | |
452 | @@ -406,7 +403,6 @@ |
453 | * the UTF-8 string are put here. |
454 | * @return Returns \c true only if the conversion succeeded. |
455 | */ |
456 | -ZORBA_DLL_PUBLIC |
457 | bool to_string( wchar_t const *in, size_type in_len, storage_type **out, |
458 | size_type *out_len = nullptr ); |
459 | |
460 | @@ -476,7 +472,6 @@ |
461 | * the wchar_t string are put here. |
462 | * @return Returns \c true only if the conversion succeeded. |
463 | */ |
464 | -ZORBA_DLL_PUBLIC |
465 | bool to_wchar_t( storage_type const *in, size_type in_len, wchar_t **out, |
466 | unicode::size_type *out_len ); |
467 | |
468 | |
469 | === modified file 'src/util/utf8_util_base.h' |
470 | --- src/util/utf8_util_base.h 2011-12-21 14:40:33 +0000 |
471 | +++ src/util/utf8_util_base.h 2012-01-19 09:11:24 +0000 |
472 | @@ -22,8 +22,6 @@ |
473 | #include <iterator> |
474 | #include <stdexcept> |
475 | |
476 | -#include <zorba/config.h> |
477 | - |
478 | #include "unicode_util.h" |
479 | |
480 | namespace zorba { |
481 | @@ -63,7 +61,6 @@ |
482 | * @param char_pos The character position. |
483 | * @return Returns the corresponding byte position. |
484 | */ |
485 | -ZORBA_DLL_PUBLIC |
486 | size_type byte_pos( storage_type const *s, size_type char_pos ); |
487 | |
488 | /** |
489 | @@ -75,7 +72,6 @@ |
490 | * @return Returns the corresponding byte position or \c npos if the result >= |
491 | * \a s_size. |
492 | */ |
493 | -ZORBA_DLL_PUBLIC |
494 | size_type byte_pos( storage_type const *s, size_type s_size, |
495 | size_type char_pos ); |
496 | |
497 | @@ -86,7 +82,6 @@ |
498 | * @param p A pointer to somewhere within \a s. |
499 | * @return Returns said offset. |
500 | */ |
501 | -ZORBA_DLL_PUBLIC |
502 | size_type char_pos( storage_type const *s, storage_type const *p ); |
503 | |
504 | /** |
505 | @@ -111,7 +106,6 @@ |
506 | * character. |
507 | * @return Returns the number of bytes required to encode the character. |
508 | */ |
509 | -ZORBA_DLL_PUBLIC |
510 | size_type encode( unicode::code_point c, storage_type **ps ); |
511 | |
512 | /** |
513 | @@ -149,7 +143,6 @@ |
514 | * @return Returns the Unicode code-point of the next character. |
515 | */ |
516 | template<class OctetIterator> |
517 | -ZORBA_DLL_PUBLIC |
518 | unicode::code_point next_char( OctetIterator &i ); |
519 | |
520 | /** |
521 | @@ -234,7 +227,6 @@ |
522 | * @return Returns a number in the range [1,6] if \a start is valid or 0 if |
523 | * \a start is invalid. |
524 | */ |
525 | -ZORBA_DLL_PUBLIC |
526 | size_type char_length( storage_type start ); |
527 | |
528 | /** |
529 | @@ -244,7 +236,6 @@ |
530 | * @param s A pointer to the first byte of a NULL-terminated UTF-8 string. |
531 | * @return Returns said number of characters. |
532 | */ |
533 | -ZORBA_DLL_PUBLIC |
534 | size_type length( storage_type const *s ); |
535 | |
536 | /** |
537 | @@ -256,7 +247,6 @@ |
538 | * sequence. |
539 | * @return Returns said number of characters. |
540 | */ |
541 | -ZORBA_DLL_PUBLIC |
542 | size_type length( storage_type const *begin, storage_type const *end ); |
543 | |
544 | /** |
545 | @@ -321,7 +311,6 @@ |
546 | * @return Returns \c nullptr if the string is valid or a pointer to the first |
547 | * invalid byte if invalid. |
548 | */ |
549 | -ZORBA_DLL_PUBLIC |
550 | storage_type const* validate( storage_type const *s ); |
551 | |
552 | /** |
553 | @@ -332,7 +321,6 @@ |
554 | * @return Returns \c nullptr if the string is valid or a pointer to the first |
555 | * invalid byte if invalid. |
556 | */ |
557 | -ZORBA_DLL_PUBLIC |
558 | storage_type const* validate( storage_type const *s, size_type s_size ); |
559 | |
560 | ////////// iterator /////////////////////////////////////////////////////////// |
561 | |
562 | === modified file 'src/util/xml_util.h' |
563 | --- src/util/xml_util.h 2011-06-16 15:12:30 +0000 |
564 | +++ src/util/xml_util.h 2012-01-19 09:11:24 +0000 |
565 | @@ -191,7 +191,6 @@ |
566 | * @return If successful, returns the number of characters parsed; otherwise |
567 | * returns -1. |
568 | */ |
569 | -ZORBA_DLL_PUBLIC |
570 | int parse_entity( char const *ref, unicode::code_point *c ); |
571 | |
572 | /** |
573 | |
574 | === modified file 'test/unit/CMakeLists.txt' |
575 | --- test/unit/CMakeLists.txt 2012-01-11 17:30:25 +0000 |
576 | +++ test/unit/CMakeLists.txt 2012-01-19 09:11:24 +0000 |
577 | @@ -83,10 +83,7 @@ |
578 | ext_in_opt.cpp |
579 | collection.cpp |
580 | test_audit.cpp |
581 | - string_instantiate.cpp |
582 | streamable_string.cpp |
583 | - string_test.cpp |
584 | - unique_ptr.cpp |
585 | main_sequential.cpp |
586 | context_item.cpp |
587 | datetime.cpp |
588 | @@ -96,13 +93,6 @@ |
589 | staticcollectionmanager.cpp |
590 | ) |
591 | |
592 | -IF (NOT ZORBA_NO_FULL_TEXT) |
593 | - LIST(APPEND UNIT_TESTS_SRCS |
594 | - stemmer.cpp |
595 | - thesaurus.cpp |
596 | - tokenizer.cpp) |
597 | -ENDIF (NOT ZORBA_NO_FULL_TEXT) |
598 | - |
599 | # multithread_simple.cpp |
600 | # multithread_stress_test.cpp |
601 | |
602 | @@ -140,5 +130,14 @@ |
603 | ZORBA_GENERATE_EXE(LibUnitTest lib_unit_test.cpp "" "" "") |
604 | |
605 | # ADD NEW UNIT TESTS HERE |
606 | +ZORBA_ADD_TEST("test/libunit/string" LibUnitTest string) |
607 | ZORBA_ADD_TEST("test/libunit/uri" LibUnitTest uri) |
608 | EXPECTED_FAILURE(test/libunit/uri 3118348) |
609 | +ZORBA_ADD_TEST("test/libunit/unique_ptr" LibUnitTest unique_ptr) |
610 | +IF (NOT ZORBA_NO_FULL_TEXT) |
611 | + ZORBA_ADD_TEST("test/libunit/stemmer" LibUnitTest stemmer) |
612 | + ZORBA_ADD_TEST("test/libunit/thesaurus" LibUnitTest thesaurus) |
613 | + ZORBA_ADD_TEST("test/libunit/tokenizer" LibUnitTest tokenizer) |
614 | +ENDIF (NOT ZORBA_NO_FULL_TEXT) |
615 | + |
616 | +# vim:set et sw=2 ts=2: |
Should we merge these changes?