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()); |