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

Unified Diff: tests/compiler/dart2js/js_safety_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/js_parser_test.dart ('k') | tests/compiler/dart2js/js_spec_optimization_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/compiler/dart2js/js_safety_test.dart
diff --git a/tests/compiler/dart2js/js_safety_test.dart b/tests/compiler/dart2js/js_safety_test.dart
index 140f4b6a7195c3f4d3ff9364cfa980e97f41e0fc..9a2df543adec347694dc3cbcfa39fb9eb3663d0e 100644
--- a/tests/compiler/dart2js/js_safety_test.dart
+++ b/tests/compiler/dart2js/js_safety_test.dart
@@ -6,14 +6,13 @@ import 'package:expect/expect.dart';
import 'package:compiler/src/js/js.dart' as js;
import 'package:compiler/src/js/placeholder_safety.dart';
-void test(String source, int expected, {List notNull: const[]}) {
- var predicate = (int pos) => ! notNull.contains(pos);
+void test(String source, int expected, {List notNull: const []}) {
+ var predicate = (int pos) => !notNull.contains(pos);
js.Template template = js.js.parseForeignJS(source);
int actual = PlaceholderSafetyAnalysis.analyze(template.ast, predicate);
Expect.equals(expected, actual, 'source: "$source", notNull: $notNull');
}
-
void main() {
test('0', 0);
@@ -39,7 +38,7 @@ void main() {
test('#.x == 1 || # == 1', 1);
test('# == 1 || #.x == 1', 1);
- test('(# || 1, #)', 1); // Could also be 2.
+ test('(# || 1, #)', 1); // Could also be 2.
test('(#, null.a, #)', 1);
test('(#, undefined.a, #)', 1);
@@ -96,7 +95,7 @@ void main() {
test('# ? # : #', 1);
test('(# ? 1 : #, #)', 1);
test('(# ? # : 2, #)', 1);
- test('(# ? 1 : 2, #)', 1); // Could also be 4.
+ test('(# ? 1 : 2, #)', 1); // Could also be 4.
test('{A:#, B:#, C:#}', 3);
test('[#,#,#,#]', 4);
« no previous file with comments | « tests/compiler/dart2js/js_parser_test.dart ('k') | tests/compiler/dart2js/js_spec_optimization_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698