projects
/
yaz-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3747235
)
Fix compilation for case of unavailable ICU
author
Adam Dickmeiss
<adam@indexdata.dk>
Sat, 29 Jan 2011 14:35:07 +0000
(15:35 +0100)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Sat, 29 Jan 2011 14:35:07 +0000
(15:35 +0100)
test/test_libstemmer.c
patch
|
blob
|
history
diff --git
a/test/test_libstemmer.c
b/test/test_libstemmer.c
index
e657050
..
a2ea678
100644
(file)
--- a/
test/test_libstemmer.c
+++ b/
test/test_libstemmer.c
@@
-3,15
+3,17
@@
* See the file LICENSE for details.
*/
#if HAVE_CONFIG_H
* See the file LICENSE for details.
*/
#if HAVE_CONFIG_H
-#include <config.h>
+#include "config.h"
#endif
#include <stdlib.h>
#include <stdio.h>
#endif
#include <stdlib.h>
#include <stdio.h>
-#include <yaz/stemmer.h>
#include <yaz/test.h>
#include <yaz/test.h>
+#if YAZ_HAVE_ICU
+#include <yaz/stemmer.h>
+
int test_stemmer_stem(yaz_stemmer_p stemmer, const char* to_stem, const char *expected)
{
struct icu_buf_utf16 *src = icu_buf_utf16_create(0);
int test_stemmer_stem(yaz_stemmer_p stemmer, const char* to_stem, const char *expected)
{
struct icu_buf_utf16 *src = icu_buf_utf16_create(0);
@@
-36,7
+38,6
@@
int test_stemmer_stem(yaz_stemmer_p stemmer, const char* to_stem, const char *ex
}
}
-
static void tst(void)
{
UErrorCode status;
static void tst(void)
{
UErrorCode status;
@@
-60,11
+61,14
@@
static void tst(void)
yaz_stemmer_destroy(stemmer);
}
yaz_stemmer_destroy(stemmer);
}
+#endif
int main (int argc, char **argv)
{
YAZ_CHECK_INIT(argc, argv);
int main (int argc, char **argv)
{
YAZ_CHECK_INIT(argc, argv);
+#if YAZ_HAVE_ICU
tst();
tst();
+#endif
YAZ_CHECK_TERM;
}
YAZ_CHECK_TERM;
}