test treewide: apply namespace best practice
1. put sources into the namespace under test
2. put all test codes into anonymous namespace
It can be proved that this can increase readability and save duplicate
codes.
Signed-off-by: Nan Zhou <nanzhoumails@gmail.com>
Change-Id: If0685ca955c9ece5be5e2287ccbde1a302e4dacd
diff --git a/redfish-core/ut/privileges_test.cpp b/redfish-core/ut/privileges_test.cpp
index 1613fbb..3813b54 100644
--- a/redfish-core/ut/privileges_test.cpp
+++ b/redfish-core/ut/privileges_test.cpp
@@ -6,7 +6,10 @@
#include "gmock/gmock.h"
-using namespace redfish;
+namespace redfish
+{
+namespace
+{
TEST(PrivilegeTest, PrivilegeConstructor)
{
@@ -121,3 +124,5 @@
expectedPrivileges[2], expectedPrivileges[3],
expectedPrivileges[4]));
}
+} // namespace
+} // namespace redfish
\ No newline at end of file