summaryrefslogtreecommitdiffstats
path: root/tools/gn/scope_per_file_provider_unittest.cc
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-08 22:35:18 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-08 22:35:18 +0000
commit3aa6f818740034c3fbbc2f315ff03c89a32a9831 (patch)
treeafd6f0431112d262a18c3d27c949de4bdf4522e9 /tools/gn/scope_per_file_provider_unittest.cc
parentdb3ccc6b3d31795f322d62c6e5e7b389ab75a975 (diff)
downloadchromium_src-3aa6f818740034c3fbbc2f315ff03c89a32a9831.zip
chromium_src-3aa6f818740034c3fbbc2f315ff03c89a32a9831.tar.gz
chromium_src-3aa6f818740034c3fbbc2f315ff03c89a32a9831.tar.bz2
Template invocation fixes in GN
This adds an error check when invoking templates which caused really confusing messages if the template invocation encountered an error (because we'd continue running). Hooks up the provider for programatically defined variables in template invocations so those can be used. Sets the current directory in a template invocation to be that of the invoking file. No longer define the target-related programatic variables in an import. Using these in an import will give the directory relative to the import, which is probabyl not what you want. Fix the Windows build by adding a missing library. Add a warning not to add more to the main list (this added .lib is pretty obscure). BUG= R=cjhopman@chromium.org Review URL: https://codereview.chromium.org/226223006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@262524 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/gn/scope_per_file_provider_unittest.cc')
-rw-r--r--tools/gn/scope_per_file_provider_unittest.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/gn/scope_per_file_provider_unittest.cc b/tools/gn/scope_per_file_provider_unittest.cc
index 776a0aa..8d01fb0 100644
--- a/tools/gn/scope_per_file_provider_unittest.cc
+++ b/tools/gn/scope_per_file_provider_unittest.cc
@@ -20,7 +20,7 @@ TEST(ScopePerFileProvider, Expected) {
{
Scope scope(test.settings());
scope.set_source_dir(SourceDir("//source/"));
- ScopePerFileProvider provider(&scope);
+ ScopePerFileProvider provider(&scope, true);
EXPECT_EQ("//toolchain:default", GPV(variables::kCurrentToolchain));
// TODO(brettw) this test harness does not set up the Toolchain manager
@@ -41,7 +41,7 @@ TEST(ScopePerFileProvider, Expected) {
Scope scope(&settings);
scope.set_source_dir(SourceDir("//source/"));
- ScopePerFileProvider provider(&scope);
+ ScopePerFileProvider provider(&scope, true);
EXPECT_EQ("//toolchain:tc", GPV(variables::kCurrentToolchain));
// See above.