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

Side by Side 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, 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 // This code was auto-generated, is not intended to be edited, and is subject to 5 // This code was auto-generated, is not intended to be edited, and is subject to
6 // significant change. Please see the README file for more information. 6 // significant change. Please see the README file for more information.
7 7
8 library engine.ast_test; 8 library engine.ast_test;
9 9
10 import 'package:analyzer/src/generated/ast.dart'; 10 import 'package:analyzer/src/generated/ast.dart';
(...skipping 1248 matching lines...) Expand 10 before | Expand all | Expand 10 after
1259 return child; 1259 return child;
1260 } 1260 }
1261 } 1261 }
1262 1262
1263 @reflectiveTest 1263 @reflectiveTest
1264 class SimpleStringLiteralTest extends ParserTestCase { 1264 class SimpleStringLiteralTest extends ParserTestCase {
1265 void test_contentsEnd() { 1265 void test_contentsEnd() {
1266 expect(new SimpleStringLiteral( 1266 expect(new SimpleStringLiteral(
1267 TokenFactory.tokenFromString("'X'"), "X").contentsEnd, 2); 1267 TokenFactory.tokenFromString("'X'"), "X").contentsEnd, 2);
1268 expect(new SimpleStringLiteral( 1268 expect(new SimpleStringLiteral(
1269 TokenFactory.tokenFromString("\"X\""), "X").contentsEnd, 2); 1269 TokenFactory.tokenFromString('"X"'), "X").contentsEnd, 2);
1270
1270 expect(new SimpleStringLiteral( 1271 expect(new SimpleStringLiteral(
1271 TokenFactory.tokenFromString("\"\"\"X\"\"\""), "X").contentsEnd, 4); 1272 TokenFactory.tokenFromString('"""X"""'), "X").contentsEnd, 4);
1272 expect(new SimpleStringLiteral( 1273 expect(new SimpleStringLiteral(
1273 TokenFactory.tokenFromString("'''X'''"), "X").contentsEnd, 4); 1274 TokenFactory.tokenFromString("'''X'''"), "X").contentsEnd, 4);
1274 expect(new SimpleStringLiteral( 1275 expect(new SimpleStringLiteral(
1276 TokenFactory.tokenFromString("''' \nX'''"), "X").contentsEnd, 7);
1277
1278 expect(new SimpleStringLiteral(
1275 TokenFactory.tokenFromString("r'X'"), "X").contentsEnd, 3); 1279 TokenFactory.tokenFromString("r'X'"), "X").contentsEnd, 3);
1276 expect(new SimpleStringLiteral( 1280 expect(new SimpleStringLiteral(
1277 TokenFactory.tokenFromString("r\"X\""), "X").contentsEnd, 3); 1281 TokenFactory.tokenFromString('r"X"'), "X").contentsEnd, 3);
1282
1278 expect(new SimpleStringLiteral( 1283 expect(new SimpleStringLiteral(
1279 TokenFactory.tokenFromString("r\"\"\"X\"\"\""), "X").contentsEnd, 5); 1284 TokenFactory.tokenFromString('r"""X"""'), "X").contentsEnd, 5);
1280 expect(new SimpleStringLiteral( 1285 expect(new SimpleStringLiteral(
1281 TokenFactory.tokenFromString("r'''X'''"), "X").contentsEnd, 5); 1286 TokenFactory.tokenFromString("r'''X'''"), "X").contentsEnd, 5);
1287 expect(new SimpleStringLiteral(
1288 TokenFactory.tokenFromString("r''' \nX'''"), "X").contentsEnd, 8);
1282 } 1289 }
1283 1290
1284 void test_contentsOffset() { 1291 void test_contentsOffset() {
1285 expect(new SimpleStringLiteral( 1292 expect(new SimpleStringLiteral(
1286 TokenFactory.tokenFromString("'X'"), "X").contentsOffset, 1); 1293 TokenFactory.tokenFromString("'X'"), "X").contentsOffset, 1);
1287 expect(new SimpleStringLiteral( 1294 expect(new SimpleStringLiteral(
1288 TokenFactory.tokenFromString("\"X\""), "X").contentsOffset, 1); 1295 TokenFactory.tokenFromString("\"X\""), "X").contentsOffset, 1);
1289 expect(new SimpleStringLiteral( 1296 expect(new SimpleStringLiteral(
1290 TokenFactory.tokenFromString("\"\"\"X\"\"\""), "X").contentsOffset, 3); 1297 TokenFactory.tokenFromString("\"\"\"X\"\"\""), "X").contentsOffset, 3);
1291 expect(new SimpleStringLiteral( 1298 expect(new SimpleStringLiteral(
(...skipping 1923 matching lines...) Expand 10 before | Expand all | Expand 10 after
3215 static const List<WrapperKind> values = const [ 3222 static const List<WrapperKind> values = const [
3216 PREFIXED_LEFT, 3223 PREFIXED_LEFT,
3217 PREFIXED_RIGHT, 3224 PREFIXED_RIGHT,
3218 PROPERTY_LEFT, 3225 PROPERTY_LEFT,
3219 PROPERTY_RIGHT, 3226 PROPERTY_RIGHT,
3220 NONE 3227 NONE
3221 ]; 3228 ];
3222 3229
3223 const WrapperKind(String name, int ordinal) : super(name, ordinal); 3230 const WrapperKind(String name, int ordinal) : super(name, ordinal);
3224 } 3231 }
OLDNEW
« 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