1 // © 2021 and later: Unicode, Inc. and others. 2 // License & terms of use: http://www.unicode.org/copyright.html 3 4 #ifndef LSTMBETEST_H 5 #define LSTMBETEST_H 6 7 #include "unicode/utypes.h" 8 9 #if !UCONFIG_NO_BREAK_ITERATION 10 11 #include <memory> 12 13 #include "intltest.h" 14 15 #include "unicode/uscript.h" 16 17 struct TestParams; 18 19 U_NAMESPACE_BEGIN 20 class LanguageBreakEngine; 21 U_NAMESPACE_END 22 23 24 /** 25 * Test the LSTMBreakEngine class giving different rules 26 */ 27 class LSTMBETest: public IntlTest { 28 public: 29 30 LSTMBETest(); 31 virtual ~LSTMBETest(); 32 33 void runIndexedTest( int32_t index, UBool exec, const char* &name, char* par = NULL ) override; 34 35 void TestThaiGraphclust(); 36 void TestThaiCodepoints(); 37 void TestBurmeseGraphclust(); 38 void TestThaiGraphclustWithLargeMemory(); 39 void TestThaiCodepointsWithLargeMemory(); 40 41 private: 42 const LanguageBreakEngine* createEngineFromTestData(const char* model, UScriptCode script, UErrorCode& status); 43 void runTestFromFile(const char* filename); 44 void runTestWithLargeMemory(const char* model, UScriptCode script); 45 46 // Test parameters, from the test framework and test invocation. 47 const char* fTestParams; 48 }; 49 50 #endif /* #if !UCONFIG_NO_BREAK_ITERATION */ 51 52 #endif 53