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

Unified Diff: tools/gn/test_with_scope.h

Issue 23606031: GN: Use build directory for CD for scripts (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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/secondary/tools/grit/grit_rule.gni ('k') | tools/gn/test_with_scope.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/test_with_scope.h
diff --git a/tools/gn/test_with_scope.h b/tools/gn/test_with_scope.h
new file mode 100644
index 0000000000000000000000000000000000000000..7d512c4d1312bd6e16fc8bf53593a2fa42013286
--- /dev/null
+++ b/tools/gn/test_with_scope.h
@@ -0,0 +1,34 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef TOOLS_GN_TEST_WITH_SCOPE_H_
+#define TOOLS_GN_TEST_WITH_SCOPE_H_
+
+#include "base/basictypes.h"
+#include "tools/gn/build_settings.h"
+#include "tools/gn/scope.h"
+#include "tools/gn/settings.h"
+#include "tools/gn/toolchain.h"
+
+// A helper class for setting up a Scope that a test can use. It makes a
+// toolchain and sets up all the build state.
+class TestWithScope {
+ public:
+ TestWithScope();
+ ~TestWithScope();
+
+ BuildSettings* build_settings() { return &build_settings_; }
+ Settings* settings() { return &settings_; }
+ Scope* scope() { return &scope_; }
+
+ private:
+ BuildSettings build_settings_;
+ Toolchain toolchain_;
+ Settings settings_;
+ Scope scope_;
+
+ DISALLOW_COPY_AND_ASSIGN(TestWithScope);
+};
+
+#endif // TOOLS_GN_TEST_WITH_SCOPE_H_
« no previous file with comments | « tools/gn/secondary/tools/grit/grit_rule.gni ('k') | tools/gn/test_with_scope.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698