[test] Add test case for a leaky dashed rectangle.
[cairo/haiku.git] / test / truetype-tables.c
blobc279c8b8a328017a8548ba2e9c5f814e1b3e81cc
1 /*
2 * Copyright © 2006 Red Hat, Inc.
4 * Permission to use, copy, modify, distribute, and sell this software
5 * and its documentation for any purpose is hereby granted without
6 * fee, provided that the above copyright notice appear in all copies
7 * and that both that copyright notice and this permission notice
8 * appear in supporting documentation, and that the name of
9 * Red Hat, Inc. not be used in advertising or publicity pertaining to
10 * distribution of the software without specific, written prior
11 * permission. Red Hat, Inc. makes no representations about the
12 * suitability of this software for any purpose. It is provided "as
13 * is" without express or implied warranty.
15 * RED HAT, INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
16 * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
17 * FITNESS, IN NO EVENT SHALL RED HAT, INC. BE LIABLE FOR ANY SPECIAL,
18 * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
19 * RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
20 * OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
21 * IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
23 * Author: Behdad Esfahbod <behdad@behdad.org>
26 * Test that the structs we define for TrueType tables have the
27 * correct size, ie. they are not padded.
30 #include "cairo-test.h"
32 #include <cairo-truetype-subset-private.h>
34 int
35 main (void)
37 cairo_test_status_t ret = CAIRO_TEST_SUCCESS;
39 cairo_test_init ("truetype-tables");
41 cairo_test_log ("Test that the size of TrueType table structs is correct\n");
43 #define check(st, sz) \
44 if (sizeof (st) != (sz)) { \
45 cairo_test_log ("sizeof (%s): got %d, expected %d", #st, (int)sizeof (st), sz); \
46 ret = CAIRO_TEST_FAILURE; \
49 check (tt_head_t, 54);
50 check (tt_hhea_t, 36);
51 check (tt_maxp_t, 32);
52 check (tt_name_record_t, 12);
53 check (tt_name_t, 18);
54 check (tt_name_t, 18);
55 check (tt_composite_glyph_t, 18);
56 check (tt_glyph_data_t, 28);
58 cairo_test_fini ();
60 return ret;