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

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

Issue 1869503004: Convert //tools to use std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase, change iwyu fixes for converted directories to include <memory> Created 4 years, 8 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/template.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 <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 const Err& parse_err() const { return parse_err_; } 85 const Err& parse_err() const { return parse_err_; }
86 86
87 const InputFile& input_file() const { return input_file_; } 87 const InputFile& input_file() const { return input_file_; }
88 const std::vector<Token>& tokens() const { return tokens_; } 88 const std::vector<Token>& tokens() const { return tokens_; }
89 const ParseNode* parsed() const { return parsed_.get(); } 89 const ParseNode* parsed() const { return parsed_.get(); }
90 90
91 private: 91 private:
92 InputFile input_file_; 92 InputFile input_file_;
93 93
94 std::vector<Token> tokens_; 94 std::vector<Token> tokens_;
95 scoped_ptr<ParseNode> parsed_; 95 std::unique_ptr<ParseNode> parsed_;
96 96
97 Err parse_err_; 97 Err parse_err_;
98 98
99 DISALLOW_COPY_AND_ASSIGN(TestParseInput); 99 DISALLOW_COPY_AND_ASSIGN(TestParseInput);
100 }; 100 };
101 101
102 // Shortcut for creating targets for tests that take the test setup, a pretty- 102 // Shortcut for creating targets for tests that take the test setup, a pretty-
103 // style label, and a target type and sets everything up. The target will 103 // style label, and a target type and sets everything up. The target will
104 // default to public visibility. 104 // default to public visibility.
105 class TestTarget : public Target { 105 class TestTarget : public Target {
106 public: 106 public:
107 TestTarget(const TestWithScope& setup, 107 TestTarget(const TestWithScope& setup,
108 const std::string& label_string, 108 const std::string& label_string,
109 Target::OutputType type); 109 Target::OutputType type);
110 ~TestTarget() override; 110 ~TestTarget() override;
111 }; 111 };
112 112
113 #endif // TOOLS_GN_TEST_WITH_SCOPE_H_ 113 #endif // TOOLS_GN_TEST_WITH_SCOPE_H_
OLDNEW
« no previous file with comments | « tools/gn/template.cc ('k') | tools/gn/test_with_scope.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698