annotate tests/uninorm/test-nfkd.c @ 40164:b973ad598121

Fix build error when building a shared libunistring on Android. * tests/uninorm/test-nfc.c (n): Don't define on Android. (main): Add 'volatile', to defeat a GCC optimization that would eliminate the reference. * tests/uninorm/test-nfd.c (n): Don't define on Android. (main): Add 'volatile', to defeat a GCC optimization that would eliminate the reference. * tests/uninorm/test-nfkc.c (n): Don't define on Android. (main): Add 'volatile', to defeat a GCC optimization that would eliminate the reference. * tests/uninorm/test-nfkd.c (n): Don't define on Android. (main): Add 'volatile', to defeat a GCC optimization that would eliminate the reference.
author Bruno Haible <bruno@clisp.org>
date Mon, 28 Jan 2019 21:14:08 +0100
parents b06060465f09
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11197
e2cc4f2d133f Tests for module 'uninorm/nfkd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
1 /* Test of compatibility decomposition of Unicode strings.
40057
b06060465f09 maint: Run 'make update-copyright'
Paul Eggert <eggert@cs.ucla.edu>
parents: 19484
diff changeset
2 Copyright (C) 2009-2019 Free Software Foundation, Inc.
11197
e2cc4f2d133f Tests for module 'uninorm/nfkd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
3
e2cc4f2d133f Tests for module 'uninorm/nfkd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
4 This program is free software: you can redistribute it and/or modify
e2cc4f2d133f Tests for module 'uninorm/nfkd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
5 it under the terms of the GNU General Public License as published by
e2cc4f2d133f Tests for module 'uninorm/nfkd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
6 the Free Software Foundation; either version 3 of the License, or
e2cc4f2d133f Tests for module 'uninorm/nfkd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
7 (at your option) any later version.
e2cc4f2d133f Tests for module 'uninorm/nfkd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
8
e2cc4f2d133f Tests for module 'uninorm/nfkd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
9 This program is distributed in the hope that it will be useful,
e2cc4f2d133f Tests for module 'uninorm/nfkd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
e2cc4f2d133f Tests for module 'uninorm/nfkd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
e2cc4f2d133f Tests for module 'uninorm/nfkd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
12 GNU General Public License for more details.
e2cc4f2d133f Tests for module 'uninorm/nfkd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
13
e2cc4f2d133f Tests for module 'uninorm/nfkd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
14 You should have received a copy of the GNU General Public License
19190
9759915b2aca all: prefer https: URLs
Paul Eggert <eggert@cs.ucla.edu>
parents: 18626
diff changeset
15 along with this program. If not, see <https://www.gnu.org/licenses/>. */
11197
e2cc4f2d133f Tests for module 'uninorm/nfkd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
16
e2cc4f2d133f Tests for module 'uninorm/nfkd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
17 /* Written by Bruno Haible <bruno@clisp.org>, 2009. */
e2cc4f2d133f Tests for module 'uninorm/nfkd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
18
e2cc4f2d133f Tests for module 'uninorm/nfkd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
19 #include <config.h>
e2cc4f2d133f Tests for module 'uninorm/nfkd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
20
e2cc4f2d133f Tests for module 'uninorm/nfkd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
21 #include "uninorm.h"
e2cc4f2d133f Tests for module 'uninorm/nfkd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
22
40164
b973ad598121 Fix build error when building a shared libunistring on Android.
Bruno Haible <bruno@clisp.org>
parents: 40057
diff changeset
23 #if !(WOE32DLL || defined __ANDROID__)
11197
e2cc4f2d133f Tests for module 'uninorm/nfkd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
24 /* Check that UNINORM_NFKD is defined and links. */
e2cc4f2d133f Tests for module 'uninorm/nfkd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
25 uninorm_t n = UNINORM_NFKD;
11489
c9d1cd0282f8 Support for building a shared library on Windows platforms.
Bruno Haible <bruno@clisp.org>
parents: 11197
diff changeset
26 #endif
11197
e2cc4f2d133f Tests for module 'uninorm/nfkd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
27
e2cc4f2d133f Tests for module 'uninorm/nfkd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
28 extern void test_u8_nfkd (void);
e2cc4f2d133f Tests for module 'uninorm/nfkd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
29 extern void test_u16_nfkd (void);
e2cc4f2d133f Tests for module 'uninorm/nfkd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
30 extern void test_u32_nfkd (void);
e2cc4f2d133f Tests for module 'uninorm/nfkd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
31
e2cc4f2d133f Tests for module 'uninorm/nfkd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
32 int
e2cc4f2d133f Tests for module 'uninorm/nfkd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
33 main ()
e2cc4f2d133f Tests for module 'uninorm/nfkd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
34 {
11489
c9d1cd0282f8 Support for building a shared library on Windows platforms.
Bruno Haible <bruno@clisp.org>
parents: 11197
diff changeset
35 /* Check that UNINORM_NFKD is defined and links. */
40164
b973ad598121 Fix build error when building a shared libunistring on Android.
Bruno Haible <bruno@clisp.org>
parents: 40057
diff changeset
36 volatile uninorm_t nf = UNINORM_NFKD;
11489
c9d1cd0282f8 Support for building a shared library on Windows platforms.
Bruno Haible <bruno@clisp.org>
parents: 11197
diff changeset
37 (void) nf;
c9d1cd0282f8 Support for building a shared library on Windows platforms.
Bruno Haible <bruno@clisp.org>
parents: 11197
diff changeset
38
11197
e2cc4f2d133f Tests for module 'uninorm/nfkd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
39 test_u32_nfkd ();
e2cc4f2d133f Tests for module 'uninorm/nfkd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
40 test_u16_nfkd ();
e2cc4f2d133f Tests for module 'uninorm/nfkd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
41 test_u8_nfkd ();
e2cc4f2d133f Tests for module 'uninorm/nfkd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
42
e2cc4f2d133f Tests for module 'uninorm/nfkd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
43 return 0;
e2cc4f2d133f Tests for module 'uninorm/nfkd'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
44 }