File: uobjtest.h

package info (click to toggle)
icu 78.2-1
  • links: PTS
  • area: main
  • in suites: experimental
  • size: 123,992 kB
  • sloc: cpp: 527,891; ansic: 112,789; sh: 4,983; makefile: 4,657; perl: 3,199; python: 2,933; xml: 749; sed: 36; lisp: 12
file content (46 lines) | stat: -rw-r--r-- 1,372 bytes parent folder | download | duplicates (10)
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
// © 2016 and later: Unicode, Inc. and others.
// License & terms of use: http://www.unicode.org/copyright.html
/********************************************************************
 * COPYRIGHT: 
 * Copyright (c) 2002-2010, International Business Machines Corporation and
 * others. All Rights Reserved.
 ********************************************************************/


#ifndef _UOBJECTTEST_
#define _UOBJECTTEST_

#include "intltest.h"

/** 
 * Test uobjtest.h
 **/
class UObjectTest : public IntlTest {
    // IntlTest override
    void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par ) override;
private:
    // tests
    void testIDs();
    void testUMemory();
    void TestMFCCompatibility();
    void TestCompilerRTTI();

    //helper

    /**
     * @param obj The UObject to be tested
     * @param className The name of the class being tested 
     * @param factory String version of obj, for exanple   "new UFoo(1,3,4)". nullptr if object is abstract.
     * @param staticID The result of class :: getStaticClassID
     * @return Returns obj, suitable for deletion
     */
    UObject *testClass(UObject *obj,
               const char *className, const char *factory, 
               UClassID staticID);

    UObject *testClassNoClassID(UObject *obj,
               const char *className, const char *factory);
};

#endif
//eof