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

Unified Diff: pkg/analyzer/test/src/summary/resynthesize_common.dart

Issue 2985503002: Parenthesize expressions as needed in elements text dump. (Closed)
Patch Set: Created 3 years, 5 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
Index: pkg/analyzer/test/src/summary/resynthesize_common.dart
diff --git a/pkg/analyzer/test/src/summary/resynthesize_common.dart b/pkg/analyzer/test/src/summary/resynthesize_common.dart
index 92d9b20eef58b339bf2b3111c038952227c10d2e..a3f8595946e552ba3844aee02d9b21a766cd9897 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_common.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_common.dart
@@ -4645,6 +4645,20 @@ const dynamic vSymbol = #aaa.bbb.ccc;
}
}
+ test_const_topLevel_parenthesis() async {
Brian Wilkerson 2017/07/19 19:33:15 Should this also test that unnecessary parentheses
+ var library = await checkLibrary(r'''
+const int v1 = (1 + 2) * 3;
+const int v2 = -(1 + 2);
+const int v3 = ('aaa' + 'bbb').length;
+''');
+ checkElementText(library, r'''
+const int v1 = (1 + 2) * 3;
+const int v2 = -(1 + 2);
+const int v3 = ('aaa' + 'bbb').
+ length/*location: dart:core;String;length?*/;
+''');
+ }
+
test_const_topLevel_prefix() async {
var library = await checkLibrary(r'''
const vNotEqual = 1 != 2;
« no previous file with comments | « pkg/analyzer/test/src/summary/element_text.dart ('k') | pkg/analyzer/test/src/summary/resynthesize_kernel_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698