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

Unified Diff: test/codegen/expect/language/reify_typevar_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/reify_typevar_test.js
diff --git a/test/codegen/expect/language/reify_typevar_test.js b/test/codegen/expect/language/reify_typevar_test.js
new file mode 100644
index 0000000000000000000000000000000000000000..98c50e377f59276f6089733cb3cb475680c6d797
--- /dev/null
+++ b/test/codegen/expect/language/reify_typevar_test.js
@@ -0,0 +1,34 @@
+dart_library.library('language/reify_typevar_test', null, /* Imports */[
+ 'dart_sdk',
+ 'expect'
+], function load__reify_typevar_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 reify_typevar_test = Object.create(null);
+ let Foo = () => (Foo = dart.constFn(reify_typevar_test.Foo$()))();
+ let FooOfint = () => (FooOfint = dart.constFn(reify_typevar_test.Foo$(core.int)))();
+ let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [])))();
+ reify_typevar_test.Foo$ = dart.generic(T => {
+ class Foo extends core.Object {
+ reify() {
+ return dart.wrapType(T);
+ }
+ }
+ dart.addTypeTests(Foo);
+ dart.setSignature(Foo, {
+ methods: () => ({reify: dart.definiteFunctionType(dart.dynamic, [])})
+ });
+ return Foo;
+ });
+ reify_typevar_test.Foo = Foo();
+ reify_typevar_test.main = function() {
+ expect$.Expect.equals(dart.wrapType(core.int), new (FooOfint())().reify());
+ expect$.Expect.equals(dart.wrapType(reify_typevar_test.Foo), new reify_typevar_test.Foo().runtimeType);
+ };
+ dart.fn(reify_typevar_test.main, VoidTodynamic());
+ // Exports:
+ exports.reify_typevar_test = reify_typevar_test;
+});
« no previous file with comments | « test/codegen/expect/language/reify_typevar_static_test_none_multi.js ('k') | test/codegen/expect/language/resolution_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698