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

Unified Diff: test/codegen/expect/language/compile_time_constant_l_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/compile_time_constant_l_test.js
diff --git a/test/codegen/expect/language/compile_time_constant_l_test.js b/test/codegen/expect/language/compile_time_constant_l_test.js
new file mode 100644
index 0000000000000000000000000000000000000000..727daa1e49b1e499a9fab0eeecebc43f5123b279
--- /dev/null
+++ b/test/codegen/expect/language/compile_time_constant_l_test.js
@@ -0,0 +1,48 @@
+dart_library.library('language/compile_time_constant_l_test', null, /* Imports */[
+ 'dart_sdk',
+ 'expect'
+], function load__compile_time_constant_l_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 compile_time_constant_l_test = Object.create(null);
+ let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [])))();
+ compile_time_constant_l_test.A = class A extends core.Object {
+ new(x) {
+ if (x === void 0) x = 499;
+ this.x = x;
+ }
+ };
+ dart.setSignature(compile_time_constant_l_test.A, {
+ constructors: () => ({new: dart.definiteFunctionType(compile_time_constant_l_test.A, [], [dart.dynamic])})
+ });
+ compile_time_constant_l_test.B = class B extends compile_time_constant_l_test.A {
+ new() {
+ this.z = 99;
+ super.new();
+ }
+ };
+ dart.setSignature(compile_time_constant_l_test.B, {
+ constructors: () => ({new: dart.definiteFunctionType(compile_time_constant_l_test.B, [])})
+ });
+ compile_time_constant_l_test.C = class C extends compile_time_constant_l_test.B {
+ new(y) {
+ this.y = y;
+ super.new();
+ }
+ };
+ dart.setSignature(compile_time_constant_l_test.C, {
+ constructors: () => ({new: dart.definiteFunctionType(compile_time_constant_l_test.C, [dart.dynamic])})
+ });
+ compile_time_constant_l_test.v = dart.const(new compile_time_constant_l_test.C(42));
+ compile_time_constant_l_test.main = function() {
+ expect$.Expect.equals(42, compile_time_constant_l_test.v.y);
+ expect$.Expect.equals(499, compile_time_constant_l_test.v.x);
+ expect$.Expect.equals(99, compile_time_constant_l_test.v.z);
+ };
+ dart.fn(compile_time_constant_l_test.main, VoidTodynamic());
+ // Exports:
+ exports.compile_time_constant_l_test = compile_time_constant_l_test;
+});

Powered by Google App Engine
This is Rietveld 408576698