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

Side by Side Diff: tools/gn/test_with_scope.h

Issue 440333002: Support more configurability in GN toolchains (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: unsigned check Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « tools/gn/target_unittest.cc ('k') | tools/gn/test_with_scope.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 #ifndef TOOLS_GN_TEST_WITH_SCOPE_H_ 5 #ifndef TOOLS_GN_TEST_WITH_SCOPE_H_
6 #define TOOLS_GN_TEST_WITH_SCOPE_H_ 6 #define TOOLS_GN_TEST_WITH_SCOPE_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 17 matching lines...) Expand all
28 BuildSettings* build_settings() { return &build_settings_; } 28 BuildSettings* build_settings() { return &build_settings_; }
29 Settings* settings() { return &settings_; } 29 Settings* settings() { return &settings_; }
30 Toolchain* toolchain() { return &toolchain_; } 30 Toolchain* toolchain() { return &toolchain_; }
31 Scope* scope() { return &scope_; } 31 Scope* scope() { return &scope_; }
32 32
33 // This buffer accumulates output from any print() commands executed in the 33 // This buffer accumulates output from any print() commands executed in the
34 // context of this test. Note that the implementation of this is not 34 // context of this test. Note that the implementation of this is not
35 // threadsafe so don't write tests that call print from multiple threads. 35 // threadsafe so don't write tests that call print from multiple threads.
36 std::string& print_output() { return print_output_; } 36 std::string& print_output() { return print_output_; }
37 37
38 // Fills in the tools for the given toolchain with reasonable default values.
39 // The toolchain in this object will be automatically set up with this
40 // function, it is exposed to allow tests to get the same functionality for
41 // other toolchains they make
42 static void SetupToolchain(Toolchain* toolchain);
43
38 private: 44 private:
39 void AppendPrintOutput(const std::string& str); 45 void AppendPrintOutput(const std::string& str);
40 46
41 BuildSettings build_settings_; 47 BuildSettings build_settings_;
42 Settings settings_; 48 Settings settings_;
43 Toolchain toolchain_; 49 Toolchain toolchain_;
44 Scope scope_; 50 Scope scope_;
45 51
46 std::string print_output_; 52 std::string print_output_;
47 53
(...skipping 22 matching lines...) Expand all
70 76
71 std::vector<Token> tokens_; 77 std::vector<Token> tokens_;
72 scoped_ptr<ParseNode> parsed_; 78 scoped_ptr<ParseNode> parsed_;
73 79
74 Err parse_err_; 80 Err parse_err_;
75 81
76 DISALLOW_COPY_AND_ASSIGN(TestParseInput); 82 DISALLOW_COPY_AND_ASSIGN(TestParseInput);
77 }; 83 };
78 84
79 #endif // TOOLS_GN_TEST_WITH_SCOPE_H_ 85 #endif // TOOLS_GN_TEST_WITH_SCOPE_H_
OLDNEW
« no previous file with comments | « tools/gn/target_unittest.cc ('k') | tools/gn/test_with_scope.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698