Index: tools/gn/analyzer_unittest.cc |
diff --git a/tools/gn/analyzer_unittest.cc b/tools/gn/analyzer_unittest.cc |
index 4d5c8d461dea7cc6a36a0546f769d196f30a74bd..a3c8d5becb7b31b6a0270d5d87139697ac8ad33a 100644 |
--- a/tools/gn/analyzer_unittest.cc |
+++ b/tools/gn/analyzer_unittest.cc |
@@ -212,7 +212,24 @@ TEST_F(AnalyzerTest, BuildFilesWereModified) { |
" \"test_targets\": [ \"//:a\" ]" |
"}", |
"{" |
- "\"compile_targets\":[]," |
+ "\"compile_targets\":[\"//:a\"]," |
+ "\"status\":\"Found dependency (all)\"," |
+ "\"test_targets\":[\"//:a\"]" |
+ "}"); |
+} |
+ |
+TEST_F(AnalyzerTest, BuildFilesWereModifiedAndCompilingAll) { |
+ // This tests that if a build file is modified, we bail out early with |
+ // "Found dependency (all)" error since we can't handle changes to |
+ // build files yet (crbug.com/555273). |
+ RunBasicTest( |
+ "{" |
+ " \"files\": [ \"//a.cc\", \"//BUILD.gn\" ]," |
+ " \"additional_compile_targets\": [ \"all\" ]," |
+ " \"test_targets\": [ \"//:a\" ]" |
+ "}", |
+ "{" |
+ "\"compile_targets\":[\"all\"]," |
"\"status\":\"Found dependency (all)\"," |
"\"test_targets\":[\"//:a\"]" |
"}"); |