Index: tools/gn/analyzer_unittest.cc |
diff --git a/tools/gn/analyzer_unittest.cc b/tools/gn/analyzer_unittest.cc |
index dba0e7701dd8a7d8af7feb3e2a3ad02acd8909d7..4d5c8d461dea7cc6a36a0546f769d196f30a74bd 100644 |
--- a/tools/gn/analyzer_unittest.cc |
+++ b/tools/gn/analyzer_unittest.cc |
@@ -200,3 +200,20 @@ TEST_F(AnalyzerTest, WrongInputFields) { |
"\"invalid_targets\":[]" |
"}"); |
} |
+ |
+TEST_F(AnalyzerTest, BuildFilesWereModified) { |
+ // 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\": []," |
+ " \"test_targets\": [ \"//:a\" ]" |
+ "}", |
+ "{" |
+ "\"compile_targets\":[]," |
+ "\"status\":\"Found dependency (all)\"," |
+ "\"test_targets\":[\"//:a\"]" |
+ "}"); |
+} |