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

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

Issue 2731313002: Fixes for map literal tests. (Closed)
Patch Set: Created 3 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 | 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/parser_fasta_test.dart
diff --git a/pkg/analyzer/test/generated/parser_fasta_test.dart b/pkg/analyzer/test/generated/parser_fasta_test.dart
index c88d82b1aa09b082728e7b184beb97c56b9f6de1..cd5912f7f2d31c2f5b59866c0faecb44fd8cb333 100644
--- a/pkg/analyzer/test/generated/parser_fasta_test.dart
+++ b/pkg/analyzer/test/generated/parser_fasta_test.dart
@@ -551,42 +551,6 @@ class ExpressionParserTest_Fasta extends FastaParserTestCase
@override
@failingTest
- void test_parseMapLiteral_empty() {
- super.test_parseMapLiteral_empty();
- }
-
- @override
- @failingTest
- void test_parseMapLiteral_multiple() {
- super.test_parseMapLiteral_multiple();
- }
-
- @override
- @failingTest
- void test_parseMapLiteral_single() {
- super.test_parseMapLiteral_single();
- }
-
- @override
- @failingTest
- void test_parseMapLiteralEntry_complex() {
- super.test_parseMapLiteralEntry_complex();
- }
-
- @override
- @failingTest
- void test_parseMapLiteralEntry_int() {
- super.test_parseMapLiteralEntry_int();
- }
-
- @override
- @failingTest
- void test_parseMapLiteralEntry_string() {
- super.test_parseMapLiteralEntry_string();
- }
-
- @override
- @failingTest
void
test_parsePostfixExpression_none_methodInvocation_question_dot_typeArgumentComments() {
super
@@ -949,12 +913,12 @@ class FastaParserTestCase extends Object
sc += typeArgumentsCode;
}
sc += code;
- return _parseExpression(sc);
+ return _parseMapLiteralCode(sc);
}
@override
MapLiteralEntry parseMapLiteralEntry(String code) {
- return (_parseExpression('{$code}') as MapLiteral).entries.single;
+ return _parseMapLiteralCode('{$code}').entries.single;
}
@override
@@ -1055,6 +1019,12 @@ class FastaParserTestCase extends Object
return statement.expression;
}
+ MapLiteral _parseMapLiteralCode(String code) {
+ var statement =
+ parseStatement('var v = $code;') as VariableDeclarationStatement;
+ return statement.variables.variables.single.initializer as MapLiteral;
+ }
+
Object _runParser(
String source, ParseFunction getParseFunction(fasta.Parser parser),
[List<ErrorCode> errorCodes = const <ErrorCode>[]]) {
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/parser_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698