Mercurial > hg > octave-shane > gnulib-hg
annotate tests/unistr/test-u16-strchr.c @ 16201:8250f2777afc
maint: update all copyright year number ranges
Run "make update-copyright".
author | Jim Meyering <meyering@redhat.com> |
---|---|
date | Sun, 01 Jan 2012 10:04:58 +0100 |
parents | 97fc9a21a8fb |
children | e542fd46ad6f |
rev | line source |
---|---|
13474
e88b0c7d0f85
unistr/u*-strchr: add tests
Paolo Bonzini <pbonzini@redhat.com>
parents:
diff
changeset
|
1 /* Test of u16_strchr() function. |
16201
8250f2777afc
maint: update all copyright year number ranges
Jim Meyering <meyering@redhat.com>
parents:
14079
diff
changeset
|
2 Copyright (C) 2010-2012 Free Software Foundation, Inc. |
13474
e88b0c7d0f85
unistr/u*-strchr: add tests
Paolo Bonzini <pbonzini@redhat.com>
parents:
diff
changeset
|
3 |
e88b0c7d0f85
unistr/u*-strchr: add tests
Paolo Bonzini <pbonzini@redhat.com>
parents:
diff
changeset
|
4 This program is free software: you can redistribute it and/or modify |
e88b0c7d0f85
unistr/u*-strchr: add tests
Paolo Bonzini <pbonzini@redhat.com>
parents:
diff
changeset
|
5 it under the terms of the GNU General Public License as published by |
e88b0c7d0f85
unistr/u*-strchr: add tests
Paolo Bonzini <pbonzini@redhat.com>
parents:
diff
changeset
|
6 the Free Software Foundation; either version 3 of the License, or |
e88b0c7d0f85
unistr/u*-strchr: add tests
Paolo Bonzini <pbonzini@redhat.com>
parents:
diff
changeset
|
7 (at your option) any later version. |
e88b0c7d0f85
unistr/u*-strchr: add tests
Paolo Bonzini <pbonzini@redhat.com>
parents:
diff
changeset
|
8 |
e88b0c7d0f85
unistr/u*-strchr: add tests
Paolo Bonzini <pbonzini@redhat.com>
parents:
diff
changeset
|
9 This program is distributed in the hope that it will be useful, |
e88b0c7d0f85
unistr/u*-strchr: add tests
Paolo Bonzini <pbonzini@redhat.com>
parents:
diff
changeset
|
10 but WITHOUT ANY WARRANTY; without even the implied warranty of |
e88b0c7d0f85
unistr/u*-strchr: add tests
Paolo Bonzini <pbonzini@redhat.com>
parents:
diff
changeset
|
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
e88b0c7d0f85
unistr/u*-strchr: add tests
Paolo Bonzini <pbonzini@redhat.com>
parents:
diff
changeset
|
12 GNU General Public License for more details. |
e88b0c7d0f85
unistr/u*-strchr: add tests
Paolo Bonzini <pbonzini@redhat.com>
parents:
diff
changeset
|
13 |
e88b0c7d0f85
unistr/u*-strchr: add tests
Paolo Bonzini <pbonzini@redhat.com>
parents:
diff
changeset
|
14 You should have received a copy of the GNU General Public License |
e88b0c7d0f85
unistr/u*-strchr: add tests
Paolo Bonzini <pbonzini@redhat.com>
parents:
diff
changeset
|
15 along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
e88b0c7d0f85
unistr/u*-strchr: add tests
Paolo Bonzini <pbonzini@redhat.com>
parents:
diff
changeset
|
16 |
e88b0c7d0f85
unistr/u*-strchr: add tests
Paolo Bonzini <pbonzini@redhat.com>
parents:
diff
changeset
|
17 /* Written by Paolo Bonzini <bonzini@gnu.org>, 2010. */ |
e88b0c7d0f85
unistr/u*-strchr: add tests
Paolo Bonzini <pbonzini@redhat.com>
parents:
diff
changeset
|
18 |
e88b0c7d0f85
unistr/u*-strchr: add tests
Paolo Bonzini <pbonzini@redhat.com>
parents:
diff
changeset
|
19 #include <config.h> |
e88b0c7d0f85
unistr/u*-strchr: add tests
Paolo Bonzini <pbonzini@redhat.com>
parents:
diff
changeset
|
20 |
e88b0c7d0f85
unistr/u*-strchr: add tests
Paolo Bonzini <pbonzini@redhat.com>
parents:
diff
changeset
|
21 #include "unistr.h" |
e88b0c7d0f85
unistr/u*-strchr: add tests
Paolo Bonzini <pbonzini@redhat.com>
parents:
diff
changeset
|
22 |
e88b0c7d0f85
unistr/u*-strchr: add tests
Paolo Bonzini <pbonzini@redhat.com>
parents:
diff
changeset
|
23 #include <stdlib.h> |
13481
24ed6e62c681
unistr/u*-chr, unistr/u*-strchr: Fix link errors and warnings.
Bruno Haible <bruno@clisp.org>
parents:
13474
diff
changeset
|
24 #include <string.h> |
13474
e88b0c7d0f85
unistr/u*-strchr: add tests
Paolo Bonzini <pbonzini@redhat.com>
parents:
diff
changeset
|
25 |
e88b0c7d0f85
unistr/u*-strchr: add tests
Paolo Bonzini <pbonzini@redhat.com>
parents:
diff
changeset
|
26 #include "zerosize-ptr.h" |
e88b0c7d0f85
unistr/u*-strchr: add tests
Paolo Bonzini <pbonzini@redhat.com>
parents:
diff
changeset
|
27 #include "macros.h" |
e88b0c7d0f85
unistr/u*-strchr: add tests
Paolo Bonzini <pbonzini@redhat.com>
parents:
diff
changeset
|
28 |
e88b0c7d0f85
unistr/u*-strchr: add tests
Paolo Bonzini <pbonzini@redhat.com>
parents:
diff
changeset
|
29 #define UNIT uint16_t |
e88b0c7d0f85
unistr/u*-strchr: add tests
Paolo Bonzini <pbonzini@redhat.com>
parents:
diff
changeset
|
30 #define U_UCTOMB u16_uctomb |
e88b0c7d0f85
unistr/u*-strchr: add tests
Paolo Bonzini <pbonzini@redhat.com>
parents:
diff
changeset
|
31 #define U32_TO_U u32_to_u16 |
e88b0c7d0f85
unistr/u*-strchr: add tests
Paolo Bonzini <pbonzini@redhat.com>
parents:
diff
changeset
|
32 #define U_STRCHR u16_strchr |
e88b0c7d0f85
unistr/u*-strchr: add tests
Paolo Bonzini <pbonzini@redhat.com>
parents:
diff
changeset
|
33 #define U_SET u16_set |
e88b0c7d0f85
unistr/u*-strchr: add tests
Paolo Bonzini <pbonzini@redhat.com>
parents:
diff
changeset
|
34 #include "test-strchr.h" |
13520
1d091087ce86
More tests for unistr/u8-strchr.
Bruno Haible <bruno@clisp.org>
parents:
13481
diff
changeset
|
35 |
1d091087ce86
More tests for unistr/u8-strchr.
Bruno Haible <bruno@clisp.org>
parents:
13481
diff
changeset
|
36 int |
1d091087ce86
More tests for unistr/u8-strchr.
Bruno Haible <bruno@clisp.org>
parents:
13481
diff
changeset
|
37 main (void) |
1d091087ce86
More tests for unistr/u8-strchr.
Bruno Haible <bruno@clisp.org>
parents:
13481
diff
changeset
|
38 { |
1d091087ce86
More tests for unistr/u8-strchr.
Bruno Haible <bruno@clisp.org>
parents:
13481
diff
changeset
|
39 test_strchr (); |
1d091087ce86
More tests for unistr/u8-strchr.
Bruno Haible <bruno@clisp.org>
parents:
13481
diff
changeset
|
40 |
1d091087ce86
More tests for unistr/u8-strchr.
Bruno Haible <bruno@clisp.org>
parents:
13481
diff
changeset
|
41 return 0; |
1d091087ce86
More tests for unistr/u8-strchr.
Bruno Haible <bruno@clisp.org>
parents:
13481
diff
changeset
|
42 } |