blob: 81913fd7ae9ea34064b0980ceb6a52a2f910ae42 [file] [log] [blame]
andrew@webrtc.org19eefdc2011-09-14 17:02:44 +00001/*
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.org83b767b2012-10-15 18:14:12 +000012#include "test/testsupport/fileutils.h"
andrew@webrtc.org19eefdc2011-09-14 17:02:44 +000013
kjellander@webrtc.org20a370e2011-11-04 01:19:16 +000014#include "gmock/gmock.h"
andrew@webrtc.org19eefdc2011-09-14 17:02:44 +000015#include "gtest/gtest.h"
16
17namespace webrtc {
kjellander@webrtc.org20a370e2011-11-04 01:19:16 +000018namespace test {
kjellander@webrtc.org83b767b2012-10-15 18:14:12 +000019
andrew@webrtc.org19eefdc2011-09-14 17:02:44 +000020TestSuite::TestSuite(int argc, char** argv) {
kjellander@webrtc.org193600b2012-10-17 04:39:44 +000021 SetExecutablePath(argv[0]);
kjellander@webrtc.org20a370e2011-11-04 01:19:16 +000022 testing::InitGoogleMock(&argc, argv); // Runs InitGoogleTest() internally.
andrew@webrtc.org19eefdc2011-09-14 17:02:44 +000023}
24
25TestSuite::~TestSuite() {
26}
27
28int TestSuite::Run() {
29 Initialize();
30 int result = RUN_ALL_TESTS();
31 Shutdown();
32 return result;
33}
34
35void TestSuite::Initialize() {
36 // TODO(andrew): initialize singletons here (e.g. Trace).
37}
38
39void TestSuite::Shutdown() {
40}
kjellander@webrtc.org20a370e2011-11-04 01:19:16 +000041} // namespace test
andrew@webrtc.org19eefdc2011-09-14 17:02:44 +000042} // namespace webrtc