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

Side by Side Diff: test/codegen/expect/unittest.js

Issue 1261783005: fixes #197, don't generate casts that always pass (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 unified diff | Download patch
« no previous file with comments | « test/codegen/expect/sunflower/sunflower.html ('k') | test/codegen/expect/unittest/unittest.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 dart_library.library('unittest', null, /* Imports */[ 1 dart_library.library('unittest', null, /* Imports */[
2 "dart_runtime/dart", 2 "dart_runtime/dart",
3 'dom/dom', 3 'dom/dom',
4 'dart/core', 4 'dart/core',
5 'dart/async' 5 'dart/async'
6 ], /* Lazy imports */[ 6 ], /* Lazy imports */[
7 ], function(exports, dart, dom, core, async) { 7 ], function(exports, dart, dom, core, async) {
8 'use strict'; 8 'use strict';
9 let dartx = dart.dartx; 9 let dartx = dart.dartx;
10 function group(name, body) { 10 function group(name, body) {
11 return dart.dsend(dart.as(dom.window, dart.dynamic), 'suite', name, body); 11 return dart.dsend(dom.window, 'suite', name, body);
12 } 12 }
13 dart.fn(group, dart.void, [core.String, dart.functionType(dart.void, [])]); 13 dart.fn(group, dart.void, [core.String, dart.functionType(dart.void, [])]);
14 function test(name, body, opts) { 14 function test(name, body, opts) {
15 let skip = opts && 'skip' in opts ? opts.skip : null; 15 let skip = opts && 'skip' in opts ? opts.skip : null;
16 if (skip != null) { 16 if (skip != null) {
17 core.print(`SKIP ${name}: ${skip}`); 17 core.print(`SKIP ${name}: ${skip}`);
18 return; 18 return;
19 } 19 }
20 dart.dsend(dart.as(dom.window, dart.dynamic), 'test', name, dart.fn(done => { 20 dart.dsend(dom.window, 'test', name, dart.fn(done => {
21 function _finishTest(f) { 21 function _finishTest(f) {
22 if (dart.is(f, async.Future)) { 22 if (dart.is(f, async.Future)) {
23 dart.dsend(f, 'then', _finishTest); 23 dart.dsend(f, 'then', _finishTest);
24 } else { 24 } else {
25 dart.dcall(done); 25 dart.dcall(done);
26 } 26 }
27 } 27 }
28 dart.fn(_finishTest); 28 dart.fn(_finishTest);
29 _finishTest(body()); 29 _finishTest(body());
30 })); 30 }));
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 exports.isNot = isNot; 128 exports.isNot = isNot;
129 exports.isTrue = isTrue; 129 exports.isTrue = isTrue;
130 exports.isNull = isNull; 130 exports.isNull = isNull;
131 exports.isRangeError = isRangeError; 131 exports.isRangeError = isRangeError;
132 exports.isNoSuchMethodError = isNoSuchMethodError; 132 exports.isNoSuchMethodError = isNoSuchMethodError;
133 exports.lessThan = lessThan; 133 exports.lessThan = lessThan;
134 exports.greaterThan = greaterThan; 134 exports.greaterThan = greaterThan;
135 exports.throwsA = throwsA; 135 exports.throwsA = throwsA;
136 exports.Matcher = Matcher; 136 exports.Matcher = Matcher;
137 }); 137 });
OLDNEW
« no previous file with comments | « test/codegen/expect/sunflower/sunflower.html ('k') | test/codegen/expect/unittest/unittest.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698