summaryrefslogtreecommitdiff
path: root/icu4c/source/test/intltest/ucdtest.h
blob: d8a02c3e236d8bf7fbfa3585224ca4260e5cd963 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
// © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/********************************************************************
 * Copyright (c) 1997-2016, International Business Machines Corporation and
 * others. All Rights Reserved.
 ********************************************************************/

#include "unicode/uniset.h"
#include "intltest.h"

/** Helper function for TestUnicodeData */
U_CFUNC void U_CALLCONV unicodeDataLineFn(void *context,
                              char *fields[][2], int32_t fieldCount,
                              UErrorCode *pErrorCode);

U_CFUNC void U_CALLCONV
derivedPropsLineFn(void *context,
                   char *fields[][2], int32_t fieldCount,
                   UErrorCode *pErrorCode);

U_NAMESPACE_BEGIN

class Hashtable;

U_NAMESPACE_END

/** 
 * Test API and functionality of class Unicode
 **/
class UnicodeTest: public IntlTest {
public:
    UnicodeTest();
    virtual ~UnicodeTest();

    void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = nullptr ) override;

    void TestAdditionalProperties();
    void TestBinaryValues();
    void TestConsistency();
    void TestPatternProperties();
    void TestScriptMetadata();
    void TestBidiPairedBracketType();
    void TestEmojiProperties();
    void TestEmojiPropertiesOfStrings();
    void TestIndicPositionalCategory();
    void TestIndicSyllabicCategory();
    void TestVerticalOrientation();
    void TestDefaultScriptExtensions();
    void TestInvalidCodePointFolding();
    void TestBinaryCharacterProperties();
    void TestIntCharacterProperties();
    void TestPropertyNames();
    void TestIDSUnaryOperator();
    void TestIDCompatMath();
    void TestBinaryPropertyUsingPpucd();
    void TestIDStatus();
    void TestIDType();

private:

    friend void U_CALLCONV unicodeDataLineFn(void *context,
                              char *fields[][2], int32_t fieldCount,
                              UErrorCode *pErrorCode);

    friend void U_CALLCONV
    derivedPropsLineFn(void *context,
                           char *fields[][2], int32_t fieldCount,
                           UErrorCode *pErrorCode);

    UnicodeSet derivedProps[30];
    U_NAMESPACE_QUALIFIER Hashtable *unknownPropertyNames;

    UBool compareUSets(const UnicodeSet &a, const UnicodeSet &b,
                       const char *a_name, const char *b_name,
                       UBool diffIsError);
};