diff --git a/curvefs/test/metaserver/storage/dumpfile_test.cpp b/curvefs/test/metaserver/storage/dumpfile_test.cpp index ee618e955c..cfa9c8ee11 100644 --- a/curvefs/test/metaserver/storage/dumpfile_test.cpp +++ b/curvefs/test/metaserver/storage/dumpfile_test.cpp @@ -39,6 +39,7 @@ namespace storage { using Hash = std::unordered_map; +namespace { class HashIterator : public Iterator { public: explicit HashIterator(Hash* hash) @@ -56,6 +57,7 @@ class HashIterator : public Iterator { Hash::iterator iter_; Hash* hash_; }; +} // namespace class DumpFileTest : public ::testing::Test { protected: diff --git a/curvefs/test/metaserver/storage/iterator_test.cpp b/curvefs/test/metaserver/storage/iterator_test.cpp index ca76d40c30..f28a4ffcaa 100644 --- a/curvefs/test/metaserver/storage/iterator_test.cpp +++ b/curvefs/test/metaserver/storage/iterator_test.cpp @@ -38,8 +38,8 @@ namespace storage { using Hash = std::unordered_map; using ContainerType = std::map; -using google::protobuf::util::MessageDifferencer; +namespace { class HashIterator : public Iterator { public: explicit HashIterator(Hash* hash) @@ -58,6 +58,7 @@ class HashIterator : public Iterator { Hash* hash_; Hash::iterator iter_; }; +} // namespace class IteratorTest : public ::testing::Test { protected: