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

Unified Diff: test/codegen/expect/language/private_member_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/private_member_test.js
diff --git a/test/codegen/expect/language/private_member_test.js b/test/codegen/expect/language/private_member_test.js
new file mode 100644
index 0000000000000000000000000000000000000000..c836e32b314fd26b58852c85511c54d17e912475
--- /dev/null
+++ b/test/codegen/expect/language/private_member_test.js
@@ -0,0 +1,72 @@
+dart_library.library('language/private_member_test', null, /* Imports */[
+ 'dart_sdk'
+], function load__private_member_test(exports, dart_sdk) {
+ 'use strict';
+ const core = dart_sdk.core;
+ const dart = dart_sdk.dart;
+ const dartx = dart_sdk.dartx;
+ const private_member_test = Object.create(null);
+ const private_member_lib_b = Object.create(null);
+ let VoidTovoid = () => (VoidTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [])))();
+ const _instanceField = Symbol('_instanceField');
+ const _fun1 = Symbol('_fun1');
+ const _fun2 = Symbol('_fun2');
+ private_member_test.A = class A extends core.Object {
+ new() {
+ this.i = null;
+ this[_instanceField] = null;
+ }
+ [_fun1]() {
+ return 1;
+ }
+ [_fun2](i) {}
+ };
+ dart.setSignature(private_member_test.A, {
+ methods: () => ({
+ [_fun1]: dart.definiteFunctionType(core.int, []),
+ [_fun2]: dart.definiteFunctionType(dart.void, [core.int])
+ })
+ });
+ private_member_test.A._staticField = null;
+ const _instanceField$ = Symbol('_instanceField');
+ const _fun1$ = Symbol('_fun1');
+ const _fun2$ = Symbol('_fun2');
+ private_member_lib_b.B = class B extends private_member_test.A {
+ new() {
+ this[_instanceField$] = null;
+ super.new();
+ }
+ [_fun1$](b) {
+ return true;
+ }
+ [_fun2$]() {}
+ };
+ dart.setSignature(private_member_lib_b.B, {
+ methods: () => ({
+ [_fun1$]: dart.definiteFunctionType(core.bool, [core.bool]),
+ [_fun2$]: dart.definiteFunctionType(dart.void, [])
+ })
+ });
+ private_member_lib_b.B._staticField = null;
+ private_member_test.Test = class Test extends private_member_lib_b.B {
+ new() {
+ super.new();
+ }
+ test() {
+ this.i = this[_instanceField];
+ this.i = private_member_test.A._staticField;
+ this.i = this[_fun1]();
+ this[_fun2](42);
+ }
+ };
+ dart.setSignature(private_member_test.Test, {
+ methods: () => ({test: dart.definiteFunctionType(dart.dynamic, [])})
+ });
+ private_member_test.main = function() {
+ new private_member_test.Test().test();
+ };
+ dart.fn(private_member_test.main, VoidTovoid());
+ // Exports:
+ exports.private_member_test = private_member_test;
+ exports.private_member_lib_b = private_member_lib_b;
+});
« no previous file with comments | « test/codegen/expect/language/private_member3_negative_test.js ('k') | test/codegen/expect/language/private_mixin2_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698