run_all_unittests.cc 790 B

1234567891011121314151617181920
  1. // Copyright 2015 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. int main(int argc, char** argv) {
  8. base::TestSuite test_suite(argc, argv);
  9. #if defined(CRONET_TESTS_IMPLEMENTATION)
  10. // cronet_tests[_android] link the Cronet implementation into the test
  11. // suite statically in many configurations, causing globals initialized by
  12. // the library (e.g. ThreadPool) to be visible to the TestSuite.
  13. test_suite.DisableCheckForLeakedGlobals();
  14. #endif
  15. return base::LaunchUnitTests(
  16. argc, argv,
  17. base::BindOnce(&base::TestSuite::Run, base::Unretained(&test_suite)));
  18. }