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

Powered by Google App Engine
This is Rietveld 408576698