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 // Main entry point for all unit tests. | 5 // Main entry point for all unit tests. |
6 | 6 |
7 #include "base/at_exit.h" | 7 #include "base/at_exit.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "rlz/lib/rlz_lib.h" | 9 #include "rlz/lib/rlz_lib.h" |
10 #include "testing/gmock/include/gmock/gmock.h" | 10 #include "testing/gmock/include/gmock/gmock.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
12 | 12 |
13 int main(int argc, char **argv) { | 13 int main(int argc, char **argv) { |
14 base::AtExitManager at_exit; | 14 base::AtExitManager at_exit; |
15 CommandLine::Init(argc, argv); | 15 CommandLine::Init(argc, argv); |
16 | 16 |
17 testing::InitGoogleMock(&argc, argv); | 17 testing::InitGoogleMock(&argc, argv); |
18 testing::InitGoogleTest(&argc, argv); | 18 testing::InitGoogleTest(&argc, argv); |
19 | 19 |
20 int ret = RUN_ALL_TESTS(); | 20 int ret = RUN_ALL_TESTS(); |
21 if (ret == 0) { | 21 if (ret == 0) { |
22 // Now re-run all the tests using a supplementary brand code. This brand | 22 // Now re-run all the tests using a supplementary brand code. This brand |
23 // code will remain in effect for the lifetime of the branding object. | 23 // code will remain in effect for the lifetime of the branding object. |
24 rlz_lib::SupplementaryBranding branding("TEST"); | 24 rlz_lib::SupplementaryBranding branding("TEST"); |
25 ret = RUN_ALL_TESTS(); | 25 ret = RUN_ALL_TESTS(); |
26 } | 26 } |
27 | 27 |
28 return ret; | 28 return ret; |
29 } | 29 } |
OLD | NEW |