Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(334)

Side by Side Diff: tools/gn/target_unittest.cc

Issue 25153002: Enable compiling GN by default. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set:  Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/gn/string_utils.cc ('k') | tools/gn/trace.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 #include "testing/gtest/include/gtest/gtest.h" 5 #include "testing/gtest/include/gtest/gtest.h"
6 #include "tools/gn/build_settings.h" 6 #include "tools/gn/build_settings.h"
7 #include "tools/gn/config.h" 7 #include "tools/gn/config.h"
8 #include "tools/gn/settings.h" 8 #include "tools/gn/settings.h"
9 #include "tools/gn/target.h" 9 #include "tools/gn/target.h"
10 #include "tools/gn/toolchain.h" 10 #include "tools/gn/toolchain.h"
11 11
12 namespace { 12 namespace {
13 13
14 class TargetTest : public testing::Test { 14 class TargetTest : public testing::Test {
15 public: 15 public:
16 TargetTest() 16 TargetTest()
17 : build_settings_(), 17 : build_settings_(),
18 toolchain_(Label(SourceDir("//tc/"), "tc")), 18 toolchain_(Label(SourceDir("//tc/"), "tc")),
19 settings_(&build_settings_, &toolchain_, std::string()) { 19 settings_(&build_settings_, &toolchain_, std::string()) {
20 } 20 }
21 ~TargetTest() { 21 virtual ~TargetTest() {
22 } 22 }
23 23
24 protected: 24 protected:
25 BuildSettings build_settings_; 25 BuildSettings build_settings_;
26 Toolchain toolchain_; 26 Toolchain toolchain_;
27 Settings settings_; 27 Settings settings_;
28 }; 28 };
29 29
30 } // namespace 30 } // namespace
31 31
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 b_fwd.OnResolved(); 151 b_fwd.OnResolved();
152 a_fwd.OnResolved(); 152 a_fwd.OnResolved();
153 153
154 // A_fwd should now have both configs. 154 // A_fwd should now have both configs.
155 ASSERT_EQ(2u, a_fwd.configs().size()); 155 ASSERT_EQ(2u, a_fwd.configs().size());
156 EXPECT_EQ(&all, a_fwd.configs()[0]); 156 EXPECT_EQ(&all, a_fwd.configs()[0]);
157 EXPECT_EQ(&direct, a_fwd.configs()[1]); 157 EXPECT_EQ(&direct, a_fwd.configs()[1]);
158 ASSERT_EQ(1u, a_fwd.all_dependent_configs().size()); 158 ASSERT_EQ(1u, a_fwd.all_dependent_configs().size());
159 EXPECT_EQ(&all, a_fwd.all_dependent_configs()[0]); 159 EXPECT_EQ(&all, a_fwd.all_dependent_configs()[0]);
160 } 160 }
OLDNEW
« no previous file with comments | « tools/gn/string_utils.cc ('k') | tools/gn/trace.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698