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

Unified Diff: test/codegen/expect/language/list_mixin_test.js

Issue 2128353002: Check in codegen test expectations. (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 4 years, 5 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 | « test/codegen/expect/language/list_literal_test.js ('k') | test/codegen/expect/language/list_test.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/codegen/expect/language/list_mixin_test.js
diff --git a/test/codegen/expect/language/list_mixin_test.js b/test/codegen/expect/language/list_mixin_test.js
new file mode 100644
index 0000000000000000000000000000000000000000..a831d00516697771f8c4a0199126f31f80df4aec
--- /dev/null
+++ b/test/codegen/expect/language/list_mixin_test.js
@@ -0,0 +1,45 @@
+dart_library.library('language/list_mixin_test', null, /* Imports */[
+ 'dart_sdk',
+ 'expect'
+], function load__list_mixin_test(exports, dart_sdk, expect) {
+ 'use strict';
+ const core = dart_sdk.core;
+ const collection = dart_sdk.collection;
+ const dart = dart_sdk.dart;
+ const dartx = dart_sdk.dartx;
+ const expect$ = expect.expect;
+ const list_mixin_test = Object.create(null);
+ let dynamicTovoid = () => (dynamicTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [dart.dynamic])))();
+ let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [])))();
+ list_mixin_test.MyList = class MyList extends collection.ListBase {
+ get length() {
+ return 4;
+ }
+ set length(x) {}
+ get(x) {
+ return 42;
+ }
+ set(x, val) {
+ return val;
+ }
+ };
+ dart.addSimpleTypeTests(list_mixin_test.MyList);
+ dart.setSignature(list_mixin_test.MyList, {
+ methods: () => ({
+ get: dart.definiteFunctionType(core.int, [core.int]),
+ set: dart.definiteFunctionType(dart.void, [core.int, dart.dynamic])
+ })
+ });
+ dart.defineExtensionMembers(list_mixin_test.MyList, ['get', 'set', 'length', 'length']);
+ list_mixin_test.main = function() {
+ let x = new list_mixin_test.MyList();
+ let z = 0;
+ x.forEach(dart.fn(y => {
+ z = dart.notNull(z) + dart.notNull(core.int._check(y));
+ }, dynamicTovoid()));
+ expect$.Expect.equals(z, 4 * 42);
+ };
+ dart.fn(list_mixin_test.main, VoidTodynamic());
+ // Exports:
+ exports.list_mixin_test = list_mixin_test;
+});
« no previous file with comments | « test/codegen/expect/language/list_literal_test.js ('k') | test/codegen/expect/language/list_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698