diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2022-12-04 19:16:43 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2022-12-04 19:38:30 +0900 |
commit | fdcd72088371b3d8dfd31f2a5159861ce0be5535 (patch) | |
tree | 06c160cc34157344f62b6c19af297858a0e57157 /debian/uncrustify-trinity/uncrustify-trinity-0.75.0/tests/input/cpp/issue_3116.cpp | |
parent | a5d7db3b2c6171ea9e76b84155d2dfb66c243e5a (diff) | |
download | extra-dependencies-fdcd72088371b3d8dfd31f2a5159861ce0be5535.tar.gz extra-dependencies-fdcd72088371b3d8dfd31f2a5159861ce0be5535.zip |
uncrustify-trinity: updated based on upstream version 0.76.0
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'debian/uncrustify-trinity/uncrustify-trinity-0.75.0/tests/input/cpp/issue_3116.cpp')
-rw-r--r-- | debian/uncrustify-trinity/uncrustify-trinity-0.75.0/tests/input/cpp/issue_3116.cpp | 213 |
1 files changed, 0 insertions, 213 deletions
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.75.0/tests/input/cpp/issue_3116.cpp b/debian/uncrustify-trinity/uncrustify-trinity-0.75.0/tests/input/cpp/issue_3116.cpp deleted file mode 100644 index 96167df1..00000000 --- a/debian/uncrustify-trinity/uncrustify-trinity-0.75.0/tests/input/cpp/issue_3116.cpp +++ /dev/null @@ -1,213 +0,0 @@ -// Singular with various newline formats -auto f = [] -> void { - return; -}; - -auto f = [] -> void { - return; -}(); - -auto f = [] -> void -{ - return; -}(); - -auto f = -[] -> void { - return; -}; - -auto f = -[] -> void -{ - return; -}; - -auto f - = [] -> void { - int i = 0; - return; - }; - -auto f - = [] - { - int i = 0; - return; - }; - -// Nested lambda -auto f = [] { - auto g = [] { - auto h = [] { - return; - }; - return; - }; - return; -}; - -auto f = [] { - auto g = [] - { - auto h = [] { - return; - }; - return; - }; - return; -}; - -auto f = [] -{ - auto g = [] { - auto h = [] - { - return; - }; - return; - }; - return; -}; - -// Nested lambda within functions -Func( - [] { return; }, - [] { return; } -); - -Func([] { return; }, - [] { return; } -); - -Func([] { return; }, - [] { return; } -)(); - -Func([] { return; }, - [] { return; })(); - -Func([] { return; }, - [] { return; }); - -A( - B([] (const std::string &s) -> bool { - s = "hello"; - return true; - }), 1 - ); - -A( - B( - [] (const std::string &s) -> bool { - s = "hello"; - return true; - } - ), 1 - ); - -// Inside scope -{ - std::thread([](const char *c) { - std::cout << c << std::endl; - }).detach(); - - std::thread( - [](const char *c) { - std::cout << c << std::endl; - } - ).detach(); - - auto f = [&](int a) { - return b; - }; - - auto f = [&](int a) - { - return b; - }; -} - -Func(std::count_if(v.begin(), v.end(), [&](const auto &a) { - return a == 3; - })); - -Func( - std::count_if(v.begin(), v.end(), [&](const auto &a) - { - return a == 3; - })); - -Func( - std::count_if(v.begin(), v.end(), [&](const auto &a) { - return a == 3; - })); - -Func( - std::count_if(v.begin(), v.end(), [&](const auto &a) { - return a == 3; - }) - ); - -// Test case from issue #3116 -const auto compare = [] (const auto i, const auto j) -{ - return i >= j; -}; - -std::sort( - vector.begin(), - vector.end(), - [] (const auto i, const auto j) -{ - return i >= j; -} -); - -// Test case from issue #3116 -if(isWidgetOfCurrentRow) -{ - it = std::find_if( - reloaded.begin(), - reloaded.end(), - [&rowGuid](const auto& device) - { - return (device.thingGUID == rowGuid && !device.isWidget); - } - ); -} -else -{ - it = std::find_if( - reloaded.begin(), - reloaded.end(), - [&rowGuid](const auto& device) - { - return device.thingGUID == rowGuid; - } - ); -} - -// Test case from issue 1296 and some variants -obj->Func([&](int a) - { - return b; - }); - -obj->Func([] -> int - { - return b; - }); - -obj->Func([] - { - return b; - } - ); - -obj->Func( - Func([] - { - return b; - }) - ); |