1 // © 2016 and later: Unicode, Inc. and others. 2 // License & terms of use: http://www.unicode.org/copyright.html 3 /******************************************************************** 4 * COPYRIGHT: 5 * Copyright (c) 1997-2015, International Business Machines Corporation and 6 * others. All Rights Reserved. 7 ********************************************************************/ 8 /* file name: strtest.h 9 * encoding: UTF-8 10 * tab size: 8 (not used) 11 * indentation:4 12 * 13 * created on: 1999nov22 14 * created by: Markus W. Scherer 15 */ 16 17 /* 18 * Test character- and string- related settings in utypes.h, 19 * macros in putil.h, and constructors in unistr.h . 20 * Also basic tests for std_string.h and charstr.h . 21 */ 22 23 #ifndef __STRTEST_H__ 24 #define __STRTEST_H__ 25 26 #include "intltest.h" 27 28 class StringTest : public IntlTest { 29 public: StringTest()30 StringTest() {} 31 virtual ~StringTest(); 32 33 void runIndexedTest(int32_t index, UBool exec, const char *&name, char *par=NULL); 34 35 private: 36 void TestEndian(); 37 void TestSizeofTypes(); 38 void TestCharsetFamily(); 39 void Test_U_STRING(); 40 void Test_UNICODE_STRING(); 41 void Test_UNICODE_STRING_SIMPLE(); 42 void TestUpperOrdinal(); 43 void TestLowerOrdinal(); 44 void Test_UTF8_COUNT_TRAIL_BYTES(); 45 void TestStringPiece(); 46 void TestStringPieceFind(); 47 void TestStringPieceComparisons(); 48 void TestStringPieceOther(); 49 #ifdef U_HAVE_STRING_VIEW 50 void TestStringPieceStringView(); 51 #endif 52 void TestStringPieceU8(); 53 void TestByteSink(); 54 void TestCheckedArrayByteSink(); 55 void TestStringByteSink(); 56 void TestStringByteSinkAppendU8(); 57 void TestSTLCompatibility(); 58 void TestCharString(); 59 void TestCStr(); 60 void Testctou(); 61 }; 62 63 #endif 64