Loading init/init_test.cpp +13 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ #include <functional> #include <android-base/file.h> #include <android-base/logging.h> #include <android-base/properties.h> #include <gtest/gtest.h> Loading Loading @@ -268,6 +269,17 @@ service A something ASSERT_EQ(1u, parser.parse_error_count()); } class TestCaseLogger : public ::testing::EmptyTestEventListener { void OnTestStart(const ::testing::TestInfo& test_info) override { #ifdef __ANDROID__ LOG(INFO) << "===== " << test_info.test_suite_name() << "::" << test_info.name() << " (" << test_info.file() << ":" << test_info.line() << ")"; #else UNUSED(test_info); #endif } }; } // namespace init } // namespace android Loading @@ -284,5 +296,6 @@ int main(int argc, char** argv) { } testing::InitGoogleTest(&argc, argv); testing::UnitTest::GetInstance()->listeners().Append(new android::init::TestCaseLogger()); return RUN_ALL_TESTS(); } Loading
init/init_test.cpp +13 −0 Original line number Diff line number Diff line Loading @@ -17,6 +17,7 @@ #include <functional> #include <android-base/file.h> #include <android-base/logging.h> #include <android-base/properties.h> #include <gtest/gtest.h> Loading Loading @@ -268,6 +269,17 @@ service A something ASSERT_EQ(1u, parser.parse_error_count()); } class TestCaseLogger : public ::testing::EmptyTestEventListener { void OnTestStart(const ::testing::TestInfo& test_info) override { #ifdef __ANDROID__ LOG(INFO) << "===== " << test_info.test_suite_name() << "::" << test_info.name() << " (" << test_info.file() << ":" << test_info.line() << ")"; #else UNUSED(test_info); #endif } }; } // namespace init } // namespace android Loading @@ -284,5 +296,6 @@ int main(int argc, char** argv) { } testing::InitGoogleTest(&argc, argv); testing::UnitTest::GetInstance()->listeners().Append(new android::init::TestCaseLogger()); return RUN_ALL_TESTS(); }