andrew@webrtc.org | 19eefdc | 2011-09-14 17:02:44 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. |
| 3 | * |
| 4 | * Use of this source code is governed by a BSD-style license |
| 5 | * that can be found in the LICENSE file in the root of the source |
| 6 | * tree. An additional intellectual property rights grant can be found |
| 7 | * in the file PATENTS. All contributing project authors may |
| 8 | * be found in the AUTHORS file in the root of the source tree. |
| 9 | */ |
| 10 | |
| 11 | #include "test/test_suite.h" |
kjellander@webrtc.org | 83b767b | 2012-10-15 18:14:12 +0000 | [diff] [blame] | 12 | #include "test/testsupport/fileutils.h" |
andrew@webrtc.org | 19eefdc | 2011-09-14 17:02:44 +0000 | [diff] [blame] | 13 | |
kjellander@webrtc.org | 20a370e | 2011-11-04 01:19:16 +0000 | [diff] [blame] | 14 | #include "gmock/gmock.h" |
andrew@webrtc.org | 19eefdc | 2011-09-14 17:02:44 +0000 | [diff] [blame] | 15 | #include "gtest/gtest.h" |
| 16 | |
| 17 | namespace webrtc { |
kjellander@webrtc.org | 20a370e | 2011-11-04 01:19:16 +0000 | [diff] [blame] | 18 | namespace test { |
kjellander@webrtc.org | 83b767b | 2012-10-15 18:14:12 +0000 | [diff] [blame] | 19 | |
andrew@webrtc.org | 19eefdc | 2011-09-14 17:02:44 +0000 | [diff] [blame] | 20 | TestSuite::TestSuite(int argc, char** argv) { |
kjellander@webrtc.org | 193600b | 2012-10-17 04:39:44 +0000 | [diff] [blame] | 21 | SetExecutablePath(argv[0]); |
kjellander@webrtc.org | 20a370e | 2011-11-04 01:19:16 +0000 | [diff] [blame] | 22 | testing::InitGoogleMock(&argc, argv); // Runs InitGoogleTest() internally. |
andrew@webrtc.org | 19eefdc | 2011-09-14 17:02:44 +0000 | [diff] [blame] | 23 | } |
| 24 | |
| 25 | TestSuite::~TestSuite() { |
| 26 | } |
| 27 | |
| 28 | int TestSuite::Run() { |
| 29 | Initialize(); |
| 30 | int result = RUN_ALL_TESTS(); |
| 31 | Shutdown(); |
| 32 | return result; |
| 33 | } |
| 34 | |
| 35 | void TestSuite::Initialize() { |
| 36 | // TODO(andrew): initialize singletons here (e.g. Trace). |
| 37 | } |
| 38 | |
| 39 | void TestSuite::Shutdown() { |
| 40 | } |
kjellander@webrtc.org | 20a370e | 2011-11-04 01:19:16 +0000 | [diff] [blame] | 41 | } // namespace test |
andrew@webrtc.org | 19eefdc | 2011-09-14 17:02:44 +0000 | [diff] [blame] | 42 | } // namespace webrtc |