| OLD | NEW |
| 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 Loading... |
| 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_ |
| OLD | NEW |