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

Unified Diff: test/util/string_literal_iterator_test.dart

Issue 1059883002: pkg/test: silence analyzer about downcast (Closed) Base URL: https://github.com/dart-lang/unittest.git@master
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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/util/string_literal_iterator_test.dart
diff --git a/test/util/string_literal_iterator_test.dart b/test/util/string_literal_iterator_test.dart
index 0ab3104d6718ad86b6e4f1f534095185d4d10815..4b243dc798cbaa1a55dc2109c86d0179ce55b659 100644
--- a/test/util/string_literal_iterator_test.dart
+++ b/test/util/string_literal_iterator_test.dart
@@ -239,7 +239,8 @@ Matcher _isRune(String char) {
/// Parses [dart], which should be a string literal, into a
/// [StringLiteralIterator].
StringLiteralIterator _parse(String dart) {
- var literal = parseCompilationUnit("final str = $dart;")
- .declarations.single.variables.variables.single.initializer;
+ var declaration =
+ parseCompilationUnit("final str = $dart;").declarations.single;
+ var literal = declaration.variables.variables.single.initializer;
return new StringLiteralIterator(literal);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698