From 629b8fda7efa0b7e3a9a98652b1a7fcc1b691c86 Mon Sep 17 00:00:00 2001 From: Lewis Baker Date: Mon, 14 Aug 2017 21:39:59 +0930 Subject: [PATCH] Indentation fixes. --- test/cancellation_token_tests.cpp | 144 +++++++++++++++--------------- 1 file changed, 72 insertions(+), 72 deletions(-) diff --git a/test/cancellation_token_tests.cpp b/test/cancellation_token_tests.cpp index ae16eac..8e1ee3c 100644 --- a/test/cancellation_token_tests.cpp +++ b/test/cancellation_token_tests.cpp @@ -150,97 +150,97 @@ TEST_CASE("concurrent registration and cancellation") std::thread waiter1{ [token = source.token()] { std::atomic cancelled = false; - while (!cancelled) - { - cppcoro::cancellation_registration registration{ token, [&] + while (!cancelled) { - cancelled = true; - } }; + cppcoro::cancellation_registration registration{ token, [&] + { + cancelled = true; + } }; - cppcoro::cancellation_registration reg0{ token, [] {} }; - cppcoro::cancellation_registration reg1{ token, [] {} }; - cppcoro::cancellation_registration reg2{ token, [] {} }; - cppcoro::cancellation_registration reg3{ token, [] {} }; - cppcoro::cancellation_registration reg4{ token, [] {} }; - cppcoro::cancellation_registration reg5{ token, [] {} }; - cppcoro::cancellation_registration reg6{ token, [] {} }; - cppcoro::cancellation_registration reg7{ token, [] {} }; - cppcoro::cancellation_registration reg8{ token, [] {} }; - cppcoro::cancellation_registration reg9{ token, [] {} }; - cppcoro::cancellation_registration reg10{ token, [] {} }; - cppcoro::cancellation_registration reg11{ token, [] {} }; - cppcoro::cancellation_registration reg12{ token, [] {} }; - cppcoro::cancellation_registration reg13{ token, [] {} }; - cppcoro::cancellation_registration reg14{ token, [] {} }; - cppcoro::cancellation_registration reg15{ token, [] {} }; - cppcoro::cancellation_registration reg17{ token, [] {} }; + cppcoro::cancellation_registration reg0{ token, [] {} }; + cppcoro::cancellation_registration reg1{ token, [] {} }; + cppcoro::cancellation_registration reg2{ token, [] {} }; + cppcoro::cancellation_registration reg3{ token, [] {} }; + cppcoro::cancellation_registration reg4{ token, [] {} }; + cppcoro::cancellation_registration reg5{ token, [] {} }; + cppcoro::cancellation_registration reg6{ token, [] {} }; + cppcoro::cancellation_registration reg7{ token, [] {} }; + cppcoro::cancellation_registration reg8{ token, [] {} }; + cppcoro::cancellation_registration reg9{ token, [] {} }; + cppcoro::cancellation_registration reg10{ token, [] {} }; + cppcoro::cancellation_registration reg11{ token, [] {} }; + cppcoro::cancellation_registration reg12{ token, [] {} }; + cppcoro::cancellation_registration reg13{ token, [] {} }; + cppcoro::cancellation_registration reg14{ token, [] {} }; + cppcoro::cancellation_registration reg15{ token, [] {} }; + cppcoro::cancellation_registration reg17{ token, [] {} }; - std::this_thread::yield(); - } + std::this_thread::yield(); + } } }; std::thread waiter2{ [token = source.token()] { std::atomic cancelled = false; - while (!cancelled) - { - cppcoro::cancellation_registration registration{ token, [&] + while (!cancelled) { - cancelled = true; - } }; + cppcoro::cancellation_registration registration{ token, [&] + { + cancelled = true; + } }; - cppcoro::cancellation_registration reg0{ token, [] {} }; - cppcoro::cancellation_registration reg1{ token, [] {} }; - cppcoro::cancellation_registration reg2{ token, [] {} }; - cppcoro::cancellation_registration reg3{ token, [] {} }; - cppcoro::cancellation_registration reg4{ token, [] {} }; - cppcoro::cancellation_registration reg5{ token, [] {} }; - cppcoro::cancellation_registration reg6{ token, [] {} }; - cppcoro::cancellation_registration reg7{ token, [] {} }; - cppcoro::cancellation_registration reg8{ token, [] {} }; - cppcoro::cancellation_registration reg9{ token, [] {} }; - cppcoro::cancellation_registration reg10{ token, [] {} }; - cppcoro::cancellation_registration reg11{ token, [] {} }; - cppcoro::cancellation_registration reg12{ token, [] {} }; - cppcoro::cancellation_registration reg13{ token, [] {} }; - cppcoro::cancellation_registration reg14{ token, [] {} }; - cppcoro::cancellation_registration reg15{ token, [] {} }; - cppcoro::cancellation_registration reg16{ token, [] {} }; + cppcoro::cancellation_registration reg0{ token, [] {} }; + cppcoro::cancellation_registration reg1{ token, [] {} }; + cppcoro::cancellation_registration reg2{ token, [] {} }; + cppcoro::cancellation_registration reg3{ token, [] {} }; + cppcoro::cancellation_registration reg4{ token, [] {} }; + cppcoro::cancellation_registration reg5{ token, [] {} }; + cppcoro::cancellation_registration reg6{ token, [] {} }; + cppcoro::cancellation_registration reg7{ token, [] {} }; + cppcoro::cancellation_registration reg8{ token, [] {} }; + cppcoro::cancellation_registration reg9{ token, [] {} }; + cppcoro::cancellation_registration reg10{ token, [] {} }; + cppcoro::cancellation_registration reg11{ token, [] {} }; + cppcoro::cancellation_registration reg12{ token, [] {} }; + cppcoro::cancellation_registration reg13{ token, [] {} }; + cppcoro::cancellation_registration reg14{ token, [] {} }; + cppcoro::cancellation_registration reg15{ token, [] {} }; + cppcoro::cancellation_registration reg16{ token, [] {} }; - std::this_thread::yield(); - } + std::this_thread::yield(); + } } }; std::thread waiter3{ [token = source.token()] { std::atomic cancelled = false; - while (!cancelled) - { - cppcoro::cancellation_registration registration{ token, [&] + while (!cancelled) { - cancelled = true; - } }; + cppcoro::cancellation_registration registration{ token, [&] + { + cancelled = true; + } }; - cppcoro::cancellation_registration reg0{ token, [] {} }; - cppcoro::cancellation_registration reg1{ token, [] {} }; - cppcoro::cancellation_registration reg2{ token, [] {} }; - cppcoro::cancellation_registration reg3{ token, [] {} }; - cppcoro::cancellation_registration reg4{ token, [] {} }; - cppcoro::cancellation_registration reg5{ token, [] {} }; - cppcoro::cancellation_registration reg6{ token, [] {} }; - cppcoro::cancellation_registration reg7{ token, [] {} }; - cppcoro::cancellation_registration reg8{ token, [] {} }; - cppcoro::cancellation_registration reg9{ token, [] {} }; - cppcoro::cancellation_registration reg10{ token, [] {} }; - cppcoro::cancellation_registration reg11{ token, [] {} }; - cppcoro::cancellation_registration reg12{ token, [] {} }; - cppcoro::cancellation_registration reg13{ token, [] {} }; - cppcoro::cancellation_registration reg14{ token, [] {} }; - cppcoro::cancellation_registration reg15{ token, [] {} }; - cppcoro::cancellation_registration reg16{ token, [] {} }; + cppcoro::cancellation_registration reg0{ token, [] {} }; + cppcoro::cancellation_registration reg1{ token, [] {} }; + cppcoro::cancellation_registration reg2{ token, [] {} }; + cppcoro::cancellation_registration reg3{ token, [] {} }; + cppcoro::cancellation_registration reg4{ token, [] {} }; + cppcoro::cancellation_registration reg5{ token, [] {} }; + cppcoro::cancellation_registration reg6{ token, [] {} }; + cppcoro::cancellation_registration reg7{ token, [] {} }; + cppcoro::cancellation_registration reg8{ token, [] {} }; + cppcoro::cancellation_registration reg9{ token, [] {} }; + cppcoro::cancellation_registration reg10{ token, [] {} }; + cppcoro::cancellation_registration reg11{ token, [] {} }; + cppcoro::cancellation_registration reg12{ token, [] {} }; + cppcoro::cancellation_registration reg13{ token, [] {} }; + cppcoro::cancellation_registration reg14{ token, [] {} }; + cppcoro::cancellation_registration reg15{ token, [] {} }; + cppcoro::cancellation_registration reg16{ token, [] {} }; - std::this_thread::yield(); - } + std::this_thread::yield(); + } } }; std::thread canceller{ [&source]