Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7bf1e9f4 authored by Yifan Hong's avatar Yifan Hong
Browse files

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
parent 3a970945
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -31,8 +31,7 @@ class Environment : public ::testing::Environment {
};

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();
}