- Initializes bundle pointers to nullptr
- Adds an exception handling
Change-Id: I9f49a1e236f62d0729db57b4e2a1b7e09cc3bd02
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
private:
friend class Bundle;
- bundle* handle_;
+ bundle* handle_ = nullptr;
bool copy_ = true;
bool own_ = true;
- Bundle* parent_;
+ Bundle* parent_ = nullptr;
};
} // namespace tizen_base
#include <gtest/gtest.h>
#include <gmock/gmock.h>
+#include <exception>
+
int main(int argc, char** argv) {
- testing::InitGoogleTest(&argc, argv);
- return RUN_ALL_TESTS();
+ try {
+ testing::InitGoogleTest(&argc, argv);
+ return RUN_ALL_TESTS();
+ } catch (std::exception const &e) {
+ std::cout << "test_main caught exception: " << e.what() << std::endl;
+ return -1;
+ }
}