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

Unified Diff: test/codegen/expect/unittest.js

Issue 1507343013: Run tests on Chrome stable by default (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Created 5 years 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 | « test/codegen/expect/temps.js ('k') | test/codegen/expect/unittest/unittest.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/codegen/expect/unittest.js
diff --git a/test/codegen/expect/unittest.js b/test/codegen/expect/unittest.js
index ee70be60eaa33dc25f25e6c1d74906e3c85f9975..2018b5bad47b455c8c341a3c080afd7d498666b3 100644
--- a/test/codegen/expect/unittest.js
+++ b/test/codegen/expect/unittest.js
@@ -16,7 +16,8 @@ dart_library.library('unittest', null, /* Imports */[
return dart.dsend(dom.window, 'suite', name, body);
}
dart.fn(group, dart.void, [core.String, dart.functionType(dart.void, [])]);
- function test(name, body, {skip = null} = {}) {
+ function test(name, body, opts) {
+ let skip = opts && 'skip' in opts ? opts.skip : null;
if (skip != null) {
core.print(`SKIP ${name}: ${skip}`);
return;
@@ -46,7 +47,10 @@ dart_library.library('unittest', null, /* Imports */[
constructors: () => ({TestFailure: [TestFailure, [core.String]]})
});
const ErrorFormatter = dart.typedef('ErrorFormatter', () => dart.functionType(core.String, [dart.dynamic, interfaces.Matcher, core.String, core.Map, core.bool]));
- function expect(actual, matcher, {reason = null, verbose = false, formatter = null} = {}) {
+ function expect(actual, matcher, opts) {
+ let reason = opts && 'reason' in opts ? opts.reason : null;
+ let verbose = opts && 'verbose' in opts ? opts.verbose : false;
+ let formatter = opts && 'formatter' in opts ? opts.formatter : null;
matcher = util.wrapMatcher(matcher);
let matchState = dart.map();
try {
« no previous file with comments | « test/codegen/expect/temps.js ('k') | test/codegen/expect/unittest/unittest.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698