diff options
author | Anton Samokhvalov <pg83@yandex.ru> | 2022-02-10 16:45:15 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:15 +0300 |
commit | 72cb13b4aff9bc9cf22e49251bc8fd143f82538f (patch) | |
tree | da2c34829458c7d4e74bdfbdf85dff449e9e7fb8 /library/cpp/regex/hyperscan/ut/hyperscan_ut.cpp | |
parent | 778e51ba091dc39e7b7fcab2b9cf4dbedfb6f2b5 (diff) | |
download | ydb-72cb13b4aff9bc9cf22e49251bc8fd143f82538f.tar.gz |
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 1 of 2.
Diffstat (limited to 'library/cpp/regex/hyperscan/ut/hyperscan_ut.cpp')
-rw-r--r-- | library/cpp/regex/hyperscan/ut/hyperscan_ut.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/library/cpp/regex/hyperscan/ut/hyperscan_ut.cpp b/library/cpp/regex/hyperscan/ut/hyperscan_ut.cpp index 9caa53f2e7..9410c8d6ba 100644 --- a/library/cpp/regex/hyperscan/ut/hyperscan_ut.cpp +++ b/library/cpp/regex/hyperscan/ut/hyperscan_ut.cpp @@ -23,14 +23,14 @@ Y_UNIT_TEST_SUITE(HyperscanWrappers) { db, scratch, "abc", - callback); + callback); UNIT_ASSERT_EQUAL(foundId, 0); } Y_UNIT_TEST(Matches) { NHyperscan::TDatabase db = NHyperscan::Compile( "a.c", - HS_FLAG_DOTALL | HS_FLAG_SINGLEMATCH); + HS_FLAG_DOTALL | HS_FLAG_SINGLEMATCH); NHyperscan::TScratch scratch = NHyperscan::MakeScratch(db); UNIT_ASSERT(NHyperscan::Matches(db, scratch, "abc")); UNIT_ASSERT(!NHyperscan::Matches(db, scratch, "foo")); @@ -49,7 +49,7 @@ Y_UNIT_TEST_SUITE(HyperscanWrappers) { { 42, 241, - }); + }); NHyperscan::TScratch scratch = NHyperscan::MakeScratch(db); UNIT_ASSERT(NHyperscan::Matches(db, scratch, "foo")); @@ -65,7 +65,7 @@ Y_UNIT_TEST_SUITE(HyperscanWrappers) { db, scratch, "fooBaR", - callback); + callback); UNIT_ASSERT_EQUAL(foundIds.size(), 2); UNIT_ASSERT(foundIds.contains(42)); UNIT_ASSERT(foundIds.contains(241)); @@ -82,13 +82,13 @@ Y_UNIT_TEST_SUITE(HyperscanWrappers) { }, { 0, - }); + }); } Y_UNIT_TEST(Serialize) { NHyperscan::TDatabase db = NHyperscan::Compile( "foo", - HS_FLAG_DOTALL | HS_FLAG_SINGLEMATCH); + HS_FLAG_DOTALL | HS_FLAG_SINGLEMATCH); TString serialization = Serialize(db); db.Reset(); TDatabase db2 = Deserialize(serialization); @@ -101,10 +101,10 @@ Y_UNIT_TEST_SUITE(HyperscanWrappers) { Y_UNIT_TEST(GrowScratch) { NHyperscan::TDatabase db1 = NHyperscan::Compile( "foo", - HS_FLAG_DOTALL | HS_FLAG_SINGLEMATCH); + HS_FLAG_DOTALL | HS_FLAG_SINGLEMATCH); NHyperscan::TDatabase db2 = NHyperscan::Compile( "longer\\w\\w\\wpattern", - HS_FLAG_DOTALL | HS_FLAG_SINGLEMATCH | HS_FLAG_UTF8); + HS_FLAG_DOTALL | HS_FLAG_SINGLEMATCH | HS_FLAG_UTF8); NHyperscan::TScratch scratch = NHyperscan::MakeScratch(db1); NHyperscan::GrowScratch(scratch, db2); UNIT_ASSERT(NHyperscan::Matches(db1, scratch, "foo")); @@ -114,7 +114,7 @@ Y_UNIT_TEST_SUITE(HyperscanWrappers) { Y_UNIT_TEST(CloneScratch) { NHyperscan::TDatabase db = NHyperscan::Compile( "foo", - HS_FLAG_DOTALL | HS_FLAG_SINGLEMATCH); + HS_FLAG_DOTALL | HS_FLAG_SINGLEMATCH); NHyperscan::TScratch scratch1 = NHyperscan::MakeScratch(db); NHyperscan::TScratch scratch2 = NHyperscan::CloneScratch(scratch1); scratch1.Reset(); |