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

Unified Diff: test/codegen/expect/language/type_check_const_function_typedef_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/type_check_const_function_typedef_test.js
diff --git a/test/codegen/expect/language/type_check_const_function_typedef_test.js b/test/codegen/expect/language/type_check_const_function_typedef_test.js
new file mode 100644
index 0000000000000000000000000000000000000000..5dd0f4907b05bca28675accc3980a3699e2fe714
--- /dev/null
+++ b/test/codegen/expect/language/type_check_const_function_typedef_test.js
@@ -0,0 +1,33 @@
+dart_library.library('language/type_check_const_function_typedef_test', null, /* Imports */[
+ 'dart_sdk',
+ 'expect'
+], function load__type_check_const_function_typedef_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 type_check_const_function_typedef_test = Object.create(null);
+ let intToString = () => (intToString = dart.constFn(dart.definiteFunctionType(core.String, [core.int])))();
+ let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [])))();
+ type_check_const_function_typedef_test.Int2String = dart.typedef('Int2String', () => dart.functionType(core.String, [core.int]));
+ type_check_const_function_typedef_test.A = class A extends core.Object {
+ new(f) {
+ this.f = f;
+ }
+ };
+ dart.setSignature(type_check_const_function_typedef_test.A, {
+ constructors: () => ({new: dart.definiteFunctionType(type_check_const_function_typedef_test.A, [type_check_const_function_typedef_test.Int2String])})
+ });
+ type_check_const_function_typedef_test.foo = function(x) {
+ return "str";
+ };
+ dart.fn(type_check_const_function_typedef_test.foo, intToString());
+ type_check_const_function_typedef_test.a = dart.const(new type_check_const_function_typedef_test.A(type_check_const_function_typedef_test.foo));
+ type_check_const_function_typedef_test.main = function() {
+ expect$.Expect.equals("str", type_check_const_function_typedef_test.a.f(499));
+ };
+ dart.fn(type_check_const_function_typedef_test.main, VoidTodynamic());
+ // Exports:
+ exports.type_check_const_function_typedef_test = type_check_const_function_typedef_test;
+});

Powered by Google App Engine
This is Rietveld 408576698