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

Unified Diff: test/codegen/expect/language/abstract_object_method_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/abstract_object_method_test.js
diff --git a/test/codegen/expect/language/abstract_object_method_test.js b/test/codegen/expect/language/abstract_object_method_test.js
new file mode 100644
index 0000000000000000000000000000000000000000..d7672186d0a0a7ae00cff5c3f323e67fdd4818fe
--- /dev/null
+++ b/test/codegen/expect/language/abstract_object_method_test.js
@@ -0,0 +1,43 @@
+dart_library.library('language/abstract_object_method_test', null, /* Imports */[
+ 'dart_sdk',
+ 'expect'
+], function load__abstract_object_method_test(exports, dart_sdk, expect) {
+ 'use strict';
+ const core = dart_sdk.core;
+ const _interceptors = dart_sdk._interceptors;
+ const dart = dart_sdk.dart;
+ const dartx = dart_sdk.dartx;
+ const expect$ = expect.expect;
+ const abstract_object_method_test = Object.create(null);
+ let JSArrayOfC = () => (JSArrayOfC = dart.constFn(_interceptors.JSArray$(abstract_object_method_test.C)))();
+ let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [])))();
+ abstract_object_method_test.A = dart.callableClass(function A(...args) {
+ const self = this;
+ function call(...args) {
+ return self.call.apply(self, args);
+ }
+ call.__proto__ = this.__proto__;
+ call.new.apply(call, args);
+ return call;
+ }, class A extends core.Object {
+ noSuchMethod(_) {
+ expect$.Expect.fail('Should not reach here');
+ }
+ });
+ abstract_object_method_test.B = class B extends abstract_object_method_test.A {};
+ abstract_object_method_test.C = class C extends abstract_object_method_test.B {};
+ dart.defineLazy(abstract_object_method_test, {
+ get a() {
+ return JSArrayOfC().of([new abstract_object_method_test.C()]);
+ },
+ set a(_) {}
+ });
+ abstract_object_method_test.main = function() {
+ let c = abstract_object_method_test.a[dartx.get](0);
+ abstract_object_method_test.a[dartx.add](c);
+ expect$.Expect.isTrue(dart.equals(c, abstract_object_method_test.a[dartx.get](1)));
+ };
+ dart.fn(abstract_object_method_test.main, VoidTodynamic());
+ // Exports:
+ exports.abstract_object_method_test = abstract_object_method_test;
+});

Powered by Google App Engine
This is Rietveld 408576698