ff564ba6b5c00a8c9ddb3121a6cff2f4014bef76
[platform/upstream/harfbuzz.git] / src / hb-icu-le / letest.h
1 /*
2  *******************************************************************************
3  *
4  *   Copyright (C) 1999-2011, International Business Machines
5  *   Corporation and others.  All Rights Reserved.
6  *
7  *******************************************************************************
8  *   file name:  letest.h
9  *
10  *   created on: 11/06/2000
11  *   created by: Eric R. Mader
12  */
13
14 #ifndef __LETEST_H
15 #define __LETEST_H
16
17
18 #if defined(__GNUC__) && (__GNUC__ >= 4) && !defined(__MINGW32__)
19 # define HB_BEGIN_VISIBILITY _Pragma ("GCC visibility push(hidden)")
20 # define HB_END_VISIBILITY _Pragma ("GCC visibility pop")
21 #else
22 # define HB_BEGIN_VISIBILITY
23 # define HB_END_VISIBILITY
24 #endif
25
26
27 #include "layout/LETypes.h"
28 /*#include "unicode/ctest.h"*/
29
30 #include <stdlib.h>
31 #include <string.h>
32
33 HB_BEGIN_VISIBILITY
34
35 U_NAMESPACE_USE
36
37 #define ARRAY_SIZE(array) (sizeof array / sizeof array[0])
38
39 #define ARRAY_COPY(dst, src, count) memcpy((void *) (dst), (void *) (src), (count) * sizeof (src)[0])
40
41 #define NEW_ARRAY(type,count) (type *) malloc((count) * sizeof(type))
42
43 #define DELETE_ARRAY(array) free((void *) (array))
44
45 #define GROW_ARRAY(array,newSize) realloc((void *) (array), (newSize) * sizeof (array)[0])
46
47 struct TestResult
48 {
49     le_int32   glyphCount;
50     LEGlyphID *glyphs;
51     le_int32  *indices;
52     float     *positions;
53 };
54
55 #ifndef __cplusplus
56 typedef struct TestResult TestResult;
57 #endif
58
59 //U_CFUNC void addCTests(TestNode **root);
60
61 HB_END_VISIBILITY
62
63 #endif