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

Unified Diff: test/browser/language_tests.js

Issue 1257233008: fix language_tests.js to use strict mode (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: add comment Created 5 years, 4 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 | « karma.conf.js ('k') | test/codegen/expect/js_test.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/browser/language_tests.js
diff --git a/test/browser/language_tests.js b/test/browser/language_tests.js
index 3b691787f806b666f31f4f2cdba3dd39b76174ee..5366c0ba2332552684d21448c2b66cb8543a2b13 100644
--- a/test/browser/language_tests.js
+++ b/test/browser/language_tests.js
@@ -2,67 +2,70 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-var _isolate_helper = dart_library.import('dart/_isolate_helper');
-_isolate_helper.startRootIsolate(function() {}, []);
+(function() {
+ 'use strict';
-function dartLanguageTests(tests) {
- for (const name of tests) {
- test(name, () => {
- dart_library.import('language/' + name).main();
- })
+ let _isolate_helper = dart_library.import('dart/_isolate_helper');
+ _isolate_helper.startRootIsolate(function() {}, []);
+
+ function dartLanguageTests(tests) {
+ for (const name of tests) {
+ test(name, () => {
+ console.debug('Running language test: ' + name);
+ dart_library.import('language/' + name).main();
+ });
+ }
}
-}
-suite('sync*', () => {
- "use strict";
+ suite('sync*', () => {
+ test('syncstar_syntax', () => {
+ dart_library.import('syncstar_syntax').main();
+ });
- test('syncstar_syntax', () => {
- dart_library.import('syncstar_syntax').main();
+ dartLanguageTests([
+ 'syncstar_yield_test',
+ 'syncstar_yieldstar_test'
+ ]);
});
- dartLanguageTests([
- 'syncstar_yield_test',
- 'syncstar_yieldstart_test'
- ]);
-});
-
-dart_library.import('language/async_await_test').main();
+ dart_library.import('language/async_await_test').main();
-suite('async', () => {
- dartLanguageTests([
- 'async_and_or_test',
- 'async_await_catch_regression_test',
- // TODO(jmesserly): fix errors
- // 'async_backwards_compatibility_1_test',
- 'async_backwards_compatibility_2_test',
- 'async_break_in_finally_test',
- // TODO(jmesserly): https://github.com/dart-lang/dev_compiler/issues/263
- // 'async_continue_label_test',
- 'async_control_structures_test',
- 'async_finally_rethrow_test',
- // TODO(jmesserly): fix errors
- // 'async_or_generator_return_type_stacktrace_test',
- 'async_regression_23058_test',
- 'async_rethrow_test',
- // TODO(jmesserly): fix errors
- // 'async_return_types_test',
- 'async_switch_test',
- 'async_test',
- 'async_this_bound_test',
- 'async_throw_in_catch_test'
- ]);
-})
+ suite('async', () => {
+ dartLanguageTests([
+ 'async_and_or_test',
+ 'async_await_catch_regression_test',
+ // TODO(jmesserly): fix errors
+ // 'async_backwards_compatibility_1_test',
+ 'async_backwards_compatibility_2_test',
+ 'async_break_in_finally_test',
+ // TODO(jmesserly): https://github.com/dart-lang/dev_compiler/issues/263
+ // 'async_continue_label_test',
+ 'async_control_structures_test',
+ 'async_finally_rethrow_test',
+ // TODO(jmesserly): fix errors
+ // 'async_or_generator_return_type_stacktrace_test',
+ 'async_regression_23058_test',
+ 'async_rethrow_test',
+ // TODO(jmesserly): fix errors
+ // 'async_return_types_test',
+ 'async_switch_test',
+ 'async_test',
+ 'async_this_bound_test',
+ 'async_throw_in_catch_test'
+ ]);
+ });
-dart_library.import('language/async_star_test').main();
+ dart_library.import('language/async_star_test').main();
-suite('async*', () => {
- dartLanguageTests([
- // TODO(jmesserly): figure out why this test is hanging.
- //'async_star_cancel_and_throw_in_finally_test',
- 'async_star_regression_23116_test',
- 'asyncstar_concat_test',
- 'asyncstar_throw_in_catch_test',
- 'asyncstar_yield_test',
- 'asyncstar_yieldstar_test'
- ]);
-});
+ suite('async*', () => {
+ dartLanguageTests([
+ // TODO(jmesserly): figure out why this test is hanging.
+ //'async_star_cancel_and_throw_in_finally_test',
+ 'async_star_regression_23116_test',
+ 'asyncstar_concat_test',
+ 'asyncstar_throw_in_catch_test',
+ 'asyncstar_yield_test',
+ 'asyncstar_yieldstar_test'
+ ]);
+ });
+})();
« no previous file with comments | « karma.conf.js ('k') | test/codegen/expect/js_test.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698