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

Unified Diff: test/codegen/expect/language/ternary_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/ternary_test.js
diff --git a/test/codegen/expect/language/ternary_test.js b/test/codegen/expect/language/ternary_test.js
new file mode 100644
index 0000000000000000000000000000000000000000..b290b9d7488f2d272c43f404cb4ef4dbe677ac34
--- /dev/null
+++ b/test/codegen/expect/language/ternary_test.js
@@ -0,0 +1,46 @@
+dart_library.library('language/ternary_test', null, /* Imports */[
+ 'dart_sdk',
+ 'expect'
+], function load__ternary_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 ternary_test = Object.create(null);
+ let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [])))();
+ ternary_test.TernaryTest = class TernaryTest extends core.Object {
+ static true_cond() {
+ return true;
+ }
+ static false_cond() {
+ return false;
+ }
+ static foo() {
+ return -4;
+ }
+ static moo() {
+ return 5;
+ }
+ static testMain() {
+ expect$.Expect.equals(-4, dart.test(ternary_test.TernaryTest.true_cond()) ? ternary_test.TernaryTest.foo() : ternary_test.TernaryTest.moo());
+ expect$.Expect.equals(5, dart.test(ternary_test.TernaryTest.false_cond()) ? ternary_test.TernaryTest.foo() : ternary_test.TernaryTest.moo());
+ }
+ };
+ dart.setSignature(ternary_test.TernaryTest, {
+ statics: () => ({
+ true_cond: dart.definiteFunctionType(dart.dynamic, []),
+ false_cond: dart.definiteFunctionType(dart.dynamic, []),
+ foo: dart.definiteFunctionType(dart.dynamic, []),
+ moo: dart.definiteFunctionType(dart.dynamic, []),
+ testMain: dart.definiteFunctionType(dart.dynamic, [])
+ }),
+ names: ['true_cond', 'false_cond', 'foo', 'moo', 'testMain']
+ });
+ ternary_test.main = function() {
+ ternary_test.TernaryTest.testMain();
+ };
+ dart.fn(ternary_test.main, VoidTodynamic());
+ // Exports:
+ exports.ternary_test = ternary_test;
+});
« no previous file with comments | « test/codegen/expect/language/temp_mangling_test.js ('k') | test/codegen/expect/language/test_negative_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698