• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // © 2016 and later: Unicode, Inc. and others.
2 // License & terms of use: http://www.unicode.org/copyright.html
3 /*
4  *******************************************************************************
5  *
6  *   Copyright (C) 1999-2014, International Business Machines
7  *   Corporation and others.  All Rights Reserved.
8  *
9  *******************************************************************************
10  *   file name:  letest.h
11  *
12  *   created on: 11/06/2000
13  *   created by: Eric R. Mader
14  */
15 
16 #ifndef __LETEST_H
17 #define __LETEST_H
18 
19 
20 #ifdef USING_ICULEHB
21 #include "layout/LETypes.h"
22 #else
23 #include "LETypes.h"
24 #endif
25 #include "unicode/ctest.h"
26 
27 #include <stdlib.h>
28 #include <string.h>
29 
30 U_NAMESPACE_USE
31 
32 #define ARRAY_SIZE(array) (sizeof array / sizeof array[0])
33 
34 #define ARRAY_COPY(dst, src, count) memcpy((void *) (dst), (void *) (src), (count) * sizeof (src)[0])
35 
36 #define NEW_ARRAY(type,count) (type *) malloc((count) * sizeof(type))
37 
38 #define DELETE_ARRAY(array) free((void *) (array))
39 
40 #define GROW_ARRAY(array,newSize) realloc((void *) (array), (newSize) * sizeof (array)[0])
41 
42 struct TestResult
43 {
44     le_int32   glyphCount;
45     LEGlyphID *glyphs;
46     le_int32  *indices;
47     float     *positions;
48 };
49 
50 #ifndef __cplusplus
51 typedef struct TestResult TestResult;
52 #endif
53 
54 U_CFUNC void addCTests(TestNode **root);
55 
56 #endif
57