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

Unified Diff: pkg/analyzer/test/generated/parser_test.dart

Issue 1034953002: Fix value computation for multi-line strings (issue 22993) (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 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/generated/parser_test.dart
diff --git a/pkg/analyzer/test/generated/parser_test.dart b/pkg/analyzer/test/generated/parser_test.dart
index 648ea6bfa913931cbcdf119ebd4e015801ca4fba..6e0e5f9f9382daa1103da09afe989bf112fa1e71 100644
--- a/pkg/analyzer/test/generated/parser_test.dart
+++ b/pkg/analyzer/test/generated/parser_test.dart
@@ -8834,6 +8834,18 @@ void''');
expect(elements[4] is InterpolationString, isTrue);
}
+ void test_parseStringLiteral_multiline_trimmed() {
+ SimpleStringLiteral literal = parse4("parseStringLiteral", "''' \\\na'''");
+ expect(literal.literal, isNotNull);
+ expect(literal.value, "a");
+ }
+
+ void test_parseStringLiteral_multiline_untrimmed() {
+ SimpleStringLiteral literal = parse4("parseStringLiteral", "''' a\nb'''");
+ expect(literal.literal, isNotNull);
+ expect(literal.value, " a\nb");
+ }
+
void test_parseStringLiteral_single() {
SimpleStringLiteral literal = parse4("parseStringLiteral", "'a'");
expect(literal.literal, isNotNull);
« pkg/analyzer/lib/src/generated/parser.dart ('K') | « pkg/analyzer/lib/src/generated/parser.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698