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

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

Issue 631653002: Replacing the OVERRIDE with override in tools folder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Corrected patch-set-1 Created 6 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/binary_target_generator.h ('k') | tools/gn/config.h » ('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/builder.h" 6 #include "tools/gn/builder.h"
7 #include "tools/gn/loader.h" 7 #include "tools/gn/loader.h"
8 #include "tools/gn/target.h" 8 #include "tools/gn/target.h"
9 #include "tools/gn/test_with_scope.h" 9 #include "tools/gn/test_with_scope.h"
10 #include "tools/gn/toolchain.h" 10 #include "tools/gn/toolchain.h"
11 11
12 namespace { 12 namespace {
13 13
14 class MockLoader : public Loader { 14 class MockLoader : public Loader {
15 public: 15 public:
16 MockLoader() { 16 MockLoader() {
17 } 17 }
18 18
19 // Loader implementation: 19 // Loader implementation:
20 virtual void Load(const SourceFile& file, 20 virtual void Load(const SourceFile& file,
21 const LocationRange& origin, 21 const LocationRange& origin,
22 const Label& toolchain_name) OVERRIDE { 22 const Label& toolchain_name) override {
23 files_.push_back(file); 23 files_.push_back(file);
24 } 24 }
25 virtual void ToolchainLoaded(const Toolchain* toolchain) OVERRIDE { 25 virtual void ToolchainLoaded(const Toolchain* toolchain) override {
26 } 26 }
27 virtual Label GetDefaultToolchain() const OVERRIDE { 27 virtual Label GetDefaultToolchain() const override {
28 return Label(); 28 return Label();
29 } 29 }
30 virtual const Settings* GetToolchainSettings( 30 virtual const Settings* GetToolchainSettings(
31 const Label& label) const OVERRIDE { 31 const Label& label) const override {
32 return NULL; 32 return NULL;
33 } 33 }
34 34
35 bool HasLoadedNone() const { 35 bool HasLoadedNone() const {
36 return files_.empty(); 36 return files_.empty();
37 } 37 }
38 38
39 // Returns true if two loads have been requested and they match the given 39 // Returns true if two loads have been requested and they match the given
40 // file. This will clear the records so it will be empty for the next call. 40 // file. This will clear the records so it will be empty for the next call.
41 bool HasLoadedTwo(const SourceFile& a, const SourceFile& b) { 41 bool HasLoadedTwo(const SourceFile& a, const SourceFile& b) {
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 a->set_output_type(Target::EXECUTABLE); 213 a->set_output_type(Target::EXECUTABLE);
214 builder_->ItemDefined(scoped_ptr<Item>(a)); 214 builder_->ItemDefined(scoped_ptr<Item>(a));
215 215
216 // A should have the generate bit set since it's in the default toolchain. 216 // A should have the generate bit set since it's in the default toolchain.
217 BuilderRecord* a_record = builder_->GetRecord(a_label); 217 BuilderRecord* a_record = builder_->GetRecord(a_label);
218 EXPECT_TRUE(a_record->should_generate()); 218 EXPECT_TRUE(a_record->should_generate());
219 219
220 // It should have gotten pushed to B. 220 // It should have gotten pushed to B.
221 EXPECT_TRUE(b_record->should_generate()); 221 EXPECT_TRUE(b_record->should_generate());
222 } 222 }
OLDNEW
« no previous file with comments | « tools/gn/binary_target_generator.h ('k') | tools/gn/config.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698