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

Unified Diff: test/codegen/expect/language/evaluation_redirecting_constructor_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/evaluation_redirecting_constructor_test.js
diff --git a/test/codegen/expect/language/evaluation_redirecting_constructor_test.js b/test/codegen/expect/language/evaluation_redirecting_constructor_test.js
new file mode 100644
index 0000000000000000000000000000000000000000..303a81bdcffa48a44f7859475915e2a6add7eb7e
--- /dev/null
+++ b/test/codegen/expect/language/evaluation_redirecting_constructor_test.js
@@ -0,0 +1,46 @@
+dart_library.library('language/evaluation_redirecting_constructor_test', null, /* Imports */[
+ 'dart_sdk',
+ 'expect'
+], function load__evaluation_redirecting_constructor_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 evaluation_redirecting_constructor_test = Object.create(null);
+ let VoidToint = () => (VoidToint = dart.constFn(dart.definiteFunctionType(core.int, [])))();
+ let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [])))();
+ evaluation_redirecting_constructor_test.counter = 0;
+ evaluation_redirecting_constructor_test.Bar = class Bar extends core.Object {
+ new() {
+ evaluation_redirecting_constructor_test.counter = dart.notNull(evaluation_redirecting_constructor_test.counter) + 1;
+ }
+ };
+ dart.setSignature(evaluation_redirecting_constructor_test.Bar, {
+ constructors: () => ({new: dart.definiteFunctionType(evaluation_redirecting_constructor_test.Bar, [])})
+ });
+ const _bar = Symbol('_bar');
+ evaluation_redirecting_constructor_test.A = class A extends core.Object {
+ new() {
+ A.prototype._.call(this);
+ }
+ _() {
+ this[_bar] = new evaluation_redirecting_constructor_test.Bar();
+ dart.fn(() => 42, VoidToint());
+ }
+ };
+ dart.defineNamedConstructor(evaluation_redirecting_constructor_test.A, '_');
+ dart.setSignature(evaluation_redirecting_constructor_test.A, {
+ constructors: () => ({
+ new: dart.definiteFunctionType(evaluation_redirecting_constructor_test.A, []),
+ _: dart.definiteFunctionType(evaluation_redirecting_constructor_test.A, [])
+ })
+ });
+ evaluation_redirecting_constructor_test.main = function() {
+ new evaluation_redirecting_constructor_test.A();
+ expect$.Expect.equals(1, evaluation_redirecting_constructor_test.counter);
+ };
+ dart.fn(evaluation_redirecting_constructor_test.main, VoidTodynamic());
+ // Exports:
+ exports.evaluation_redirecting_constructor_test = evaluation_redirecting_constructor_test;
+});
« no previous file with comments | « test/codegen/expect/language/error_stacktrace_test.js ('k') | test/codegen/expect/language/example_constructor_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698