OLD | NEW |
(Empty) | |
| 1 dart_library.library('language/default_implementation_test', null, /* Imports */
[ |
| 2 'dart_sdk', |
| 3 'expect' |
| 4 ], function load__default_implementation_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 default_implementation_test = Object.create(null); |
| 11 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT
ype(dart.dynamic, [])))(); |
| 12 default_implementation_test.Point = class Point extends core.Object { |
| 13 static new(x, y) { |
| 14 return new default_implementation_test.PointImplementation(x, y); |
| 15 } |
| 16 }; |
| 17 dart.setSignature(default_implementation_test.Point, { |
| 18 constructors: () => ({new: dart.definiteFunctionType(default_implementation_
test.Point, [core.int, core.int])}) |
| 19 }); |
| 20 default_implementation_test.PointImplementation = class PointImplementation ex
tends core.Object { |
| 21 new(x, y) { |
| 22 this.x = x; |
| 23 this.y = y; |
| 24 } |
| 25 }; |
| 26 default_implementation_test.PointImplementation[dart.implements] = () => [defa
ult_implementation_test.Point]; |
| 27 dart.setSignature(default_implementation_test.PointImplementation, { |
| 28 constructors: () => ({new: dart.definiteFunctionType(default_implementation_
test.PointImplementation, [core.int, core.int])}) |
| 29 }); |
| 30 default_implementation_test.DefaultImplementationTest = class DefaultImplement
ationTest extends core.Object { |
| 31 static testMain() { |
| 32 let point = default_implementation_test.Point.new(4, 2); |
| 33 expect$.Expect.equals(4, point.x); |
| 34 expect$.Expect.equals(2, point.y); |
| 35 } |
| 36 }; |
| 37 dart.setSignature(default_implementation_test.DefaultImplementationTest, { |
| 38 statics: () => ({testMain: dart.definiteFunctionType(dart.void, [])}), |
| 39 names: ['testMain'] |
| 40 }); |
| 41 default_implementation_test.main = function() { |
| 42 default_implementation_test.DefaultImplementationTest.testMain(); |
| 43 }; |
| 44 dart.fn(default_implementation_test.main, VoidTodynamic()); |
| 45 // Exports: |
| 46 exports.default_implementation_test = default_implementation_test; |
| 47 }); |
OLD | NEW |