gtest_main_chromium.cc 855 B

123456789101112131415161718192021222324252627282930
  1. // Copyright 2017 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #include "base/bind.h"
  5. #include "base/test/launcher/unit_test_launcher.h"
  6. #include "base/test/test_suite.h"
  7. #include "testing/gtest/include/gtest/gtest.h"
  8. #include "third_party/boringssl/src/crypto/test/gtest_main.h"
  9. namespace {
  10. class BoringSSLTestSuite : public base::TestSuite {
  11. public:
  12. BoringSSLTestSuite(int argc, char** argv) : TestSuite(argc, argv) {}
  13. void Initialize() override {
  14. TestSuite::Initialize();
  15. bssl::SetupGoogleTest();
  16. }
  17. };
  18. } // namespace
  19. int main(int argc, char** argv) {
  20. BoringSSLTestSuite test_suite(argc, argv);
  21. return base::LaunchUnitTests(
  22. argc, argv,
  23. base::BindOnce(&BoringSSLTestSuite::Run, base::Unretained(&test_suite)));
  24. }