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

Unified Diff: test/codegen/expect/language/non_const_constructor_without_body_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/non_const_constructor_without_body_test.js
diff --git a/test/codegen/expect/language/non_const_constructor_without_body_test.js b/test/codegen/expect/language/non_const_constructor_without_body_test.js
new file mode 100644
index 0000000000000000000000000000000000000000..56f2526cb4e6370ee476018c01829a1348c7358b
--- /dev/null
+++ b/test/codegen/expect/language/non_const_constructor_without_body_test.js
@@ -0,0 +1,63 @@
+dart_library.library('language/non_const_constructor_without_body_test', null, /* Imports */[
+ 'dart_sdk',
+ 'expect'
+], function load__non_const_constructor_without_body_test(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 non_const_constructor_without_body_test = Object.create(null);
+ let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [])))();
+ non_const_constructor_without_body_test.NonConstConstructorWithoutBodyTest = class NonConstConstructorWithoutBodyTest extends core.Object {
+ new() {
+ this.x = null;
+ }
+ named() {
+ this.x = null;
+ }
+ initializers() {
+ this.x = 1;
+ }
+ parameters(x) {
+ this.x = dart.notNull(x) + 1;
+ }
+ fieldParameter(x) {
+ this.x = x;
+ }
+ redirection() {
+ NonConstConstructorWithoutBodyTest.prototype.initializers.call(this);
+ }
+ static testMain() {
+ expect$.Expect.equals(null, new non_const_constructor_without_body_test.NonConstConstructorWithoutBodyTest().x);
+ expect$.Expect.equals(null, new non_const_constructor_without_body_test.NonConstConstructorWithoutBodyTest.named().x);
+ expect$.Expect.equals(1, new non_const_constructor_without_body_test.NonConstConstructorWithoutBodyTest.initializers().x);
+ expect$.Expect.equals(2, new non_const_constructor_without_body_test.NonConstConstructorWithoutBodyTest.parameters(1).x);
+ expect$.Expect.equals(2, new non_const_constructor_without_body_test.NonConstConstructorWithoutBodyTest.fieldParameter(2).x);
+ expect$.Expect.equals(1, new non_const_constructor_without_body_test.NonConstConstructorWithoutBodyTest.redirection().x);
+ }
+ };
+ dart.defineNamedConstructor(non_const_constructor_without_body_test.NonConstConstructorWithoutBodyTest, 'named');
+ dart.defineNamedConstructor(non_const_constructor_without_body_test.NonConstConstructorWithoutBodyTest, 'initializers');
+ dart.defineNamedConstructor(non_const_constructor_without_body_test.NonConstConstructorWithoutBodyTest, 'parameters');
+ dart.defineNamedConstructor(non_const_constructor_without_body_test.NonConstConstructorWithoutBodyTest, 'fieldParameter');
+ dart.defineNamedConstructor(non_const_constructor_without_body_test.NonConstConstructorWithoutBodyTest, 'redirection');
+ dart.setSignature(non_const_constructor_without_body_test.NonConstConstructorWithoutBodyTest, {
+ constructors: () => ({
+ new: dart.definiteFunctionType(non_const_constructor_without_body_test.NonConstConstructorWithoutBodyTest, []),
+ named: dart.definiteFunctionType(non_const_constructor_without_body_test.NonConstConstructorWithoutBodyTest, []),
+ initializers: dart.definiteFunctionType(non_const_constructor_without_body_test.NonConstConstructorWithoutBodyTest, []),
+ parameters: dart.definiteFunctionType(non_const_constructor_without_body_test.NonConstConstructorWithoutBodyTest, [core.int]),
+ fieldParameter: dart.definiteFunctionType(non_const_constructor_without_body_test.NonConstConstructorWithoutBodyTest, [core.int]),
+ redirection: dart.definiteFunctionType(non_const_constructor_without_body_test.NonConstConstructorWithoutBodyTest, [])
+ }),
+ statics: () => ({testMain: dart.definiteFunctionType(dart.dynamic, [])}),
+ names: ['testMain']
+ });
+ non_const_constructor_without_body_test.main = function() {
+ non_const_constructor_without_body_test.NonConstConstructorWithoutBodyTest.testMain();
+ };
+ dart.fn(non_const_constructor_without_body_test.main, VoidTodynamic());
+ // Exports:
+ exports.non_const_constructor_without_body_test = non_const_constructor_without_body_test;
+});
« no previous file with comments | « test/codegen/expect/language/no_such_method_test.js ('k') | test/codegen/expect/language/non_const_super_negative_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698