diff options
| author | vitya-smirnov <[email protected]> | 2025-10-02 21:18:00 +0300 |
|---|---|---|
| committer | vitya-smirnov <[email protected]> | 2025-10-02 22:11:56 +0300 |
| commit | 6192f768fab5d54dd697cf6b5f884d5cd3145b1c (patch) | |
| tree | 81342cd8bb7ed07f6b8b3b9754522ad283bc045d /yql/essentials/sql/v1/highlight/sql_highlighter_ut.cpp | |
| parent | c1a5e76d42fda9476a375e0638b415c78d46f599 (diff) | |
YQL-20086: Format yql/essentials/sql/v1/highlight
This patch adds a style check for `yql/essentials/sql/v1`.
To format use `ya style`.
To test use `ya test ya test --test-type clang_format`.
To enable style checking in a module, need to add:
`ENABLE(YQL_STYLE_CPP)`. So in a such way we gradually will
format all YQL modules, expect those, where fluent YQL-builders
are used. Then we will revert activation macro, so switch from
`ENABLE(YQL_STYLE_CPP)` to`ENABLE(YQL_STYLE_CPP_XFAIL)`.
Guide: <https://nda.ya.ru/t/XzkoRIGg7KjXmq>.
commit_hash:fa758a214e094c74821fe896184f30483dd18c55
Diffstat (limited to 'yql/essentials/sql/v1/highlight/sql_highlighter_ut.cpp')
| -rw-r--r-- | yql/essentials/sql/v1/highlight/sql_highlighter_ut.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/yql/essentials/sql/v1/highlight/sql_highlighter_ut.cpp b/yql/essentials/sql/v1/highlight/sql_highlighter_ut.cpp index 86ecb1f3306..bff14bc2e38 100644 --- a/yql/essentials/sql/v1/highlight/sql_highlighter_ut.cpp +++ b/yql/essentials/sql/v1/highlight/sql_highlighter_ut.cpp @@ -81,26 +81,26 @@ TString Mask(IHighlighter::TPtr& h, TStringBuf text) { Y_UNIT_TEST_SUITE(SqlHighlighterTests) { - Y_UNIT_TEST(Suite) { - auto h = MakeHighlighter(MakeHighlighting()); - size_t count = 0; - Cerr << "{" << Endl; - for (const auto& test : LoadTestSuite()) { - Cerr << " \"" << test.Name << "\": [" << Endl; - for (size_t i = 0; i < test.Cases.size(); ++i) { - const auto& check = test.Cases[i]; - const auto actual = Mask(h, check.Input); - Cerr << " [\"" << EscapeC(check.Input) << "\", \"" << actual << "\"]," << Endl; - UNIT_ASSERT_VALUES_EQUAL_C( - actual, - check.Expected, - test.Name << " #" << i << ": Input = '" << check.Input << "'"); - count += 1; - } - Cerr << " ]," << Endl; +Y_UNIT_TEST(Suite) { + auto h = MakeHighlighter(MakeHighlighting()); + size_t count = 0; + Cerr << "{" << Endl; + for (const auto& test : LoadTestSuite()) { + Cerr << " \"" << test.Name << "\": [" << Endl; + for (size_t i = 0; i < test.Cases.size(); ++i) { + const auto& check = test.Cases[i]; + const auto actual = Mask(h, check.Input); + Cerr << " [\"" << EscapeC(check.Input) << "\", \"" << actual << "\"]," << Endl; + UNIT_ASSERT_VALUES_EQUAL_C( + actual, + check.Expected, + test.Name << " #" << i << ": Input = '" << check.Input << "'"); + count += 1; } - Cerr << "}" << Endl; - Cerr << "Test Cases Executed: " << count << Endl; + Cerr << " ]," << Endl; } + Cerr << "}" << Endl; + Cerr << "Test Cases Executed: " << count << Endl; +} } // Y_UNIT_TEST_SUITE(SqlHighlighterTests) |
