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

Unified Diff: test/codegen/expect/language/bailout4_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/bailout3_test.js ('k') | test/codegen/expect/language/bailout5_test.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/codegen/expect/language/bailout4_test.js
diff --git a/test/codegen/expect/language/bailout4_test.js b/test/codegen/expect/language/bailout4_test.js
new file mode 100644
index 0000000000000000000000000000000000000000..9d384cf55a8202deaf03f3e9d367ca3ae5d42142
--- /dev/null
+++ b/test/codegen/expect/language/bailout4_test.js
@@ -0,0 +1,48 @@
+dart_library.library('language/bailout4_test', null, /* Imports */[
+ 'dart_sdk',
+ 'expect'
+], function load__bailout4_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 bailout4_test = Object.create(null);
+ let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [])))();
+ bailout4_test.A = class A extends core.Object {
+ get(index) {
+ return 42;
+ }
+ };
+ dart.setSignature(bailout4_test.A, {
+ methods: () => ({get: dart.definiteFunctionType(dart.dynamic, [dart.dynamic])})
+ });
+ dart.defineLazy(bailout4_test, {
+ get a() {
+ return new bailout4_test.A();
+ },
+ set a(_) {}
+ });
+ dart.defineLazy(bailout4_test, {
+ get b() {
+ return core.List.new(4);
+ },
+ set b(_) {}
+ });
+ bailout4_test.count = 0;
+ bailout4_test.main = function() {
+ if (bailout4_test.b[dartx.get](0) != null) bailout4_test.main();
+ for (let i = 0; i < 2; i++) {
+ for (let j = 0; j < 2; j++) {
+ for (let k = 0; k < 2; k++) {
+ expect$.Expect.equals(42, bailout4_test.a.get(i + j + k));
+ bailout4_test.count = dart.notNull(bailout4_test.count) + 1;
+ }
+ }
+ }
+ expect$.Expect.equals(8, bailout4_test.count);
+ };
+ dart.fn(bailout4_test.main, VoidTodynamic());
+ // Exports:
+ exports.bailout4_test = bailout4_test;
+});
« no previous file with comments | « test/codegen/expect/language/bailout3_test.js ('k') | test/codegen/expect/language/bailout5_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698