summaryrefslogtreecommitdiffstats
path: root/yql/essentials/sql/v1/reflect/sql_reflect_ut.cpp
diff options
context:
space:
mode:
authorvitya-smirnov <[email protected]>2025-10-07 09:34:39 +0300
committervitya-smirnov <[email protected]>2025-10-07 09:52:14 +0300
commitbabe7533f18c11be1f8a195ed2324d2d9a89436a (patch)
tree45b7627141bf5a52b45a3d61fd1fbdd564bb8dd9 /yql/essentials/sql/v1/reflect/sql_reflect_ut.cpp
parent8fe7cfe254fde2772477a8933a163b5f303716b4 (diff)
YQL-20086 sql/v1
commit_hash:55bc611cdaa0d8a0fc3c4c7708ed9f17cc4976cf
Diffstat (limited to 'yql/essentials/sql/v1/reflect/sql_reflect_ut.cpp')
-rw-r--r--yql/essentials/sql/v1/reflect/sql_reflect_ut.cpp68
1 files changed, 34 insertions, 34 deletions
diff --git a/yql/essentials/sql/v1/reflect/sql_reflect_ut.cpp b/yql/essentials/sql/v1/reflect/sql_reflect_ut.cpp
index 18c7b89751b..8c6fd50c7d9 100644
--- a/yql/essentials/sql/v1/reflect/sql_reflect_ut.cpp
+++ b/yql/essentials/sql/v1/reflect/sql_reflect_ut.cpp
@@ -5,42 +5,42 @@
using namespace NSQLReflect;
namespace {
- TLexerGrammar grammar = LoadLexerGrammar();
+TLexerGrammar grammar = LoadLexerGrammar();
} // namespace
Y_UNIT_TEST_SUITE(SqlReflectTests) {
- Y_UNIT_TEST(Keywords) {
- UNIT_ASSERT_VALUES_EQUAL(grammar.KeywordNames.contains("SELECT"), true);
- UNIT_ASSERT_VALUES_EQUAL(grammar.KeywordNames.contains("INSERT"), true);
- UNIT_ASSERT_VALUES_EQUAL(grammar.KeywordNames.contains("WHERE"), true);
- UNIT_ASSERT_VALUES_EQUAL(grammar.KeywordNames.contains("COMMIT"), true);
- }
-
- Y_UNIT_TEST(Punctuation) {
- UNIT_ASSERT_VALUES_EQUAL(grammar.PunctuationNames.contains("LPAREN"), true);
- UNIT_ASSERT_VALUES_EQUAL(grammar.BlockByName.at("LPAREN"), "(");
-
- UNIT_ASSERT_VALUES_EQUAL(grammar.PunctuationNames.contains("MINUS"), true);
- UNIT_ASSERT_VALUES_EQUAL(grammar.BlockByName.at("MINUS"), "-");
-
- UNIT_ASSERT_VALUES_EQUAL(grammar.PunctuationNames.contains("NAMESPACE"), true);
- UNIT_ASSERT_VALUES_EQUAL(grammar.BlockByName.at("NAMESPACE"), "::");
- }
-
- Y_UNIT_TEST(Other) {
- UNIT_ASSERT_VALUES_EQUAL(Count(grammar.OtherNames, "REAL"), 1);
- UNIT_ASSERT_VALUES_EQUAL(Count(grammar.OtherNames, "STRING_VALUE"), 1);
- UNIT_ASSERT_VALUES_EQUAL(Count(grammar.OtherNames, "STRING_MULTILINE"), 0);
-
- UNIT_ASSERT_VALUES_EQUAL(
- grammar.BlockByName.at("FLOAT_EXP"),
- "E (PLUS | MINUS)? DECDIGITS");
- UNIT_ASSERT_VALUES_EQUAL(
- grammar.BlockByName.at("STRING_MULTILINE"),
- "(DOUBLE_COMMAT .*? DOUBLE_COMMAT)+ COMMAT?");
- UNIT_ASSERT_VALUES_EQUAL(
- grammar.BlockByName.at("REAL"),
- "(DECDIGITS DOT DIGIT* FLOAT_EXP? | DECDIGITS FLOAT_EXP) (F | P (F ('4' | '8') | N)?)?");
- }
+Y_UNIT_TEST(Keywords) {
+ UNIT_ASSERT_VALUES_EQUAL(grammar.KeywordNames.contains("SELECT"), true);
+ UNIT_ASSERT_VALUES_EQUAL(grammar.KeywordNames.contains("INSERT"), true);
+ UNIT_ASSERT_VALUES_EQUAL(grammar.KeywordNames.contains("WHERE"), true);
+ UNIT_ASSERT_VALUES_EQUAL(grammar.KeywordNames.contains("COMMIT"), true);
+}
+
+Y_UNIT_TEST(Punctuation) {
+ UNIT_ASSERT_VALUES_EQUAL(grammar.PunctuationNames.contains("LPAREN"), true);
+ UNIT_ASSERT_VALUES_EQUAL(grammar.BlockByName.at("LPAREN"), "(");
+
+ UNIT_ASSERT_VALUES_EQUAL(grammar.PunctuationNames.contains("MINUS"), true);
+ UNIT_ASSERT_VALUES_EQUAL(grammar.BlockByName.at("MINUS"), "-");
+
+ UNIT_ASSERT_VALUES_EQUAL(grammar.PunctuationNames.contains("NAMESPACE"), true);
+ UNIT_ASSERT_VALUES_EQUAL(grammar.BlockByName.at("NAMESPACE"), "::");
+}
+
+Y_UNIT_TEST(Other) {
+ UNIT_ASSERT_VALUES_EQUAL(Count(grammar.OtherNames, "REAL"), 1);
+ UNIT_ASSERT_VALUES_EQUAL(Count(grammar.OtherNames, "STRING_VALUE"), 1);
+ UNIT_ASSERT_VALUES_EQUAL(Count(grammar.OtherNames, "STRING_MULTILINE"), 0);
+
+ UNIT_ASSERT_VALUES_EQUAL(
+ grammar.BlockByName.at("FLOAT_EXP"),
+ "E (PLUS | MINUS)? DECDIGITS");
+ UNIT_ASSERT_VALUES_EQUAL(
+ grammar.BlockByName.at("STRING_MULTILINE"),
+ "(DOUBLE_COMMAT .*? DOUBLE_COMMAT)+ COMMAT?");
+ UNIT_ASSERT_VALUES_EQUAL(
+ grammar.BlockByName.at("REAL"),
+ "(DECDIGITS DOT DIGIT* FLOAT_EXP? | DECDIGITS FLOAT_EXP) (F | P (F ('4' | '8') | N)?)?");
+}
} // Y_UNIT_TEST_SUITE(SqlReflectTests)