-* Copyright (c) 2002-2003, International Business Machines
+* © 2016 and later: Unicode, Inc. and others.
+* License & terms of use: http://www.unicode.org/copyright.html#License
+**********************************************************************
+**********************************************************************
+* Copyright (c) 2002-2006, International Business Machines
- virtual void call(UErrorCode* status)
- {
- for (UChar32 i = MIN_; i < MAX_; i ++) {
- (*m_fn_)(i);
- }
- }
-
- virtual long getOperationsPerIteration()
- {
- return MAX_ - MIN_;
- }
- CharPerfFunction(CharPerfFn func, UChar32 min, UChar32 max)
- {
- m_fn_ = func;
- MIN_ = min;
- MAX_ = max;
- }
+ virtual void call(UErrorCode* status)
+ {
+ for (UChar32 i = MIN_; i < MAX_; i ++) {
+ (*m_fn_)(i);
+ }
+ }
+
+ virtual long getOperationsPerIteration()
+ {
+ return MAX_ - MIN_;
+ }
+ CharPerfFunction(CharPerfFn func, UChar32 min, UChar32 max)
+ {
+ m_fn_ = func;
+ MIN_ = min;
+ MAX_ = max;
+ }
- virtual void call(UErrorCode* status)
- {
- // note wchar_t is unsigned, it will revert to 0 once it reaches
- // 65535
- for (wchar_t i = MIN_; i < MAX_; i ++) {
- (*m_fn_)(i);
- }
- }
-
- virtual long getOperationsPerIteration()
- {
- return MAX_ - MIN_;
- }
-
- StdLibCharPerfFunction(StdLibCharPerfFn func, wchar_t min, wchar_t max)
- {
- m_fn_ = func;
- MIN_ = min;
- MAX_ = max;
- }
-
- ~StdLibCharPerfFunction()
- {
- }
+ virtual void call(UErrorCode* status)
+ {
+ // note wchar_t is unsigned, it will revert to 0 once it reaches
+ // 65535
+ for (wchar_t i = MIN_; i < MAX_; i ++) {
+ (*m_fn_)(i);
+ }
+ }
+
+ virtual long getOperationsPerIteration()
+ {
+ return MAX_ - MIN_;
+ }
+
+ StdLibCharPerfFunction(StdLibCharPerfFn func, wchar_t min, wchar_t max)
+ {
+ m_fn_ = func;
+ MIN_ = min;
+ MAX_ = max;
+ }
+
+ ~StdLibCharPerfFunction()
+ {
+ }
- CharPerformanceTest(int32_t argc, const char *argv[], UErrorCode &status);
- ~CharPerformanceTest();
- virtual UPerfFunction* runIndexedTest(int32_t index, UBool exec,
- const char *&name,
- char *par = NULL);
- UPerfFunction* TestIsAlpha();
- UPerfFunction* TestIsUpper();
- UPerfFunction* TestIsLower();
- UPerfFunction* TestIsDigit();
- UPerfFunction* TestIsSpace();
- UPerfFunction* TestIsAlphaNumeric();
- UPerfFunction* TestIsPrint();
- UPerfFunction* TestIsControl();
- UPerfFunction* TestToLower();
- UPerfFunction* TestToUpper();
- UPerfFunction* TestIsWhiteSpace();
- UPerfFunction* TestStdLibIsAlpha();
- UPerfFunction* TestStdLibIsUpper();
- UPerfFunction* TestStdLibIsLower();
- UPerfFunction* TestStdLibIsDigit();
- UPerfFunction* TestStdLibIsSpace();
- UPerfFunction* TestStdLibIsAlphaNumeric();
- UPerfFunction* TestStdLibIsPrint();
- UPerfFunction* TestStdLibIsControl();
- UPerfFunction* TestStdLibToLower();
- UPerfFunction* TestStdLibToUpper();
- UPerfFunction* TestStdLibIsWhiteSpace();
+ CharPerformanceTest(int32_t argc, const char *argv[], UErrorCode &status);
+ ~CharPerformanceTest();
+ virtual UPerfFunction* runIndexedTest(int32_t index, UBool exec,
+ const char *&name,
+ char *par = NULL);
+ UPerfFunction* TestIsAlpha();
+ UPerfFunction* TestIsUpper();
+ UPerfFunction* TestIsLower();
+ UPerfFunction* TestIsDigit();
+ UPerfFunction* TestIsSpace();
+ UPerfFunction* TestIsAlphaNumeric();
+ UPerfFunction* TestIsPrint();
+ UPerfFunction* TestIsControl();
+ UPerfFunction* TestToLower();
+ UPerfFunction* TestToUpper();
+ UPerfFunction* TestIsWhiteSpace();
+ UPerfFunction* TestStdLibIsAlpha();
+ UPerfFunction* TestStdLibIsUpper();
+ UPerfFunction* TestStdLibIsLower();
+ UPerfFunction* TestStdLibIsDigit();
+ UPerfFunction* TestStdLibIsSpace();
+ UPerfFunction* TestStdLibIsAlphaNumeric();
+ UPerfFunction* TestStdLibIsPrint();
+ UPerfFunction* TestStdLibIsControl();
+ UPerfFunction* TestStdLibToLower();
+ UPerfFunction* TestStdLibToUpper();
+ UPerfFunction* TestStdLibIsWhiteSpace();