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

Side by Side Diff: pkg/analyzer/test/generated/test_support.dart

Issue 682553002: Convert most of the EngineTestCase.createSource invocations into multi-line String literals. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 1 month 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.test_support; 8 library engine.test_support;
9 9
10 import 'dart:collection'; 10 import 'dart:collection';
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 return writer.toString(); 431 return writer.toString();
432 } 432 }
433 433
434 /** 434 /**
435 * @return the [AstNode] with requested type at offset of the "prefix". 435 * @return the [AstNode] with requested type at offset of the "prefix".
436 */ 436 */
437 static AstNode findNode(AstNode root, String code, String prefix, 437 static AstNode findNode(AstNode root, String code, String prefix,
438 Predicate<AstNode> predicate) { 438 Predicate<AstNode> predicate) {
439 int offset = code.indexOf(prefix); 439 int offset = code.indexOf(prefix);
440 if (offset == -1) { 440 if (offset == -1) {
441 throw new IllegalArgumentException("Not found '${prefix}'."); 441 throw new IllegalArgumentException("Not found '$prefix'.");
442 } 442 }
443 AstNode node = new NodeLocator.con1(offset).searchWithin(root); 443 AstNode node = new NodeLocator.con1(offset).searchWithin(root);
444 return node.getAncestor(predicate); 444 return node.getAncestor(predicate);
445 } 445 }
446 446
447 /** 447 /**
448 * Calculate the offset where the given strings differ. 448 * Calculate the offset where the given strings differ.
449 * 449 *
450 * @param str1 the first String to compare 450 * @param str1 the first String to compare
451 * @param str2 the second String to compare 451 * @param str2 the second String to compare
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after
1005 void getContentsToReceiver(Source_ContentReceiver receiver) { 1005 void getContentsToReceiver(Source_ContentReceiver receiver) {
1006 throw new UnsupportedOperationException(); 1006 throw new UnsupportedOperationException();
1007 } 1007 }
1008 Source resolve(String uri) { 1008 Source resolve(String uri) {
1009 throw new UnsupportedOperationException(); 1009 throw new UnsupportedOperationException();
1010 } 1010 }
1011 Uri resolveRelativeUri(Uri uri) { 1011 Uri resolveRelativeUri(Uri uri) {
1012 return new Uri(scheme: 'file', path: _name).resolveUri(uri); 1012 return new Uri(scheme: 'file', path: _name).resolveUri(uri);
1013 } 1013 }
1014 } 1014 }
OLDNEW
« no previous file with comments | « pkg/analyzer/test/generated/static_warning_code_test.dart ('k') | pkg/analyzer/test/task/task_dart_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698