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

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

Issue 1207903002: Windows precompiled header support in GN (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Scott's grammar nits Created 5 years, 5 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/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 25 matching lines...) Expand all
36 // threadsafe so don't write tests that call print from multiple threads. 36 // threadsafe so don't write tests that call print from multiple threads.
37 std::string& print_output() { return print_output_; } 37 std::string& print_output() { return print_output_; }
38 38
39 // Parse the given string into a label in the default toolchain. This will 39 // Parse the given string into a label in the default toolchain. This will
40 // assert if the label isn't valid (this is intended for hardcoded labels). 40 // assert if the label isn't valid (this is intended for hardcoded labels).
41 Label ParseLabel(const std::string& str) const; 41 Label ParseLabel(const std::string& str) const;
42 42
43 // Fills in the tools for the given toolchain with reasonable default values. 43 // Fills in the tools for the given toolchain with reasonable default values.
44 // The toolchain in this object will be automatically set up with this 44 // The toolchain in this object will be automatically set up with this
45 // function, it is exposed to allow tests to get the same functionality for 45 // function, it is exposed to allow tests to get the same functionality for
46 // other toolchains they make 46 // other toolchains they make.
47 static void SetupToolchain(Toolchain* toolchain); 47 static void SetupToolchain(Toolchain* toolchain);
48 48
49 // Sets the given text command on the given tool, parsing it as a
50 // substitution pattern. This will assert if the input is malformed. This is
51 // designed to help setting up Tools for tests.
52 static void SetCommandForTool(const std::string& cmd, Tool* tool);
53
49 private: 54 private:
50 void AppendPrintOutput(const std::string& str); 55 void AppendPrintOutput(const std::string& str);
51 56
52 BuildSettings build_settings_; 57 BuildSettings build_settings_;
53 Settings settings_; 58 Settings settings_;
54 Toolchain toolchain_; 59 Toolchain toolchain_;
55 Scope scope_; 60 Scope scope_;
56 61
57 std::string print_output_; 62 std::string print_output_;
58 63
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
92 // default to public visibility. 97 // default to public visibility.
93 class TestTarget : public Target { 98 class TestTarget : public Target {
94 public: 99 public:
95 TestTarget(TestWithScope& setup, 100 TestTarget(TestWithScope& setup,
96 const std::string& label_string, 101 const std::string& label_string,
97 Target::OutputType type); 102 Target::OutputType type);
98 ~TestTarget() override; 103 ~TestTarget() override;
99 }; 104 };
100 105
101 #endif // TOOLS_GN_TEST_WITH_SCOPE_H_ 106 #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