scuffed-code/icu4c/source/test/intltest/itformat.h
Shane F. Carr 9bb910b8d0 ICU-20138 Implementing ufmtval_nextPosition and additional test infra.
- Adds test infra for multi-category formatted values.
- Adds helper method ConstrainedFieldPosition#matchesField, currently internal.
2019-02-05 22:54:13 -08:00

58 lines
1.5 KiB
C++

// © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/********************************************************************
* COPYRIGHT:
* Copyright (c) 1997-2001, International Business Machines Corporation and
* others. All Rights Reserved.
********************************************************************/
/**
* MajorTestLevel is the top level test class for everything in the directory "IntlWork".
*/
#ifndef _INTLTESTFORMAT
#define _INTLTESTFORMAT
#include "unicode/utypes.h"
#if !UCONFIG_NO_FORMATTING
#include "unicode/formattedvalue.h"
#include "intltest.h"
class IntlTestFormat: public IntlTest {
void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL );
};
typedef struct UFieldPositionWithCategory {
UFieldCategory category;
int32_t field;
int32_t beginIndex;
int32_t endIndex;
} UFieldPositionWithCategory;
class IntlTestWithFieldPosition : public IntlTest {
public:
void checkFormattedValue(
const char16_t* message,
const FormattedValue& fv,
UnicodeString expectedString,
UFieldCategory expectedCategory,
const UFieldPosition* expectedFieldPositions,
int32_t length);
void checkMixedFormattedValue(
const char16_t* message,
const FormattedValue& fv,
UnicodeString expectedString,
const UFieldPositionWithCategory* expectedFieldPositions,
int32_t length);
};
#endif /* #if !UCONFIG_NO_FORMATTING */
#endif