crash-reporter: Clean up testing code.
Link all of the crash reporter's tests into a single
crash_reporter_test executable instead of building separate
binaries that lead to a bunch of duplication.
BUG=none
TEST=tests pass
CQ-DEPEND=I7f6623dd0ae36395efac89bdcfae54926ea6c918
Change-Id: I18e2d929d6545e7d05e88232bdaec089ae620544
Reviewed-on: https://chromium-review.googlesource.com/243940
Reviewed-by: Dan Erat <derat@chromium.org>
Commit-Queue: Dan Erat <derat@chromium.org>
Trybot-Ready: Dan Erat <derat@chromium.org>
Tested-by: Dan Erat <derat@chromium.org>
diff --git a/crash_reporter/crash_collector_test.cc b/crash_reporter/crash_collector_test.cc
index 7e4c7c1..1548d70 100644
--- a/crash_reporter/crash_collector_test.cc
+++ b/crash_reporter/crash_collector_test.cc
@@ -6,14 +6,12 @@
#include <unistd.h>
-#include <dbus/dbus-glib-lowlevel.h>
#include <glib.h>
#include <base/files/file_util.h>
#include <base/strings/string_util.h>
#include <base/strings/stringprintf.h>
#include <chromeos/syslog_logging.h>
-#include <chromeos/test_helpers.h>
#include <gtest/gtest.h>
#include "crash-reporter/crash_collector.h"
@@ -23,6 +21,8 @@
using chromeos::FindLog;
using ::testing::Return;
+namespace {
+
void CountCrash() {
ADD_FAILURE();
}
@@ -32,6 +32,8 @@
return false;
}
+} // namespace
+
class CrashCollectorTest : public ::testing::Test {
public:
void SetUp() {
@@ -343,9 +345,3 @@
EXPECT_TRUE(base::ReadFileToString(output_file, &contents));
EXPECT_EQ("hello world\n", contents);
}
-
-int main(int argc, char **argv) {
- ::g_type_init();
- SetUpTests(&argc, argv, false);
- return RUN_ALL_TESTS();
-}