diff options
author | Dmitry Potapov <potapov.d@gmail.com> | 2022-02-10 16:46:39 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:39 +0300 |
commit | 7aa4cf700385ff96999c5cc301171ff157974773 (patch) | |
tree | 49e222ea1c5804306084bb3ae065bb702625360f /library/cpp/regex/pcre/pcre_ut.cpp | |
parent | 536101ea75c9ff5df10d01c2f460b1f6e12311b3 (diff) | |
download | ydb-7aa4cf700385ff96999c5cc301171ff157974773.tar.gz |
Restoring authorship annotation for Dmitry Potapov <potapov.d@gmail.com>. Commit 2 of 2.
Diffstat (limited to 'library/cpp/regex/pcre/pcre_ut.cpp')
-rw-r--r-- | library/cpp/regex/pcre/pcre_ut.cpp | 178 |
1 files changed, 89 insertions, 89 deletions
diff --git a/library/cpp/regex/pcre/pcre_ut.cpp b/library/cpp/regex/pcre/pcre_ut.cpp index ad5535f96d..84d06499ae 100644 --- a/library/cpp/regex/pcre/pcre_ut.cpp +++ b/library/cpp/regex/pcre/pcre_ut.cpp @@ -1,89 +1,89 @@ -#include <library/cpp/regex/pcre/pcre.h> - -#include <library/cpp/testing/unittest/registar.h> - -template <class T> -inline IOutputStream& operator<<(IOutputStream& out, const TVector<T>& value) { - size_t size = value.size(); - out << "["; - for (size_t i = 0; i < size; ++i) { - if (i) { - out << ","; - } - out << value[i]; - } - out << "]"; - return out; -} - -template <class T, class U> -inline IOutputStream& operator<<(IOutputStream& out, const std::pair<T, U>& value) { - out << "{" << value.first << "," << value.second << "}"; - return out; -} - -// char8_t -#define OPTIMIZE NPcre::EOptimize::None -#define TEST_NAME(S) S -#define STRING(S) S -#define CHAR_TYPE char -#include "pcre_ut_base.h" - -#undef OPTIMIZE -#define OPTIMIZE NPcre::EOptimize::Study -#undef TEST_NAME -#define TEST_NAME(S) S ## Study -#include "pcre_ut_base.h" - -#undef OPTIMIZE -#define OPTIMIZE NPcre::EOptimize::JIT -#undef TEST_NAME -#define TEST_NAME(S) S ## JIT -#include "pcre_ut_base.h" - -// char16_t -#undef OPTIMIZE -#define OPTIMIZE NPcre::EOptimize::None -#undef TEST_NAME -#define TEST_NAME(S) S ## 16 -#undef STRING -#define STRING(S) u ## S -#undef CHAR_TYPE -#define CHAR_TYPE wchar16 -#include "pcre_ut_base.h" - -#undef OPTIMIZE -#define OPTIMIZE NPcre::EOptimize::Study -#undef TEST_NAME -#define TEST_NAME(S) S ## Study16 -#include "pcre_ut_base.h" - -#undef OPTIMIZE -#define OPTIMIZE NPcre::EOptimize::JIT -#undef TEST_NAME -#define TEST_NAME(S) S ## JIT16 -#include "pcre_ut_base.h" - -// char32_t -#undef OPTIMIZE -#define OPTIMIZE NPcre::EOptimize::None -#undef TEST_NAME -#define TEST_NAME(S) S ## 32 -#undef STRING -#define STRING(S) U ## S -#undef CHAR_TYPE -#define CHAR_TYPE wchar32 -#include "pcre_ut_base.h" - -#undef OPTIMIZE -#define OPTIMIZE NPcre::EOptimize::Study -#undef TEST_NAME -#define TEST_NAME(S) S ## Study32 -#include "pcre_ut_base.h" - -#undef OPTIMIZE -#define OPTIMIZE NPcre::EOptimize::JIT -#undef TEST_NAME -#define TEST_NAME(S) S ## JIT32 -#include "pcre_ut_base.h" - +#include <library/cpp/regex/pcre/pcre.h> + +#include <library/cpp/testing/unittest/registar.h> + +template <class T> +inline IOutputStream& operator<<(IOutputStream& out, const TVector<T>& value) { + size_t size = value.size(); + out << "["; + for (size_t i = 0; i < size; ++i) { + if (i) { + out << ","; + } + out << value[i]; + } + out << "]"; + return out; +} + +template <class T, class U> +inline IOutputStream& operator<<(IOutputStream& out, const std::pair<T, U>& value) { + out << "{" << value.first << "," << value.second << "}"; + return out; +} + +// char8_t +#define OPTIMIZE NPcre::EOptimize::None +#define TEST_NAME(S) S +#define STRING(S) S +#define CHAR_TYPE char +#include "pcre_ut_base.h" + +#undef OPTIMIZE +#define OPTIMIZE NPcre::EOptimize::Study +#undef TEST_NAME +#define TEST_NAME(S) S ## Study +#include "pcre_ut_base.h" + +#undef OPTIMIZE +#define OPTIMIZE NPcre::EOptimize::JIT +#undef TEST_NAME +#define TEST_NAME(S) S ## JIT +#include "pcre_ut_base.h" + +// char16_t +#undef OPTIMIZE +#define OPTIMIZE NPcre::EOptimize::None +#undef TEST_NAME +#define TEST_NAME(S) S ## 16 +#undef STRING +#define STRING(S) u ## S +#undef CHAR_TYPE +#define CHAR_TYPE wchar16 +#include "pcre_ut_base.h" + +#undef OPTIMIZE +#define OPTIMIZE NPcre::EOptimize::Study +#undef TEST_NAME +#define TEST_NAME(S) S ## Study16 +#include "pcre_ut_base.h" + +#undef OPTIMIZE +#define OPTIMIZE NPcre::EOptimize::JIT +#undef TEST_NAME +#define TEST_NAME(S) S ## JIT16 +#include "pcre_ut_base.h" + +// char32_t +#undef OPTIMIZE +#define OPTIMIZE NPcre::EOptimize::None +#undef TEST_NAME +#define TEST_NAME(S) S ## 32 +#undef STRING +#define STRING(S) U ## S +#undef CHAR_TYPE +#define CHAR_TYPE wchar32 +#include "pcre_ut_base.h" + +#undef OPTIMIZE +#define OPTIMIZE NPcre::EOptimize::Study +#undef TEST_NAME +#define TEST_NAME(S) S ## Study32 +#include "pcre_ut_base.h" + +#undef OPTIMIZE +#define OPTIMIZE NPcre::EOptimize::JIT +#undef TEST_NAME +#define TEST_NAME(S) S ## JIT32 +#include "pcre_ut_base.h" + |