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

Unified Diff: test/codegen/expect/language/constructor11_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/constructor11_test.js
diff --git a/test/codegen/expect/language/constructor11_test.js b/test/codegen/expect/language/constructor11_test.js
new file mode 100644
index 0000000000000000000000000000000000000000..0b03c11126dabb90c9b2156fe8b349d94e5734cb
--- /dev/null
+++ b/test/codegen/expect/language/constructor11_test.js
@@ -0,0 +1,70 @@
+dart_library.library('language/constructor11_test', null, /* Imports */[
+ 'dart_sdk',
+ 'expect'
+], function load__constructor11_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 constructor11_test = Object.create(null);
+ let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [])))();
+ constructor11_test.A = class A extends core.Object {
+ new(x) {
+ if (x === void 0) x = 499;
+ this.x = x;
+ }
+ };
+ dart.setSignature(constructor11_test.A, {
+ constructors: () => ({new: dart.definiteFunctionType(constructor11_test.A, [], [dart.dynamic])})
+ });
+ constructor11_test.B = class B extends constructor11_test.A {
+ new() {
+ super.new();
+ }
+ };
+ constructor11_test.X = class X extends core.Object {
+ new(x) {
+ if (x === void 0) x = 42;
+ this.x = x;
+ }
+ };
+ dart.setSignature(constructor11_test.X, {
+ constructors: () => ({new: dart.definiteFunctionType(constructor11_test.X, [], [dart.dynamic])})
+ });
+ constructor11_test.Y = class Y extends constructor11_test.X {
+ new() {
+ super.new();
+ }
+ };
+ constructor11_test.Z = class Z extends constructor11_test.Y {
+ new() {
+ }
+ };
+ dart.setSignature(constructor11_test.Z, {
+ constructors: () => ({new: dart.definiteFunctionType(constructor11_test.Z, [])})
+ });
+ constructor11_test.F = class F extends core.Object {
+ new(x) {
+ if (x === void 0) x = 99;
+ this.x = x;
+ }
+ };
+ dart.setSignature(constructor11_test.F, {
+ constructors: () => ({new: dart.definiteFunctionType(constructor11_test.F, [], [dart.dynamic])})
+ });
+ constructor11_test.G = class G extends constructor11_test.F {
+ new() {
+ super.new();
+ }
+ };
+ constructor11_test.H = class H extends constructor11_test.G {};
+ constructor11_test.main = function() {
+ expect$.Expect.equals(499, new constructor11_test.B().x);
+ expect$.Expect.equals(42, new constructor11_test.Z().x);
+ expect$.Expect.equals(99, new constructor11_test.H().x);
+ };
+ dart.fn(constructor11_test.main, VoidTodynamic());
+ // Exports:
+ exports.constructor11_test = constructor11_test;
+});
« no previous file with comments | « test/codegen/expect/language/constructor10_test_none_multi.js ('k') | test/codegen/expect/language/constructor12_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698