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

Side by Side Diff: test/codegen/expect/language/abstract_method_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 unified diff | Download patch
OLDNEW
(Empty)
1 dart_library.library('language/abstract_method_test', null, /* Imports */[
2 'dart_sdk',
3 'expect'
4 ], function load__abstract_method_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 abstract_method_test = Object.create(null);
11 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT ype(dart.dynamic, [])))();
12 dart.copyProperties(abstract_method_test, {
13 get length() {
14 return dart.throw("error: top-level getter called");
15 }
16 });
17 dart.copyProperties(abstract_method_test, {
18 set height(x) {
19 dart.throw("error: top-level setter called");
20 }
21 });
22 abstract_method_test.width = function() {
23 dart.throw("error: top-level function called");
24 };
25 dart.fn(abstract_method_test.width, VoidTodynamic());
26 abstract_method_test.A = class A extends core.Object {
27 get useLength() {
28 return this.length;
29 }
30 setHeight(x) {
31 return this.height = x;
32 }
33 useWidth() {
34 return this.width();
35 }
36 };
37 dart.setSignature(abstract_method_test.A, {
38 methods: () => ({
39 setHeight: dart.definiteFunctionType(dart.dynamic, [dart.dynamic]),
40 useWidth: dart.definiteFunctionType(dart.dynamic, [])
41 })
42 });
43 abstract_method_test.A1 = class A1 extends abstract_method_test.A {
44 width() {
45 return 345;
46 }
47 new(length) {
48 this.length = length;
49 this.height = null;
50 }
51 };
52 dart.setSignature(abstract_method_test.A1, {
53 constructors: () => ({new: dart.definiteFunctionType(abstract_method_test.A1 , [core.int])}),
54 methods: () => ({width: dart.definiteFunctionType(core.int, [])})
55 });
56 abstract_method_test.main = function() {
57 let a = new abstract_method_test.A1(123);
58 expect$.Expect.equals(123, a.useLength);
59 a.setHeight(234);
60 expect$.Expect.equals(234, a.height);
61 expect$.Expect.equals(345, a.useWidth());
62 core.print([a.useLength, a.height, a.useWidth()]);
63 };
64 dart.fn(abstract_method_test.main, VoidTodynamic());
65 // Exports:
66 exports.abstract_method_test = abstract_method_test;
67 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698