Home | History | Annotate | Download | only in letest
      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 #include "LETypes.h"
     18 #include "unicode/ctest.h"
     19 
     20 #include <stdlib.h>
     21 #include <string.h>
     22 
     23 U_NAMESPACE_USE
     24 
     25 #define ARRAY_SIZE(array) (sizeof array / sizeof array[0])
     26 
     27 #define ARRAY_COPY(dst, src, count) memcpy((void *) (dst), (void *) (src), (count) * sizeof (src)[0])
     28 
     29 #define NEW_ARRAY(type,count) (type *) malloc((count) * sizeof(type))
     30 
     31 #define DELETE_ARRAY(array) free((void *) (array))
     32 
     33 #define GROW_ARRAY(array,newSize) realloc((void *) (array), (newSize) * sizeof (array)[0])
     34 
     35 struct TestResult
     36 {
     37     le_int32   glyphCount;
     38     LEGlyphID *glyphs;
     39     le_int32  *indices;
     40     float     *positions;
     41 };
     42 
     43 #ifndef __cplusplus
     44 typedef struct TestResult TestResult;
     45 #endif
     46 
     47 U_CFUNC void addCTests(TestNode **root);
     48 
     49 #endif
     50