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

Unified Diff: test/codegen/expect/language/typed_selector_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/typed_selector_test.js
diff --git a/test/codegen/expect/language/typed_selector_test.js b/test/codegen/expect/language/typed_selector_test.js
new file mode 100644
index 0000000000000000000000000000000000000000..235dd35a6a0160935514388bce4c7f3db8d77f4f
--- /dev/null
+++ b/test/codegen/expect/language/typed_selector_test.js
@@ -0,0 +1,37 @@
+dart_library.library('language/typed_selector_test', null, /* Imports */[
+ 'dart_sdk',
+ 'expect'
+], function load__typed_selector_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 typed_selector_test = Object.create(null);
+ let JSArrayOfObject = () => (JSArrayOfObject = dart.constFn(_interceptors.JSArray$(core.Object)))();
+ let intToint = () => (intToint = dart.constFn(dart.definiteFunctionType(core.int, [core.int])))();
+ let VoidTovoid = () => (VoidTovoid = dart.constFn(dart.definiteFunctionType(dart.void, [])))();
+ typed_selector_test.A = class A extends core.Object {
+ get document() {
+ return 42;
+ }
+ };
+ typed_selector_test.B = class B extends core.Object {};
+ typed_selector_test.C = class C extends typed_selector_test.A {};
+ typed_selector_test.C[dart.implements] = () => [typed_selector_test.B];
+ typed_selector_test.inscrutable = function(x) {
+ return x == 0 ? 0 : (dart.notNull(x) | dart.notNull(typed_selector_test.inscrutable((dart.notNull(x) & dart.notNull(x) - 1) >>> 0))) >>> 0;
+ };
+ dart.fn(typed_selector_test.inscrutable, intToint());
+ typed_selector_test.main = function() {
+ let tab = JSArrayOfObject().of([new core.Object(), new typed_selector_test.C()]);
+ let obj = tab[dartx.get](typed_selector_test.inscrutable(1));
+ let res = 0;
+ if (typed_selector_test.B.is(obj)) res = core.int._check(obj.document);
+ expect$.Expect.equals(42, res);
+ };
+ dart.fn(typed_selector_test.main, VoidTovoid());
+ // Exports:
+ exports.typed_selector_test = typed_selector_test;
+});
« no previous file with comments | « test/codegen/expect/language/typed_selector2_test.js ('k') | test/codegen/expect/language/typedef_is_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698