OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "testing/gtest/include/gtest/gtest.h" | 5 #include "testing/gtest/include/gtest/gtest.h" |
6 #include "tools/gn/analyzer.h" | 6 #include "tools/gn/analyzer.h" |
7 #include "tools/gn/build_settings.h" | 7 #include "tools/gn/build_settings.h" |
8 #include "tools/gn/builder.h" | 8 #include "tools/gn/builder.h" |
9 #include "tools/gn/loader.h" | 9 #include "tools/gn/loader.h" |
10 #include "tools/gn/settings.h" | 10 #include "tools/gn/settings.h" |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 " \"compile_targets\": []," | 193 " \"compile_targets\": []," |
194 " \"test_targets\": [ \"//:a\" ]" | 194 " \"test_targets\": [ \"//:a\" ]" |
195 "}", | 195 "}", |
196 "{" | 196 "{" |
197 "\"error\":" | 197 "\"error\":" |
198 "\"Input does not have a key named " | 198 "\"Input does not have a key named " |
199 "\\\"additional_compile_targets\\\" with a list value.\"," | 199 "\\\"additional_compile_targets\\\" with a list value.\"," |
200 "\"invalid_targets\":[]" | 200 "\"invalid_targets\":[]" |
201 "}"); | 201 "}"); |
202 } | 202 } |
| 203 |
| 204 TEST_F(AnalyzerTest, BuildFilesWereModified) { |
| 205 // This tests that if a build file is modified, we bail out early with |
| 206 // "Found dependency (all)" error since we can't handle changes to |
| 207 // build files yet (crbug.com/555273). |
| 208 RunBasicTest( |
| 209 "{" |
| 210 " \"files\": [ \"//a.cc\", \"//BUILD.gn\" ]," |
| 211 " \"additional_compile_targets\": []," |
| 212 " \"test_targets\": [ \"//:a\" ]" |
| 213 "}", |
| 214 "{" |
| 215 "\"compile_targets\":[]," |
| 216 "\"status\":\"Found dependency (all)\"," |
| 217 "\"test_targets\":[\"//:a\"]" |
| 218 "}"); |
| 219 } |
OLD | NEW |