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

Unified Diff: test/codegen/expect/language/allocate_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/allocate_test.js
diff --git a/test/codegen/expect/language/allocate_test.js b/test/codegen/expect/language/allocate_test.js
new file mode 100644
index 0000000000000000000000000000000000000000..6988536905dc2aacce98d68b226db269dc395a98
--- /dev/null
+++ b/test/codegen/expect/language/allocate_test.js
@@ -0,0 +1,40 @@
+dart_library.library('language/allocate_test', null, /* Imports */[
+ 'dart_sdk',
+ 'expect'
+], function load__allocate_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 allocate_test = Object.create(null);
+ let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [])))();
+ allocate_test.MyAllocate = class MyAllocate extends core.Object {
+ new(value) {
+ if (value === void 0) value = 0;
+ this.value_ = value;
+ }
+ getValue() {
+ return this.value_;
+ }
+ };
+ dart.setSignature(allocate_test.MyAllocate, {
+ constructors: () => ({new: dart.definiteFunctionType(allocate_test.MyAllocate, [], [core.int])}),
+ methods: () => ({getValue: dart.definiteFunctionType(core.int, [])})
+ });
+ allocate_test.AllocateTest = class AllocateTest extends core.Object {
+ static testMain() {
+ expect$.Expect.equals(900, new allocate_test.MyAllocate(900).getValue());
+ }
+ };
+ dart.setSignature(allocate_test.AllocateTest, {
+ statics: () => ({testMain: dart.definiteFunctionType(dart.dynamic, [])}),
+ names: ['testMain']
+ });
+ allocate_test.main = function() {
+ allocate_test.AllocateTest.testMain();
+ };
+ dart.fn(allocate_test.main, VoidTodynamic());
+ // Exports:
+ exports.allocate_test = allocate_test;
+});

Powered by Google App Engine
This is Rietveld 408576698