From ccb30077e70dcc98e92df9a218c1ea9eca65ef18 Mon Sep 17 00:00:00 2001 From: levlam Date: Sat, 21 Nov 2020 20:45:09 +0300 Subject: [PATCH] Make test functions statis if possible. --- tdactor/test/actors_workers.cpp | 2 +- tdutils/test/MpscLinkQueue.cpp | 2 +- tdutils/test/misc.cpp | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tdactor/test/actors_workers.cpp b/tdactor/test/actors_workers.cpp index 3c54f369a..7e0ec23fb 100644 --- a/tdactor/test/actors_workers.cpp +++ b/tdactor/test/actors_workers.cpp @@ -110,7 +110,7 @@ class Manager final : public Actor { int query_size_; }; -void test_workers(int threads_n, int workers_n, int queries_n, int query_size) { +static void test_workers(int threads_n, int workers_n, int queries_n, int query_size) { SET_VERBOSITY_LEVEL(VERBOSITY_NAME(ERROR)); ConcurrentScheduler sched; diff --git a/tdutils/test/MpscLinkQueue.cpp b/tdutils/test/MpscLinkQueue.cpp index edb40e153..5f25ea88a 100644 --- a/tdutils/test/MpscLinkQueue.cpp +++ b/tdutils/test/MpscLinkQueue.cpp @@ -30,7 +30,7 @@ class NodeX : public td::MpscLinkQueueImpl::Node { }; using QueueNode = td::MpscLinkQueueUniquePtrNode; -QueueNode create_node(int value) { +static QueueNode create_node(int value) { return QueueNode(td::make_unique(value)); } diff --git a/tdutils/test/misc.cpp b/tdutils/test/misc.cpp index 026e208bd..659283084 100644 --- a/tdutils/test/misc.cpp +++ b/tdutils/test/misc.cpp @@ -63,9 +63,9 @@ struct CheckExitGuard { bool expected_value_; }; -CheckExitGuard check_exit_guard_true{true}; -td::ExitGuard exit_guard; -CheckExitGuard check_exit_guard_false{false}; +static CheckExitGuard check_exit_guard_true{true}; +static td::ExitGuard exit_guard; +static CheckExitGuard check_exit_guard_false{false}; #if TD_LINUX || TD_DARWIN TEST(Misc, update_atime_saves_mtime) { @@ -1065,7 +1065,7 @@ TEST(Misc, uint128) { } template