Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/bind.h" | |
| 5 #include "base/message_loop/message_loop.h" | 6 #include "base/message_loop/message_loop.h" |
| 6 #include "base/test/test_suite.h" | 7 #include "base/test/test_suite.h" |
| 8 #include "base/test/unit_test_launcher.h" | |
| 7 #include "testing/gmock/include/gmock/gmock.h" | 9 #include "testing/gmock/include/gmock/gmock.h" |
| 8 | 10 |
| 11 namespace { | |
| 12 | |
| 13 int RunTestSuite(TestSuite* test_suite) { | |
| 14 base::MessageLoop message_loop; | |
| 15 return test_suite->Run(); | |
| 16 } | |
| 17 | |
| 18 } // nemespace | |
|
enne (OOO)
2013/09/03 23:21:04
typo
Paweł Hajdan Jr.
2013/09/05 18:20:04
Done.
| |
| 19 | |
| 9 int main(int argc, char** argv) { | 20 int main(int argc, char** argv) { |
| 10 ::testing::InitGoogleMock(&argc, argv); | 21 ::testing::InitGoogleMock(&argc, argv); |
| 22 | |
| 11 TestSuite test_suite(argc, argv); | 23 TestSuite test_suite(argc, argv); |
| 12 base::MessageLoop message_loop; | |
| 13 int result = test_suite.Run(); | |
| 14 | 24 |
| 15 return result; | 25 return base::LaunchUnitTests( |
| 26 argc, argv, base::Bind(&RunTestSuite, | |
| 27 base::Unretained(&test_suite))); | |
| 16 } | 28 } |
| OLD | NEW |