scuffed-code/icu4c/source/test/cintltst/cintltst.h
George Rhoten 8f1deb1ece ICU-3259 Remove the time zone option.
After fixing the memory leak, I discovered that some tests call u_cleanup to test the heap functions.
So setting the time zone at the beginning of the process won't help because it doesn't stay around.
Any tests that depend on the timezone need to set and reset the timezone.

X-SVN-Rev: 13348
2003-10-07 21:50:15 +00:00

89 lines
2.6 KiB
C

/********************************************************************
* COPYRIGHT:
* Copyright (c) 1997-2003, International Business Machines Corporation and
* others. All Rights Reserved.
********************************************************************/
/********************************************************************************
*
* File CINTLTST.H
*
* Madhu Katragadda Creation
* Modification History:
* Date Name Description
* 07/13/99 helena HPUX 11 CC port.
*********************************************************************************
The main root for C API tests
*/
#ifndef _CINTLTST
#define _CINTLTST
#include "unicode/utypes.h"
#include "unicode/ctest.h"
#ifndef U_USE_DEPRECATED_API
#define U_USE_DEPRECATED_API 1
#endif
U_CFUNC void addAllTests(TestNode** root);
/**
* Return the path to the icu/source/data/out directory
*/
U_CFUNC const char* ctest_dataOutDir(void);
/**
* Return the path to the icu/source/data/ directory
* for out of source builds too returns the source directory
*/
U_CFUNC const char* ctest_dataSrcDir(void);
/**
*complete a relative path to a full pathname, and convert to platform-specific syntax.
* The character seperating directories for the relative path is '|'.
* @fullname the full path name
* @maxsize the maximum size of the string
* @relPath the relative path name
*/
U_CFUNC void ctest_pathnameInContext(char* fullname, int32_t maxsize, const char* relPath ) ;
U_CFUNC UChar* CharsToUChars(const char* chars);
/**
* Convert a const UChar* into a char*
* Caller owns storage, but in practice this function
* LEAKS so be aware of that.
* @param unichars UChars (null terminated) to be converted
* @return new char* to the unichars in host format
*/
U_CFUNC char *austrdup(const UChar* unichars);
U_CFUNC char *aescstrdup(const UChar* unichars, int32_t length);
U_CFUNC void *ctst_malloc(size_t size);
U_CFUNC void ctst_freeAll(void);
U_CFUNC const char* loadTestData(UErrorCode* err);
/**
* function used to specify the error
* converts the errorcode to an error descriptive string(const char*)
* @param status the error code
*/
#define myErrorName(errorCode) u_errorName(errorCode)
/**
* Call this once to get a consistent timezone. Use ctest_resetTimeZone to set it back to the original value.
* @param optionalTimeZone Set this to a requested timezone.
* Set to NULL to use the standard test timezone (Pacific Time)
*/
U_CFUNC void ctest_setTimeZone(const char *optionalTimeZone, UErrorCode *status);
/**
* Call this once get back the original timezone
*/
U_CFUNC void ctest_resetTimeZone(void);
#endif