http_utility_test: add namespace
To save duplicate codes.
Tested: unit test passes.
Signed-off-by: Nan Zhou <nanzhoumails@gmail.com>
Change-Id: Ibb641942b24a92f61793995337963be80d4a6151
diff --git a/include/ut/http_utility_test.cpp b/include/ut/http_utility_test.cpp
index 5fddc57..d091248 100644
--- a/include/ut/http_utility_test.cpp
+++ b/include/ut/http_utility_test.cpp
@@ -2,16 +2,22 @@
#include <gtest/gtest.h>
+namespace http_helpers
+{
+namespace
+{
+
TEST(HttpUtility, requestPrefersHtml)
{
- EXPECT_FALSE(
- http_helpers::requestPrefersHtml("*/*, application/octet-stream"));
- EXPECT_TRUE(http_helpers::isOctetAccepted("*/*, application/octet-stream"));
+ EXPECT_FALSE(requestPrefersHtml("*/*, application/octet-stream"));
+ EXPECT_TRUE(isOctetAccepted("*/*, application/octet-stream"));
- EXPECT_TRUE(
- http_helpers::requestPrefersHtml("text/html, application/json"));
- EXPECT_FALSE(http_helpers::isOctetAccepted("text/html, application/json"));
+ EXPECT_TRUE(requestPrefersHtml("text/html, application/json"));
+ EXPECT_FALSE(isOctetAccepted("text/html, application/json"));
- EXPECT_FALSE(http_helpers::requestPrefersHtml("application/json"));
- EXPECT_FALSE(http_helpers::isOctetAccepted("application/json"));
+ EXPECT_FALSE(requestPrefersHtml("application/json"));
+ EXPECT_FALSE(isOctetAccepted("application/json"));
}
+
+} // namespace
+} // namespace http_helpers
\ No newline at end of file