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

Unified Diff: test/browser/language_tests.js

Issue 1316723003: implement null aware ops, fixes #249 (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: 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 | « lib/src/js/nodes.dart ('k') | test/codegen/language/async_star_test.dart » ('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 74383ab3636e495ca89da0f87ddba7e2f7f0b81f..32ccd9091dc3488ebdf08bded66f55d458ca0275 100644
--- a/test/browser/language_tests.js
+++ b/test/browser/language_tests.js
@@ -7,20 +7,52 @@
let _isolate_helper = dart_library.import('dart/_isolate_helper');
_isolate_helper.startRootIsolate(function() {}, []);
-
let async_helper = dart_library.import('async_helper/async_helper');
+ function dartLanguageTest(name) {
+ test(name, (done) => {
+ async_helper.asyncTestInitialize(done);
+ console.debug('Running language test: ' + name);
+ dart_library.import('language/' + name).main();
+ if (!async_helper.asyncTestStarted) done();
+ });
+ }
+
function dartLanguageTests(tests) {
- for (const name of tests) {
- test(name, (done) => {
- async_helper.asyncTestInitialize(done);
- console.debug('Running language test: ' + name);
- dart_library.import('language/' + name).main();
- if (!async_helper.asyncTestStarted) done();
- });
+ for (let name of tests) {
+ if (name instanceof Array) {
+ let multitestName = name[0];
+ let testCases = name.slice(1);
+ for (let testCase of testCases) {
+ if (typeof testCase == 'number') {
+ testCase = (testCase < 10 ? '0' : '') + testCase;
+ }
+ dartLanguageTest(`${multitestName}_${testCase}_multi`);
+ }
+ } else {
+ dartLanguageTest(name);
+ }
}
}
+ suite('null aware ops', () => {
+ dartLanguageTests([
+ ['conditional_method_invocation_test', 'none', 1, 2, 3, 4],
+ ['conditional_property_access_test', 'none', 1, 2, 3],
+ ['conditional_property_assignment_test', 'none', 1, 2, 3, 7, 8, 9],
+ ['conditional_property_increment_decrement_test',
+ 'none', 1, 2, 3, 5, 6, 7, 9, 10, 11, 13, 14, 15],
+ ['if_null_assignment_behavior_test', 'none',
+ 1, 2, 5, 6, 7, 8, 9, 10, 11, 12, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, 31, 32],
+ ['if_null_assignment_static_test', 'none',
+ 1, 3, 5, 8, 10, 12, 15, 17, 19, 22, 24, 26, 29, 31, 33, 36, 38, 40],
+ 'nullaware_opt_test',
+ ['super_conditional_operator_test', 'none'],
+ ['this_conditional_operator_test', 'none']
+ ]);
+ });
+
suite('sync*', () => {
test('syncstar_syntax', () => {
dart_library.import('syncstar_syntax').main();
@@ -60,7 +92,7 @@
]);
});
- dart_library.import('language/async_star_test').main();
+ dart_library.import('language/async_star_test_none_multi').main();
suite('async*', () => {
dartLanguageTests([
« no previous file with comments | « lib/src/js/nodes.dart ('k') | test/codegen/language/async_star_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698