fs_mgr: liblp test: give ownership of environment to gtest
From gtest doc:
Note that googletest takes ownership of the registered environment objects. Therefore do not delete them by yourself.
Test: run it
Change-Id: I275884ddd63a17097c3ea4d9d6bb2b5291dc8c90
diff --git a/fs_mgr/liblp/builder_test.cpp b/fs_mgr/liblp/builder_test.cpp
index 34c68d4..fd16e90 100644
--- a/fs_mgr/liblp/builder_test.cpp
+++ b/fs_mgr/liblp/builder_test.cpp
@@ -31,8 +31,7 @@
};
int main(int argc, char** argv) {
- std::unique_ptr<Environment> env(new Environment);
- ::testing::AddGlobalTestEnvironment(env.get());
+ ::testing::AddGlobalTestEnvironment(new Environment);
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}