summaryrefslogtreecommitdiffstats
path: root/test/maid_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/maid_test.cpp')
-rw-r--r--test/maid_test.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/test/maid_test.cpp b/test/maid_test.cpp
index 286be2a..0456913 100644
--- a/test/maid_test.cpp
+++ b/test/maid_test.cpp
@@ -15,11 +15,13 @@
using raul::Maid;
-static const size_t n_threads = 8U;
-static const size_t n_junk_per_thread = 1U << 16U;
+namespace {
-static std::atomic<size_t> n_junk(0);
-static std::atomic<size_t> n_finished_threads(0);
+const size_t n_threads = 8U;
+const size_t n_junk_per_thread = 1U << 16U;
+
+std::atomic<size_t> n_junk(0);
+std::atomic<size_t> n_finished_threads(0);
class Junk : public Maid::Disposable
{
@@ -43,7 +45,7 @@ private:
size_t _val;
};
-static void
+void
litter(Maid* maid)
{
for (size_t i = 0; i < n_junk_per_thread; ++i) {
@@ -54,7 +56,7 @@ litter(Maid* maid)
++n_finished_threads;
}
-static void
+void
test()
{
Maid maid;
@@ -120,6 +122,8 @@ test()
assert(n_junk == 1);
}
+} // namespace
+
int
main()
{