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

Unified Diff: test/codegen/expect/language/mixin_typedef_constructor_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
Index: test/codegen/expect/language/mixin_typedef_constructor_test.js
diff --git a/test/codegen/expect/language/mixin_typedef_constructor_test.js b/test/codegen/expect/language/mixin_typedef_constructor_test.js
new file mode 100644
index 0000000000000000000000000000000000000000..74d13159ced69c94eb1709ab7fcbdb98fdfc8538
--- /dev/null
+++ b/test/codegen/expect/language/mixin_typedef_constructor_test.js
@@ -0,0 +1,38 @@
+dart_library.library('language/mixin_typedef_constructor_test', null, /* Imports */[
+ 'dart_sdk',
+ 'expect'
+], function load__mixin_typedef_constructor_test(exports, dart_sdk, expect) {
+ 'use strict';
+ const core = dart_sdk.core;
+ const dart = dart_sdk.dart;
+ const dartx = dart_sdk.dartx;
+ const expect$ = expect.expect;
+ const mixin_typedef_constructor_test = Object.create(null);
+ let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [])))();
+ mixin_typedef_constructor_test.A = class A extends core.Object {
+ new(field) {
+ this.field = field;
+ }
+ };
+ dart.setSignature(mixin_typedef_constructor_test.A, {
+ constructors: () => ({new: dart.definiteFunctionType(mixin_typedef_constructor_test.A, [dart.dynamic])})
+ });
+ mixin_typedef_constructor_test.Mixin = class Mixin extends core.Object {
+ new() {
+ this.mixinField = 54;
+ }
+ };
+ mixin_typedef_constructor_test.MyClass = class MyClass extends dart.mixin(mixin_typedef_constructor_test.A, mixin_typedef_constructor_test.Mixin) {
+ new(field) {
+ super.new(field);
+ }
+ };
+ mixin_typedef_constructor_test.main = function() {
+ let a = new mixin_typedef_constructor_test.MyClass(42);
+ expect$.Expect.equals(42, a.field);
+ expect$.Expect.equals(54, a.mixinField);
+ };
+ dart.fn(mixin_typedef_constructor_test.main, VoidTodynamic());
+ // Exports:
+ exports.mixin_typedef_constructor_test = mixin_typedef_constructor_test;
+});

Powered by Google App Engine
This is Rietveld 408576698