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

Unified Diff: test/codegen/expect/language/issue12336_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/issue12288_test.js ('k') | test/codegen/expect/language/issue13179_test.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/codegen/expect/language/issue12336_test.js
diff --git a/test/codegen/expect/language/issue12336_test.js b/test/codegen/expect/language/issue12336_test.js
new file mode 100644
index 0000000000000000000000000000000000000000..999a0a48ccc008ea6d317fdc109a801db5e895e8
--- /dev/null
+++ b/test/codegen/expect/language/issue12336_test.js
@@ -0,0 +1,44 @@
+dart_library.library('language/issue12336_test', null, /* Imports */[
+ 'dart_sdk',
+ 'expect'
+], function load__issue12336_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 issue12336_test = Object.create(null);
+ const compiler_annotations = Object.create(null);
+ let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [])))();
+ let VoidToint = () => (VoidToint = dart.constFn(dart.definiteFunctionType(core.int, [])))();
+ let dynamicAnddynamicTodynamic = () => (dynamicAnddynamicTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [dart.dynamic, dart.dynamic])))();
+ issue12336_test.main = function() {
+ let result = issue12336_test.foo(1, 2);
+ expect$.Expect.equals(1, dart.dindex(result, 0));
+ expect$.Expect.equals(2, dart.dindex(result, 1));
+ result = issue12336_test.foo([], 2);
+ expect$.Expect.equals(0, dart.dindex(result, 0));
+ expect$.Expect.listEquals([], core.List._check(dart.dindex(result, 1)));
+ };
+ dart.fn(issue12336_test.main, VoidTodynamic());
+ issue12336_test.foo = function(a, b) {
+ dart.fn(() => 42, VoidToint());
+ if (core.List.is(a)) {
+ let saved = core.List.as(a);
+ a = dart.dload(a, 'length');
+ b = saved;
+ }
+ return [a, b];
+ };
+ dart.fn(issue12336_test.foo, dynamicAnddynamicTodynamic());
+ compiler_annotations.DontInline = class DontInline extends core.Object {
+ new() {
+ }
+ };
+ dart.setSignature(compiler_annotations.DontInline, {
+ constructors: () => ({new: dart.definiteFunctionType(compiler_annotations.DontInline, [])})
+ });
+ // Exports:
+ exports.issue12336_test = issue12336_test;
+ exports.compiler_annotations = compiler_annotations;
+});
« no previous file with comments | « test/codegen/expect/language/issue12288_test.js ('k') | test/codegen/expect/language/issue13179_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698