[email protected] | 5b91fc5 | 2013-11-19 01:00:47 | [diff] [blame] | 1 | // Copyright 2013 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 | |||||
sergiyb | 2d09edb | 2014-12-02 19:10:04 | [diff] [blame] | 5 | #include "base/bind.h" |
[email protected] | 5b91fc5 | 2013-11-19 01:00:47 | [diff] [blame] | 6 | #include "base/command_line.h" |
sergiyb | 2d09edb | 2014-12-02 19:10:04 | [diff] [blame] | 7 | #include "base/message_loop/message_loop.h" |
8 | #include "base/test/launcher/unit_test_launcher.h" | ||||
9 | #include "base/test/test_suite.h" | ||||
[email protected] | 5b91fc5 | 2013-11-19 01:00:47 | [diff] [blame] | 10 | #include "testing/gmock/include/gmock/gmock.h" |
[email protected] | 6a50225 | 2013-12-13 11:49:09 | [diff] [blame] | 11 | #include "third_party/angle/include/GLSLANG/ShaderLang.h" |
[email protected] | 5b91fc5 | 2013-11-19 01:00:47 | [diff] [blame] | 12 | |
sergiyb | 2d09edb | 2014-12-02 19:10:04 | [diff] [blame] | 13 | namespace { |
14 | |||||
15 | int RunHelper(base::TestSuite* test_suite) { | ||||
16 | base::MessageLoopForIO message_loop; | ||||
17 | return test_suite->Run(); | ||||
18 | } | ||||
19 | |||||
20 | } // namespace | ||||
21 | |||||
[email protected] | 5b91fc5 | 2013-11-19 01:00:47 | [diff] [blame] | 22 | int main(int argc, char** argv) { |
avi | 9ab03720 | 2014-12-22 23:49:53 | [diff] [blame] | 23 | base::CommandLine::Init(argc, argv); |
[email protected] | 5b91fc5 | 2013-11-19 01:00:47 | [diff] [blame] | 24 | testing::InitGoogleMock(&argc, argv); |
jmadill | d16b210 | 2017-01-03 18:32:42 | [diff] [blame] | 25 | sh::Initialize(); |
sergiyb | 2d09edb | 2014-12-02 19:10:04 | [diff] [blame] | 26 | base::TestSuite test_suite(argc, argv); |
27 | int rt = base::LaunchUnitTestsSerially( | ||||
Corentin Wallez | 0b71452b | 2018-10-30 17:35:00 | [diff] [blame^] | 28 | argc, argv, base::BindOnce(&RunHelper, base::Unretained(&test_suite))); |
jmadill | d16b210 | 2017-01-03 18:32:42 | [diff] [blame] | 29 | sh::Finalize(); |
[email protected] | 5b91fc5 | 2013-11-19 01:00:47 | [diff] [blame] | 30 | return rt; |
31 | } |