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

Side by Side Diff: test/codegen/expect/language/private4_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/private4_test', null, /* Imports */[
2 'dart_sdk',
3 'expect'
4 ], function load__private4_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 private4_test = Object.create(null);
11 const other_library = Object.create(null);
12 let VoidTovoid = () => (VoidTovoid = dart.constFn(dart.definiteFunctionType(da rt.void, [])))();
13 let dynamicTobool = () => (dynamicTobool = dart.constFn(dart.definiteFunctionT ype(core.bool, [dart.dynamic])))();
14 let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionT ype(dart.dynamic, [])))();
15 let dynamicTodynamic = () => (dynamicTodynamic = dart.constFn(dart.definiteFun ctionType(dart.dynamic, [dart.dynamic])))();
16 private4_test.main = function() {
17 expect$.Expect.equals(42, other_library.foo(new other_library.A()));
18 expect$.Expect.throws(dart.fn(() => other_library.foo(new private4_test.B()) , VoidTovoid()), dart.fn(e => core.NoSuchMethodError.is(e), dynamicTobool()));
19 };
20 dart.fn(private4_test.main, VoidTodynamic());
21 const _bar = Symbol('_bar');
22 private4_test.B = class B extends core.Object {
23 [_bar]() {
24 return 42;
25 }
26 };
27 dart.setSignature(private4_test.B, {
28 methods: () => ({[_bar]: dart.definiteFunctionType(dart.dynamic, [])})
29 });
30 const _bar$ = Symbol('_bar');
31 other_library.foo = function(a) {
32 return dart.dsend(a, _bar$);
33 };
34 dart.fn(other_library.foo, dynamicTodynamic());
35 other_library.A = class A extends core.Object {
36 [_bar$]() {
37 return 42;
38 }
39 };
40 dart.setSignature(other_library.A, {
41 methods: () => ({[_bar$]: dart.definiteFunctionType(dart.dynamic, [])})
42 });
43 // Exports:
44 exports.private4_test = private4_test;
45 exports.other_library = other_library;
46 });
OLDNEW
« no previous file with comments | « test/codegen/expect/language/private3_test.js ('k') | test/codegen/expect/language/private_access_test_01_multi.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698