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

Unified Diff: test/codegen/expect/language/setter2_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
« no previous file with comments | « test/codegen/expect/language/setter1_test.js ('k') | test/codegen/expect/language/setter3_test_01_multi.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/codegen/expect/language/setter2_test.js
diff --git a/test/codegen/expect/language/setter2_test.js b/test/codegen/expect/language/setter2_test.js
new file mode 100644
index 0000000000000000000000000000000000000000..3527c5e82a637ae7cfd9984fa5484e03408378d3
--- /dev/null
+++ b/test/codegen/expect/language/setter2_test.js
@@ -0,0 +1,61 @@
+dart_library.library('language/setter2_test', null, /* Imports */[
+ 'dart_sdk',
+ 'expect'
+], function load__setter2_test(exports, dart_sdk, expect) {
+ 'use strict';
+ const core = dart_sdk.core;
+ const dart = dart_sdk.dart;
+ const dartx = dart_sdk.dartx;
+ const expect$ = expect.expect;
+ const setter2_test = Object.create(null);
+ let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [])))();
+ setter2_test.Nested = class Nested extends core.Object {
+ new(val) {
+ this.a = val;
+ }
+ foo(i) {
+ return i;
+ }
+ };
+ dart.setSignature(setter2_test.Nested, {
+ constructors: () => ({new: dart.definiteFunctionType(setter2_test.Nested, [core.int])}),
+ methods: () => ({foo: dart.definiteFunctionType(core.int, [core.int])})
+ });
+ setter2_test.Second = class Second extends core.Object {
+ new(val) {
+ this.a = null;
+ }
+ bar(value) {
+ this.a = value;
+ setter2_test.Second.obj.a = setter2_test.Second.obj.foo(this.a);
+ this.a = 100;
+ expect$.Expect.equals(100, this.a);
+ }
+ };
+ dart.setSignature(setter2_test.Second, {
+ constructors: () => ({new: dart.definiteFunctionType(setter2_test.Second, [core.int])}),
+ methods: () => ({bar: dart.definiteFunctionType(dart.void, [core.int])})
+ });
+ setter2_test.Second.obj = null;
+ setter2_test.Setter2Test = class Setter2Test extends core.Object {
+ static testMain() {
+ let obj = new setter2_test.Second(10);
+ setter2_test.Second.obj = new setter2_test.Nested(10);
+ setter2_test.Second.obj.a = 10;
+ expect$.Expect.equals(10, setter2_test.Second.obj.a);
+ expect$.Expect.equals(10, setter2_test.Second.obj.foo(10));
+ obj.bar(20);
+ expect$.Expect.equals(20, setter2_test.Second.obj.a);
+ }
+ };
+ dart.setSignature(setter2_test.Setter2Test, {
+ statics: () => ({testMain: dart.definiteFunctionType(dart.dynamic, [])}),
+ names: ['testMain']
+ });
+ setter2_test.main = function() {
+ setter2_test.Setter2Test.testMain();
+ };
+ dart.fn(setter2_test.main, VoidTodynamic());
+ // Exports:
+ exports.setter2_test = setter2_test;
+});
« no previous file with comments | « test/codegen/expect/language/setter1_test.js ('k') | test/codegen/expect/language/setter3_test_01_multi.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698