1 // © 2016 and later: Unicode, Inc. and others. 2 // License & terms of use: http://www.unicode.org/copyright.html 3 /* 4 ********************************************************************** 5 * Copyright (C) 2011-2013, International Business Machines Corporation 6 * and others. All Rights Reserved. 7 ********************************************************************** 8 */ 9 10 /** 11 * IntlTestSpoof is the top level test class for the Unicode Spoof detection tests 12 */ 13 14 #ifndef INTLTESTSPOOF_H 15 #define INTLTESTSPOOF_H 16 17 #include "unicode/utypes.h" 18 #if !UCONFIG_NO_REGULAR_EXPRESSIONS && !UCONFIG_NO_NORMALIZATION && !UCONFIG_NO_FILE_IO 19 #include "unicode/uspoof.h" 20 #include "intltest.h" 21 22 23 class IntlTestSpoof: public IntlTest { 24 public: 25 void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = nullptr ) override; 26 27 // Test the USpoofDetector API functions that require C++ 28 // The pure C part of the API, which is most of it, is tested in cintltst 29 void testSpoofAPI(); 30 31 void testSkeleton(); 32 33 void testBidiSkeleton(); 34 35 void testAreConfusable(); 36 37 void testAreBidiConfusable(); 38 39 void testInvisible(); 40 41 void testConfData(); 42 43 void testBug8654(); 44 45 void testScriptSet(); 46 47 void testRestrictionLevel(); 48 49 void testMixedNumbers(); 50 51 void testBug12153(); 52 53 void testBug12825(); 54 55 void testBug12815(); 56 57 void testBug13314_MixedNumbers(); 58 59 void testBug13328_MixedCombiningMarks(); 60 61 void testCombiningDot(); 62 63 // Internal functions to run a single skeleton test case. 64 void checkSkeleton(const USpoofChecker *sc, uint32_t flags, const char *input, const char *expected, 65 int32_t lineNum); 66 void checkBidiSkeleton(const USpoofChecker *sc, const UnicodeString &input, UBiDiDirection direction, 67 const UnicodeString &expected, int32_t lineNum); 68 }; 69 70 #endif // !UCONFIG_NO_REGULAR_EXPRESSIONS && !UCONFIG_NO_NORMALIZATION && !UCONFIG_NO_FILE_IO 71 #endif 72