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

Unified Diff: tools/gn/builder_unittest.cc

Issue 350743004: Allow dependencies of toolchains in GN. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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/builder.cc ('k') | tools/gn/function_toolchain.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/builder_unittest.cc
diff --git a/tools/gn/builder_unittest.cc b/tools/gn/builder_unittest.cc
index 2800adfa833a1c16c40198ade7e70d40a118f05e..cbeed90e5005fc9d8f6ee5ce6799cc0b86cc5d15 100644
--- a/tools/gn/builder_unittest.cc
+++ b/tools/gn/builder_unittest.cc
@@ -89,12 +89,6 @@ TEST_F(BuilderTest, BasicDeps) {
SourceDir toolchain_dir = settings_.toolchain_label().dir();
std::string toolchain_name = settings_.toolchain_label().name();
- DefineToolchain();
- BuilderRecord* toolchain_record =
- builder_->GetRecord(settings_.toolchain_label());
- ASSERT_TRUE(toolchain_record);
- EXPECT_EQ(BuilderRecord::ITEM_TOOLCHAIN, toolchain_record->type());
-
// Construct a dependency chain: A -> B -> C. Define A first with a
// forward-reference to B, then C, then B to test the different orders that
// the dependencies are hooked up.
@@ -112,6 +106,13 @@ TEST_F(BuilderTest, BasicDeps) {
EXPECT_TRUE(loader_->HasLoadedTwo(SourceFile("//tc/BUILD.gn"),
SourceFile("//b/BUILD.gn")));
+ // Define the toolchain.
+ DefineToolchain();
+ BuilderRecord* toolchain_record =
+ builder_->GetRecord(settings_.toolchain_label());
+ ASSERT_TRUE(toolchain_record);
+ EXPECT_EQ(BuilderRecord::ITEM_TOOLCHAIN, toolchain_record->type());
+
// A should be unresolved with an item
BuilderRecord* a_record = builder_->GetRecord(a_label);
EXPECT_TRUE(a_record->item());
« no previous file with comments | « tools/gn/builder.cc ('k') | tools/gn/function_toolchain.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698