1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-14 09:14:58 +00:00

Everywhere: Run clang-format

This commit is contained in:
Linus Groh 2022-10-17 00:06:11 +02:00
parent 8639d8bc21
commit d26aabff04
140 changed files with 1202 additions and 723 deletions

View file

@ -31,8 +31,11 @@ static ErrorOr<void> test_once()
})));
threads.last().start();
}
// clang-format off
// It wants to put [[maybe_unused]] on its own line, for some reason.
for (auto& thread : threads)
[[maybe_unused]] auto res = thread.join();
// clang-format on
VERIFY(v.size() == 1);
@ -61,8 +64,11 @@ static ErrorOr<void> test_mutex()
})));
threads.last().start();
}
// clang-format off
// It wants to put [[maybe_unused]] on its own line, for some reason.
for (auto& thread : threads)
[[maybe_unused]] auto res = thread.join();
// clang-format on
VERIFY(v.size() == threads_count * num_times);
VERIFY(pthread_mutex_trylock(&mutex) == 0);
@ -94,8 +100,11 @@ static ErrorOr<void> test_semaphore_as_lock()
})));
threads.last().start();
}
// clang-format off
// It wants to put [[maybe_unused]] on its own line, for some reason.
for (auto& thread : threads)
[[maybe_unused]] auto res = thread.join();
// clang-format on
VERIFY(v.size() == threads_count * num_times);
VERIFY(sem_trywait(&semaphore) == 0);
@ -162,9 +171,11 @@ static ErrorOr<void> test_semaphore_nonbinary()
})));
threads.last().start();
}
// clang-format off
// It wants to put [[maybe_unused]] on its own line, for some reason.
for (auto& thread : threads)
[[maybe_unused]] auto res = thread.join();
// clang-format on
VERIFY(value.load() == 0);
VERIFY(seen_more_than_two.load());