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

Unified Diff: tests/compiler/dart2js/dictionary_types_test.dart

Issue 2345083003: dart2js: run dartfmt on tests (Closed)
Patch Set: revert another multipart test Created 4 years, 3 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 | « tests/compiler/dart2js/diagnostic_reporter_helper.dart ('k') | tests/compiler/dart2js/dump_info_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/dictionary_types_test.dart
diff --git a/tests/compiler/dart2js/dictionary_types_test.dart b/tests/compiler/dart2js/dictionary_types_test.dart
index afe9db55249c446174ffa374db61b68ac60c85bc..2f52323f66c3ea4d4d4f5caa4d7c3b23145d6cd8 100644
--- a/tests/compiler/dart2js/dictionary_types_test.dart
+++ b/tests/compiler/dart2js/dictionary_types_test.dart
@@ -8,7 +8,7 @@ import 'memory_compiler.dart';
import 'compiler_helper.dart' show findElement;
var SOURCES = const {
-'AddAll.dart': """
+ 'AddAll.dart': """
var dictionaryA = {'string': "aString", 'int': 42, 'double': 21.5,
'list': []};
var dictionaryB = {'string': "aString", 'int': 42, 'double': 21.5,
@@ -28,7 +28,7 @@ var SOURCES = const {
nullOrInt = dictionaryB['intTwo'];
}
""",
-'Union.dart': """
+ 'Union.dart': """
var dictionaryA = {'string': "aString", 'int': 42, 'double': 21.5,
'list': []};
var dictionaryB = {'string': "aString", 'intTwo': 42, 'list': []};
@@ -44,7 +44,7 @@ var SOURCES = const {
doubleOrNull = union['double'];
}
""",
-'ValueType.dart': """
+ 'ValueType.dart': """
var dictionary = {'string': "aString", 'int': 42, 'double': 21.5, 'list': []};
var keyD = 'double';
var keyI = 'int';
@@ -58,7 +58,7 @@ var SOURCES = const {
var x = [intOrNull, justNull];
}
""",
-'Propagation.dart': """
+ 'Propagation.dart': """
class A {
A();
foo(value) {
@@ -84,7 +84,7 @@ var SOURCES = const {
print(it.foo(dictionary) + 2);
}
""",
-'Bailout.dart': """
+ 'Bailout.dart': """
var dict = makeMap([1,2]);
var notInt = 0;
var alsoNotInt = 0;
@@ -100,7 +100,8 @@ var SOURCES = const {
alsoNotInt = dict['goo'];
print("\$notInt and \$alsoNotInt.");
}
-"""};
+"""
+};
void main() {
asyncTest(() async {
@@ -133,9 +134,11 @@ void main() {
compileAndTest(source, checker, {createCode: false}) async {
CompilationResult result = await runCompiler(
- entryPoint: Uri.parse('memory:'+source),
+ entryPoint: Uri.parse('memory:' + source),
memorySourceFiles: SOURCES,
- beforeRun: (compiler) { compiler.stopAfterTypeInference = !createCode; });
+ beforeRun: (compiler) {
+ compiler.stopAfterTypeInference = !createCode;
+ });
var compiler = result.compiler;
var commonMasks = compiler.commonMasks;
var typesInferrer = compiler.globalInference.typesInferrer;
@@ -143,6 +146,7 @@ compileAndTest(source, checker, {createCode: false}) async {
var element = findElement(compiler, name);
return typesInferrer.getTypeOfElement(element);
}
+
if (!createCode) {
checker(commonMasks, getType, compiler);
} else {
« no previous file with comments | « tests/compiler/dart2js/diagnostic_reporter_helper.dart ('k') | tests/compiler/dart2js/dump_info_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698