From 4fd463a87047146daac82e80f9305494107f15ca Mon Sep 17 00:00:00 2001 From: Stephen Seo Date: Tue, 7 Sep 2021 20:21:20 +0900 Subject: [PATCH] Add tests for ThreadPool::getThreadCount() --- src/test/ThreadPoolTest.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/test/ThreadPoolTest.cpp b/src/test/ThreadPoolTest.cpp index 31c8529..d5ca0d3 100644 --- a/src/test/ThreadPoolTest.cpp +++ b/src/test/ThreadPoolTest.cpp @@ -66,3 +66,14 @@ TEST(ECThreadPool, Simple) { ASSERT_EQ(data.load(), 11); } + +TEST(ECThreadPool, QueryCount) { + { + OneThreadPool oneP; + ASSERT_EQ(1, oneP.getThreadCount()); + } + { + ThreeThreadPool threeP; + ASSERT_EQ(3, threeP.getThreadCount()); + } +}