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

Unified Diff: test/codegen/expect/corelib/regress_11099_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/corelib/regress_11099_test.js
diff --git a/test/codegen/expect/corelib/regress_11099_test.js b/test/codegen/expect/corelib/regress_11099_test.js
new file mode 100644
index 0000000000000000000000000000000000000000..39bdea57b11c4d23215c647b6533dd922d899d2b
--- /dev/null
+++ b/test/codegen/expect/corelib/regress_11099_test.js
@@ -0,0 +1,38 @@
+dart_library.library('corelib/regress_11099_test', null, /* Imports */[
+ 'dart_sdk'
+], function load__regress_11099_test(exports, dart_sdk) {
+ 'use strict';
+ const core = dart_sdk.core;
+ const _interceptors = dart_sdk._interceptors;
+ const dart = dart_sdk.dart;
+ const dartx = dart_sdk.dartx;
+ const regress_11099_test = Object.create(null);
+ let JSArrayOfMyTest = () => (JSArrayOfMyTest = dart.constFn(_interceptors.JSArray$(regress_11099_test.MyTest)))();
+ let ComparableOfMyTest = () => (ComparableOfMyTest = dart.constFn(core.Comparable$(regress_11099_test.MyTest)))();
+ let VoidTovoid = () => (VoidTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [])))();
+ regress_11099_test.main = function() {
+ let l = JSArrayOfMyTest().of([new regress_11099_test.MyTest(1), new regress_11099_test.MyTest(5), new regress_11099_test.MyTest(3)]);
+ l[dartx.sort]();
+ if (dart.toString(l) != "[d{1}, d{3}, d{5}]") dart.throw('Wrong result!');
+ };
+ dart.fn(regress_11099_test.main, VoidTovoid());
+ regress_11099_test.MyTest = class MyTest extends core.Object {
+ new(a) {
+ this.a = a;
+ }
+ compareTo(b) {
+ return dart.notNull(this.a) - dart.notNull(b.a);
+ }
+ toString() {
+ return dart.str`d{${this.a}}`;
+ }
+ };
+ regress_11099_test.MyTest[dart.implements] = () => [ComparableOfMyTest()];
+ dart.setSignature(regress_11099_test.MyTest, {
+ constructors: () => ({new: dart.definiteFunctionType(regress_11099_test.MyTest, [core.int])}),
+ methods: () => ({compareTo: dart.definiteFunctionType(core.int, [regress_11099_test.MyTest])})
+ });
+ dart.defineExtensionMembers(regress_11099_test.MyTest, ['compareTo']);
+ // Exports:
+ exports.regress_11099_test = regress_11099_test;
+});

Powered by Google App Engine
This is Rietveld 408576698