diff options
| author | vvvv <[email protected]> | 2025-10-09 12:25:18 +0300 |
|---|---|---|
| committer | vvvv <[email protected]> | 2025-10-09 12:57:17 +0300 |
| commit | cb77d014972b2cdb27d2e6d979fc3a2772b27ad4 (patch) | |
| tree | 7f3bcd8ce71c6bd0f3ccc11e31b9f665475b819e /yql/essentials/minikql/jsonpath/ut/examples_ut.cpp | |
| parent | d58a8990d353b051c27e1069141117fdfde64358 (diff) | |
YQL-20086 minikql
commit_hash:e96f7390db5fcbe7e9f64f898141a263ad522daa
Diffstat (limited to 'yql/essentials/minikql/jsonpath/ut/examples_ut.cpp')
| -rw-r--r-- | yql/essentials/minikql/jsonpath/ut/examples_ut.cpp | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/yql/essentials/minikql/jsonpath/ut/examples_ut.cpp b/yql/essentials/minikql/jsonpath/ut/examples_ut.cpp index 3b964e28b5d..4b29118b5ed 100644 --- a/yql/essentials/minikql/jsonpath/ut/examples_ut.cpp +++ b/yql/essentials/minikql/jsonpath/ut/examples_ut.cpp @@ -4,7 +4,7 @@ These examples are taken from [ISO/IEC TR 19075-6:2017] standard (https://www.iso.org/standard/67367.html) */ -class TJsonPathExamplesTest : public TJsonPathTestBase { +class TJsonPathExamplesTest: public TJsonPathTestBase { public: TJsonPathExamplesTest() : TJsonPathTestBase() @@ -12,9 +12,9 @@ public: } UNIT_TEST_SUITE(TJsonPathExamplesTest); - UNIT_TEST(TestMemberAccessExamples); - UNIT_TEST(TestElementAccessExamples); - UNIT_TEST(TestFilterExamples); + UNIT_TEST(TestMemberAccessExamples); + UNIT_TEST(TestElementAccessExamples); + UNIT_TEST(TestFilterExamples); UNIT_TEST_SUITE_END(); void TestMemberAccessExamples() { @@ -42,13 +42,15 @@ public: "FC": [20, 22, 24], "SJ": [30, 33] } - })", "lax $.sensors.*[0, last, 2]", {"20", "24", "24", "10", "17", "12", "30", "33"}); + })", "lax $.sensors.*[0, last, 2]", + {"20", "24", "24", "10", "17", "12", "30", "33"}); RunTestCase(R"({ "x": [12, 30], "y": [8], "z": ["a", "b", "c"] - })", "lax $.*[1 to last]", {"30", "\"b\"", "\"c\""}); + })", "lax $.*[1 to last]", + {"30", "\"b\"", "\"c\""}); } void TestFilterExamples() { @@ -62,7 +64,8 @@ public: // and query will finish with error RunTestCase(R"({ "x": [1, "one"] - })", "strict $.x ? (2 > @[*])", {}); + })", "strict $.x ? (2 > @[*])", + {}); RunTestCase(R"({ "name": { @@ -70,12 +73,14 @@ public: "last": "Moe" }, "points": 123 - })", "strict $ ? (exists (@.name)).name", {R"({"first":"Manny","last":"Moe"})"}); + })", "strict $ ? (exists (@.name)).name", + {R"({"first":"Manny","last":"Moe"})"}); RunTestCase(R"({ "points": 41 - })", "strict $ ? (exists (@.name)).name", {}); + })", "strict $ ? (exists (@.name)).name", + {}); } }; -UNIT_TEST_SUITE_REGISTRATION(TJsonPathExamplesTest);
\ No newline at end of file +UNIT_TEST_SUITE_REGISTRATION(TJsonPathExamplesTest); |
