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

Unified Diff: test/codegen/expect/language/redirecting_factory_reflection_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/redirecting_factory_reflection_test.js
diff --git a/test/codegen/expect/language/redirecting_factory_reflection_test.js b/test/codegen/expect/language/redirecting_factory_reflection_test.js
new file mode 100644
index 0000000000000000000000000000000000000000..bcad3a752264bf5d2923cccd0f57ec20e2ac4883
--- /dev/null
+++ b/test/codegen/expect/language/redirecting_factory_reflection_test.js
@@ -0,0 +1,54 @@
+dart_library.library('language/redirecting_factory_reflection_test', null, /* Imports */[
+ 'dart_sdk',
+ 'expect'
+], function load__redirecting_factory_reflection_test(exports, dart_sdk, expect) {
+ 'use strict';
+ const core = dart_sdk.core;
+ const mirrors = dart_sdk.mirrors;
+ const dart = dart_sdk.dart;
+ const dartx = dart_sdk.dartx;
+ const expect$ = expect.expect;
+ const redirecting_factory_reflection_test = Object.create(null);
+ let A = () => (A = dart.constFn(redirecting_factory_reflection_test.A$()))();
+ let B = () => (B = dart.constFn(redirecting_factory_reflection_test.B$()))();
+ let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [])))();
+ redirecting_factory_reflection_test.A$ = dart.generic(T => {
+ let AOfT = () => (AOfT = dart.constFn(redirecting_factory_reflection_test.A$(T)))();
+ let BOfT$AOfT = () => (BOfT$AOfT = dart.constFn(redirecting_factory_reflection_test.B$(T, AOfT())))();
+ class A extends core.Object {
+ static new() {
+ return new (BOfT$AOfT())();
+ }
+ }
+ dart.addTypeTests(A);
+ dart.setSignature(A, {
+ constructors: () => ({new: dart.definiteFunctionType(redirecting_factory_reflection_test.A$(T), [])})
+ });
+ return A;
+ });
+ redirecting_factory_reflection_test.A = A();
+ redirecting_factory_reflection_test.B$ = dart.generic((X, Y) => {
+ let AOfX = () => (AOfX = dart.constFn(redirecting_factory_reflection_test.A$(X)))();
+ class B extends core.Object {
+ new() {
+ this.t = dart.wrapType(Y);
+ }
+ }
+ dart.addTypeTests(B);
+ B[dart.implements] = () => [AOfX()];
+ dart.setSignature(B, {
+ constructors: () => ({new: dart.definiteFunctionType(redirecting_factory_reflection_test.B$(X, Y), [])})
+ });
+ return B;
+ });
+ redirecting_factory_reflection_test.B = B();
+ let const$;
+ redirecting_factory_reflection_test.main = function() {
+ let m = mirrors.reflectClass(dart.wrapType(redirecting_factory_reflection_test.A));
+ let i = m.newInstance(const$ || (const$ = dart.const(core.Symbol.new(''))), []).reflectee;
+ expect$.Expect.equals(dart.toString(dart.dload(i, 't')), 'A');
+ };
+ dart.fn(redirecting_factory_reflection_test.main, VoidTodynamic());
+ // Exports:
+ exports.redirecting_factory_reflection_test = redirecting_factory_reflection_test;
+});

Powered by Google App Engine
This is Rietveld 408576698