blob: 7187829a233108e1ec3c3cd1e5da785f22e3bfe4 [file] [log] [blame]
James Robinson646469d2014-10-03 15:33:28 -07001// 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
5#include "base/at_exit.h"
James Robinson6a64b812014-12-03 13:38:42 -08006#include "base/bind.h"
James Robinson646469d2014-10-03 15:33:28 -07007#include "base/command_line.h"
James Robinson6a64b812014-12-03 13:38:42 -08008#include "base/message_loop/message_loop.h"
9#include "base/test/launcher/unit_test_launcher.h"
10#include "base/test/test_suite.h"
James Robinson646469d2014-10-03 15:33:28 -070011#include "testing/gmock/include/gmock/gmock.h"
12#include "testing/gtest/include/gtest/gtest.h"
13#include "third_party/angle/include/GLSLANG/ShaderLang.h"
14
James Robinson6a64b812014-12-03 13:38:42 -080015namespace {
16
17int RunHelper(base::TestSuite* test_suite) {
18 base::MessageLoopForIO message_loop;
19 return test_suite->Run();
20}
21
22} // namespace
23
James Robinson646469d2014-10-03 15:33:28 -070024int main(int argc, char** argv) {
James Robinson9127e722014-12-29 14:41:55 -080025 base::CommandLine::Init(argc, argv);
James Robinson646469d2014-10-03 15:33:28 -070026 testing::InitGoogleMock(&argc, argv);
27 ShInitialize();
James Robinson6a64b812014-12-03 13:38:42 -080028 base::TestSuite test_suite(argc, argv);
29 int rt = base::LaunchUnitTestsSerially(
30 argc,
31 argv,
32 base::Bind(&RunHelper, base::Unretained(&test_suite)));
James Robinson646469d2014-10-03 15:33:28 -070033 ShFinalize();
34 return rt;
35}