commit | e52d156ca13d37b63841592b7180e459aae8d710 | [log] [tgz] |
---|---|---|
author | Nan Zhou <nanzhoumails@gmail.com> | Tue Jun 21 17:47:15 2022 +0000 |
committer | Ed Tanous <ed@tanous.net> | Fri Jun 24 23:14:47 2022 +0000 |
tree | ac4215894ad0730ae9d3db0685b95a115799c421 | |
parent | ca0cb4c114675210dfaf0d6c5f569dd2e0a05459 [diff] [blame] |
multipart_test: add namespace Added an anonymous namespace. Putting codes in the global namespace is generally not recommended. Reference: https://stackoverflow.com/questions/47861534/why-does-google-test-sample-put-tests-in-an-anonymous-namespace Signed-off-by: Nan Zhou <nanzhoumails@gmail.com> Change-Id: Ic141a1e71b80a47f9b9c0c5a0a73da68ee7c72d9
diff --git a/include/ut/multipart_test.cpp b/include/ut/multipart_test.cpp index 6155e3e..aa55d02 100644 --- a/include/ut/multipart_test.cpp +++ b/include/ut/multipart_test.cpp
@@ -9,7 +9,11 @@ #include <gtest/gtest.h> -class MultipartTest : public ::testing::Test +namespace +{ +using ::testing::Test; + +class MultipartTest : public Test { public: boost::beast::http::request<boost::beast::http::string_body> req{}; @@ -239,3 +243,4 @@ crow::Request reqIn(req, ec); ASSERT_EQ(parser.parse(reqIn), ParserError::ERROR_HEADER_ENDING); } +} // namespace \ No newline at end of file