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

Unified Diff: test/codegen/expect/language/if_null_behavior_test_08_multi.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/if_null_behavior_test_08_multi.js
diff --git a/test/codegen/expect/language/if_null_behavior_test_08_multi.js b/test/codegen/expect/language/if_null_behavior_test_08_multi.js
new file mode 100644
index 0000000000000000000000000000000000000000..6b789bf658d22b220ed773be796ca6056c43f6d5
--- /dev/null
+++ b/test/codegen/expect/language/if_null_behavior_test_08_multi.js
@@ -0,0 +1,63 @@
+dart_library.library('language/if_null_behavior_test_08_multi', null, /* Imports */[
+ 'dart_sdk',
+ 'expect'
+], function load__if_null_behavior_test_08_multi(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 if_null_behavior_test_08_multi = Object.create(null);
+ let VoidToB = () => (VoidToB = dart.constFn(dart.definiteFunctionType(if_null_behavior_test_08_multi.B, [])))();
+ let VoidToC = () => (VoidToC = dart.constFn(dart.definiteFunctionType(if_null_behavior_test_08_multi.C, [])))();
+ let dynamicTodynamic = () => (dynamicTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [dart.dynamic])))();
+ let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [])))();
+ if_null_behavior_test_08_multi.A = class A extends core.Object {
+ new(a) {
+ this.a = a;
+ }
+ };
+ dart.setSignature(if_null_behavior_test_08_multi.A, {
+ constructors: () => ({new: dart.definiteFunctionType(if_null_behavior_test_08_multi.A, [core.String])})
+ });
+ if_null_behavior_test_08_multi.B = class B extends if_null_behavior_test_08_multi.A {
+ new(v) {
+ this.b = v;
+ super.new(v);
+ }
+ };
+ dart.setSignature(if_null_behavior_test_08_multi.B, {
+ constructors: () => ({new: dart.definiteFunctionType(if_null_behavior_test_08_multi.B, [core.String])})
+ });
+ if_null_behavior_test_08_multi.C = class C extends if_null_behavior_test_08_multi.A {
+ new(v) {
+ this.c = v;
+ super.new(v);
+ }
+ };
+ dart.setSignature(if_null_behavior_test_08_multi.C, {
+ constructors: () => ({new: dart.definiteFunctionType(if_null_behavior_test_08_multi.C, [core.String])})
+ });
+ if_null_behavior_test_08_multi.nullB = function() {
+ return null;
+ };
+ dart.fn(if_null_behavior_test_08_multi.nullB, VoidToB());
+ if_null_behavior_test_08_multi.nullC = function() {
+ return null;
+ };
+ dart.fn(if_null_behavior_test_08_multi.nullC, VoidToC());
+ if_null_behavior_test_08_multi.noMethod = function(e) {
+ return core.NoSuchMethodError.is(e);
+ };
+ dart.fn(if_null_behavior_test_08_multi.noMethod, dynamicTodynamic());
+ if_null_behavior_test_08_multi.main = function() {
+ let _ = (() => {
+ let l = null;
+ return l != null ? l : null;
+ })();
+ expect$.Expect.equals('B', new if_null_behavior_test_08_multi.B('B').a);
+ };
+ dart.fn(if_null_behavior_test_08_multi.main, VoidTodynamic());
+ // Exports:
+ exports.if_null_behavior_test_08_multi = if_null_behavior_test_08_multi;
+});

Powered by Google App Engine
This is Rietveld 408576698