3 * This test ensures that the ExifTagTable[] array is stored in sorted
4 * order. If that were not so, then it a binary search of the array would
5 * not give correct results.
7 * Copyright 2009 Dan Fandrich <dan@coneharvesters.com>
9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Lesser General Public
11 * License as published by the Free Software Foundation; either
12 * version 2 of the License, or (at your option) any later version.
14 * This library is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * Lesser General Public License for more details.
19 * You should have received a copy of the GNU Lesser General Public
20 * License along with this library; if not, write to the
21 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22 * Boston, MA 02110-1301 USA
25 #include <libexif/exif-tag.h>
33 ExifTag last
= 0, current
;
34 num
= exif_tag_table_count() - 1; /* last entry is a NULL terminator */
35 for (i
=0; i
< num
; ++i
) {
36 current
= exif_tag_table_get_tag(i
);
38 printf("Tag 0x%04x in ExifTagTable[] is out of order\n",
42 if (exif_tag_table_get_name(i
) == NULL
) {
43 printf("Tag 0x%04x has a NULL name\n", current
);