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

Unified Diff: test/browser/runtime_tests.js

Issue 1149243002: Allow null args to dynamic invocations (Closed) Base URL: git@github.com:dart-lang/dart-dev-compiler.git@master
Patch Set: Created 5 years, 7 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/codegen/js_codegen.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/browser/runtime_tests.js
diff --git a/test/browser/runtime_tests.js b/test/browser/runtime_tests.js
index b43b32d872bca821f35a0be7588336b813cdfe99..6bcc008c72cf66559012669f9bd97f1a31883f6a 100644
--- a/test/browser/runtime_tests.js
+++ b/test/browser/runtime_tests.js
@@ -456,27 +456,32 @@ suite('instanceOf', () => {
// Method send
assert.equal(dart.dsend(o, 'm', 3, 4), 3);
+ assert.equal(dart.dsend(o, 'm', null, 4), null);
assert.throws(() => dart.dsend(o, 'm', 3));
assert.throws(() => dart.dsend(o, 'm', "hello", "world"));
assert.throws(() => dart.dsend(o, 'q', 3));
// Method send through a field
assert.equal(dart.dsend(o, 'f', 3), 3);
+ assert.equal(dart.dsend(o, 'f', null), null);
assert.throws(() => dart.dsend(o, 'f', "hello"));
assert.throws(() => dart.dsend(o, 'f', 3, 4));
// Static method call
assert.equal(dart.dcall(Tester.s, "hello"), "hello");
+ assert.equal(dart.dcall(Tester.s, null), null);
assert.throws(() => dart.dcall(Tester.s, "hello", "world"));
assert.throws(() => dart.dcall(Tester.s, 0, 1));
// Calling an object with a call method
assert.equal(dart.dcall(o, 3), 3);
+ assert.equal(dart.dcall(o, null), null);
assert.throws(() => dart.dcall(o, "hello"));
assert.throws(() => dart.dcall(o, 3, 4));
// Calling through a field containing an object with a call method
assert.equal(dart.dsend(o, 'me', 3), 3);
+ assert.equal(dart.dsend(o, 'me', null), null);
assert.throws(() => dart.dsend(o, 'me', "hello"));
assert.throws(() => dart.dsend(o, 'me', 3, 4));
});
« no previous file with comments | « lib/src/codegen/js_codegen.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698