OLD | NEW |
(Empty) | |
| 1 dart_library.library('language/const_init_test', null, /* Imports */[ |
| 2 'dart_sdk', |
| 3 'expect' |
| 4 ], function load__const_init_test(exports, dart_sdk, expect) { |
| 5 'use strict'; |
| 6 const core = dart_sdk.core; |
| 7 const dart = dart_sdk.dart; |
| 8 const dartx = dart_sdk.dartx; |
| 9 const expect$ = expect.expect; |
| 10 const const_init_test = Object.create(null); |
| 11 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT
ype(dart.dynamic, [])))(); |
| 12 const_init_test.Point = class Point extends core.Object { |
| 13 new(x, y) { |
| 14 this.x_ = x; |
| 15 this.y_ = y; |
| 16 } |
| 17 }; |
| 18 dart.setSignature(const_init_test.Point, { |
| 19 constructors: () => ({new: dart.definiteFunctionType(const_init_test.Point,
[dart.dynamic, dart.dynamic])}) |
| 20 }); |
| 21 const_init_test.ConstInitTest = class ConstInitTest extends core.Object { |
| 22 static testMain() { |
| 23 expect$.Expect.equals(1, const_init_test.ConstInitTest.N); |
| 24 expect$.Expect.equals(4, const_init_test.ConstInitTest.O); |
| 25 expect$.Expect.equals(6, const_init_test.ConstInitTest.P); |
| 26 expect$.Expect.equals(0, const_init_test.ConstInitTest.Q.x_); |
| 27 expect$.Expect.equals(0, const_init_test.ConstInitTest.Q.y_); |
| 28 } |
| 29 }; |
| 30 dart.setSignature(const_init_test.ConstInitTest, { |
| 31 statics: () => ({testMain: dart.definiteFunctionType(dart.dynamic, [])}), |
| 32 names: ['testMain'] |
| 33 }); |
| 34 const_init_test.ConstInitTest.N = 1; |
| 35 const_init_test.ConstInitTest.O = 1 + 3; |
| 36 const_init_test.ConstInitTest.Q = dart.const(new const_init_test.Point(0, 0)); |
| 37 const_init_test.ConstInitTest.Q2 = dart.const(new const_init_test.Point(0, 0))
; |
| 38 const_init_test.ConstInitTest.O2 = 1 + 3; |
| 39 const_init_test.ConstInitTest.N2 = 1; |
| 40 dart.defineLazy(const_init_test.ConstInitTest, { |
| 41 get P() { |
| 42 return 2 * (const_init_test.ConstInitTest.O - const_init_test.ConstInitTes
t.N); |
| 43 }, |
| 44 get P2() { |
| 45 return 2 * (const_init_test.ConstInitTest.O - const_init_test.ConstInitTes
t.N); |
| 46 } |
| 47 }); |
| 48 const_init_test.main = function() { |
| 49 const_init_test.ConstInitTest.testMain(); |
| 50 }; |
| 51 dart.fn(const_init_test.main, VoidTodynamic()); |
| 52 // Exports: |
| 53 exports.const_init_test = const_init_test; |
| 54 }); |
OLD | NEW |