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

Unified Diff: test/codegen/expect/language/if_null_assignment_static_test_24_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_assignment_static_test_24_multi.js
diff --git a/test/codegen/expect/language/if_null_assignment_static_test_24_multi.js b/test/codegen/expect/language/if_null_assignment_static_test_24_multi.js
new file mode 100644
index 0000000000000000000000000000000000000000..d31f5142915f92717e5e8687bcbdab62f13bcbaa
--- /dev/null
+++ b/test/codegen/expect/language/if_null_assignment_static_test_24_multi.js
@@ -0,0 +1,121 @@
+dart_library.library('language/if_null_assignment_static_test_24_multi', null, /* Imports */[
+ 'dart_sdk',
+ 'expect'
+], function load__if_null_assignment_static_test_24_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_assignment_static_test_24_multi = Object.create(null);
+ let dynamicTodynamic = () => (dynamicTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [dart.dynamic])))();
+ let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [])))();
+ dart.copyProperties(if_null_assignment_static_test_24_multi, {
+ get checkedMode() {
+ let checked = false;
+ dart.assert(checked = true);
+ return checked;
+ }
+ });
+ if_null_assignment_static_test_24_multi.noMethod = function(e) {
+ return core.NoSuchMethodError.is(e);
+ };
+ dart.fn(if_null_assignment_static_test_24_multi.noMethod, dynamicTodynamic());
+ if_null_assignment_static_test_24_multi.bad = function() {
+ expect$.Expect.fail('Should not be executed');
+ };
+ dart.fn(if_null_assignment_static_test_24_multi.bad, VoidTodynamic());
+ if_null_assignment_static_test_24_multi.A = class A extends core.Object {
+ new() {
+ this.a = null;
+ }
+ };
+ if_null_assignment_static_test_24_multi.B = class B extends if_null_assignment_static_test_24_multi.A {
+ new() {
+ this.b = null;
+ super.new();
+ }
+ };
+ if_null_assignment_static_test_24_multi.C = class C extends if_null_assignment_static_test_24_multi.A {
+ new() {
+ this.c = null;
+ super.new();
+ }
+ };
+ dart.copyProperties(if_null_assignment_static_test_24_multi, {
+ get a() {
+ return null;
+ },
+ set a(value) {}
+ });
+ dart.copyProperties(if_null_assignment_static_test_24_multi, {
+ get b() {
+ return null;
+ },
+ set b(value) {}
+ });
+ if_null_assignment_static_test_24_multi.ClassWithStaticGetters = class ClassWithStaticGetters extends core.Object {
+ static get a() {
+ return null;
+ }
+ static set a(value) {}
+ static get b() {
+ return null;
+ }
+ static set b(value) {}
+ };
+ if_null_assignment_static_test_24_multi.ClassWithInstanceGetters = class ClassWithInstanceGetters extends core.Object {
+ get a() {
+ return null;
+ }
+ set a(value) {}
+ get b() {
+ return null;
+ }
+ set b(value) {}
+ };
+ if_null_assignment_static_test_24_multi.DerivedClass = class DerivedClass extends if_null_assignment_static_test_24_multi.ClassWithInstanceGetters {
+ get a() {
+ return if_null_assignment_static_test_24_multi.A._check(if_null_assignment_static_test_24_multi.bad());
+ }
+ set a(value) {
+ if_null_assignment_static_test_24_multi.bad();
+ }
+ get b() {
+ return if_null_assignment_static_test_24_multi.B._check(if_null_assignment_static_test_24_multi.bad());
+ }
+ set b(value) {
+ if_null_assignment_static_test_24_multi.bad();
+ }
+ derivedTest() {
+ if (!dart.test(if_null_assignment_static_test_24_multi.checkedMode)) {
+ }
+ }
+ };
+ dart.setSignature(if_null_assignment_static_test_24_multi.DerivedClass, {
+ methods: () => ({derivedTest: dart.definiteFunctionType(dart.void, [])})
+ });
+ if_null_assignment_static_test_24_multi.main = function() {
+ let _ = null;
+ let t = _;
+ t == null ? _ = null : t;
+ new if_null_assignment_static_test_24_multi.DerivedClass().derivedTest();
+ if (!dart.test(if_null_assignment_static_test_24_multi.checkedMode)) {
+ }
+ if (!dart.test(if_null_assignment_static_test_24_multi.checkedMode)) {
+ }
+ (() => {
+ let o = new if_null_assignment_static_test_24_multi.ClassWithInstanceGetters(), t = o.a;
+ return t == null ? o.a = new if_null_assignment_static_test_24_multi.B() : t;
+ })().a;
+ if (!dart.test(if_null_assignment_static_test_24_multi.checkedMode)) {
+ }
+ if (!dart.test(if_null_assignment_static_test_24_multi.checkedMode)) {
+ }
+ if (!dart.test(if_null_assignment_static_test_24_multi.checkedMode)) {
+ }
+ };
+ dart.fn(if_null_assignment_static_test_24_multi.main, VoidTodynamic());
+ // Exports:
+ exports.if_null_assignment_static_test_24_multi = if_null_assignment_static_test_24_multi;
+});

Powered by Google App Engine
This is Rietveld 408576698