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

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

Issue 1043473002: Fix the value of multiline strings (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added more tests 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
« no previous file with comments | « pkg/analyzer/lib/src/generated/parser.dart ('k') | pkg/analyzer/test/generated/parser_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/generated/ast_test.dart
diff --git a/pkg/analyzer/test/generated/ast_test.dart b/pkg/analyzer/test/generated/ast_test.dart
index a348e56d46448d7a795c43b1c0431d91d250001e..535c75b68eef4e64a30ae948d8329ceee330e474 100644
--- a/pkg/analyzer/test/generated/ast_test.dart
+++ b/pkg/analyzer/test/generated/ast_test.dart
@@ -1266,19 +1266,26 @@ class SimpleStringLiteralTest extends ParserTestCase {
expect(new SimpleStringLiteral(
TokenFactory.tokenFromString("'X'"), "X").contentsEnd, 2);
expect(new SimpleStringLiteral(
- TokenFactory.tokenFromString("\"X\""), "X").contentsEnd, 2);
+ TokenFactory.tokenFromString('"X"'), "X").contentsEnd, 2);
+
expect(new SimpleStringLiteral(
- TokenFactory.tokenFromString("\"\"\"X\"\"\""), "X").contentsEnd, 4);
+ TokenFactory.tokenFromString('"""X"""'), "X").contentsEnd, 4);
expect(new SimpleStringLiteral(
TokenFactory.tokenFromString("'''X'''"), "X").contentsEnd, 4);
expect(new SimpleStringLiteral(
+ TokenFactory.tokenFromString("''' \nX'''"), "X").contentsEnd, 7);
+
+ expect(new SimpleStringLiteral(
TokenFactory.tokenFromString("r'X'"), "X").contentsEnd, 3);
expect(new SimpleStringLiteral(
- TokenFactory.tokenFromString("r\"X\""), "X").contentsEnd, 3);
+ TokenFactory.tokenFromString('r"X"'), "X").contentsEnd, 3);
+
expect(new SimpleStringLiteral(
- TokenFactory.tokenFromString("r\"\"\"X\"\"\""), "X").contentsEnd, 5);
+ TokenFactory.tokenFromString('r"""X"""'), "X").contentsEnd, 5);
expect(new SimpleStringLiteral(
TokenFactory.tokenFromString("r'''X'''"), "X").contentsEnd, 5);
+ expect(new SimpleStringLiteral(
+ TokenFactory.tokenFromString("r''' \nX'''"), "X").contentsEnd, 8);
}
void test_contentsOffset() {
« no previous file with comments | « pkg/analyzer/lib/src/generated/parser.dart ('k') | pkg/analyzer/test/generated/parser_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698