summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNan Zhou <nanzhoumails@gmail.com>2022-06-27 01:36:25 +0300
committerEd Tanous <ed@tanous.net>2022-06-28 03:07:59 +0300
commit3b5c75e3a49dbb90b3e13e799b1d5d3e04c6b82b (patch)
treeb5217a648975f563fbb86ed09ff64768c807a064
parentf2a36772842b04557cae81108cd3a856b6eb5eed (diff)
downloadbmcweb-3b5c75e3a49dbb90b3e13e799b1d5d3e04c6b82b.tar.xz
human_sort_test: add namespace
Add an anonymous namespace and use using declarations. Tested: unit test passed. Signed-off-by: Nan Zhou <nanzhoumails@gmail.com> Change-Id: I2d29aa7ec7923addc41b0af564542932a5abd9b4
-rw-r--r--include/ut/human_sort_test.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/ut/human_sort_test.cpp b/include/ut/human_sort_test.cpp
index b9c245aee6..938b58271f 100644
--- a/include/ut/human_sort_test.cpp
+++ b/include/ut/human_sort_test.cpp
@@ -6,6 +6,11 @@
#include <gmock/gmock.h>
#include <gtest/gtest.h>
+namespace
+{
+
+using ::testing::ElementsAreArray;
+
TEST(AlphaNum, NumberTests)
{
// testcases for the algorithm
@@ -43,6 +48,6 @@ TEST(AlphaNum, LessTest)
{
std::set<std::string, AlphanumLess<std::string>> sorted{"Alpha 10",
"Alpha 2"};
-
- EXPECT_THAT(sorted, ::testing::ElementsAreArray({"Alpha 2", "Alpha 10"}));
+ EXPECT_THAT(sorted, ElementsAreArray({"Alpha 2", "Alpha 10"}));
}
+} // namespace \ No newline at end of file