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

Side by Side Diff: tools/gn/analyzer_unittest.cc

Issue 2355713002: Fix a bug in `gn analyze` related to build-only changes. (Closed)
Patch Set: Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « tools/gn/analyzer.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 }
OLDNEW
« no previous file with comments | « tools/gn/analyzer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698