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

Unified Diff: tools/gn/parser_unittest.cc

Issue 1068623002: tools/gn: provide better error message for bogus binary expressions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« tools/gn/parser.cc ('K') | « tools/gn/parser.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/parser_unittest.cc
diff --git a/tools/gn/parser_unittest.cc b/tools/gn/parser_unittest.cc
index 6216ee4d6b178a06a91092593be0896093f7a247..f5adb04ac679e4c269182d50ea2869320f2b0833 100644
--- a/tools/gn/parser_unittest.cc
+++ b/tools/gn/parser_unittest.cc
@@ -204,7 +204,7 @@ TEST(Parser, List) {
" LITERAL(3)\n"
" LITERAL(4)\n");
- DoExpressionErrorTest("[a, 2+,]", 1, 6);
+ DoExpressionErrorTest("[a, 2+,]", 1, 7);
mdempsky 2015/04/06 23:41:51 This expectation change is because GN used to give
DoExpressionErrorTest("[,]", 1, 2);
DoExpressionErrorTest("[a,,]", 1, 4);
}
@@ -243,6 +243,9 @@ TEST(Parser, Accessor) {
" LITERAL(2)\n");
DoParserErrorTest("a = b.c.d", 1, 6); // Can't nest accessors (currently).
DoParserErrorTest("a.b = 5", 1, 1); // Can't assign to accessors (currently).
+
+ // Error at the bad dot in the RHS, not the + operator (crbug.com/472038).
+ DoParserErrorTest("foo(a + b.c.d)", 1, 10);
}
TEST(Parser, Condition) {
« tools/gn/parser.cc ('K') | « tools/gn/parser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698