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

Unified Diff: tools/gn/test_with_scope.cc

Issue 1126193005: Check for inputs not generated by deps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@data
Patch Set: Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gn/test_with_scope.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/test_with_scope.cc
diff --git a/tools/gn/test_with_scope.cc b/tools/gn/test_with_scope.cc
index 62849afbf1542bef2e4e55086e7eb7c289a98955..847af62e2787905ac83e9e4e3546372810bf9cff 100644
--- a/tools/gn/test_with_scope.cc
+++ b/tools/gn/test_with_scope.cc
@@ -39,6 +39,14 @@ TestWithScope::TestWithScope()
TestWithScope::~TestWithScope() {
}
+Label TestWithScope::ParseLabel(const std::string& str) const {
+ Err err;
+ Label result = Label::Resolve(SourceDir("//"), toolchain_.label(),
+ Value(nullptr, str), &err);
+ CHECK(!err.has_error());
+ return result;
+}
+
// static
void TestWithScope::SetupToolchain(Toolchain* toolchain) {
Err err;
@@ -139,3 +147,15 @@ TestParseInput::TestParseInput(const std::string& input)
TestParseInput::~TestParseInput() {
}
+
+TestTarget::TestTarget(TestWithScope& setup,
+ const std::string& label_string,
+ Target::OutputType type)
+ : Target(setup.settings(), setup.ParseLabel(label_string)) {
+ visibility().SetPublic();
+ set_output_type(type);
+ SetToolchain(setup.toolchain());
+}
+
+TestTarget::~TestTarget() {
+}
« no previous file with comments | « tools/gn/test_with_scope.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698