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

Unified Diff: test/codegen/expect/corelib/int_round_to_double_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
« no previous file with comments | « test/codegen/expect/corelib/int_round_test.js ('k') | test/codegen/expect/corelib/int_to_int_test.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/codegen/expect/corelib/int_round_to_double_test.js
diff --git a/test/codegen/expect/corelib/int_round_to_double_test.js b/test/codegen/expect/corelib/int_round_to_double_test.js
new file mode 100644
index 0000000000000000000000000000000000000000..8b27f6ff0d14d9ab648ee6673137b530a3f2a2ac
--- /dev/null
+++ b/test/codegen/expect/corelib/int_round_to_double_test.js
@@ -0,0 +1,43 @@
+dart_library.library('corelib/int_round_to_double_test', null, /* Imports */[
+ 'dart_sdk',
+ 'expect'
+], function load__int_round_to_double_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 int_round_to_double_test = Object.create(null);
+ let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [])))();
+ int_round_to_double_test.main = function() {
+ expect$.Expect.equals(0.0, (0)[dartx.roundToDouble]());
+ expect$.Expect.equals(1.0, (1)[dartx.roundToDouble]());
+ expect$.Expect.equals(4660, (4660)[dartx.roundToDouble]());
+ expect$.Expect.equals(305419896, (305419896)[dartx.roundToDouble]());
+ expect$.Expect.equals(1250999896491, (1250999896491)[dartx.roundToDouble]());
+ expect$.Expect.equals(81985529216486900.0, (81985529216486895)[dartx.roundToDouble]());
+ expect$.Expect.equals(2.7898229935051914e+55, (27898229935051914142968983831921934135401027036219428335)[dartx.roundToDouble]());
+ expect$.Expect.equals(-1.0, -dart.notNull((1)[dartx.roundToDouble]()));
+ expect$.Expect.equals(-4660, -dart.notNull((4660)[dartx.roundToDouble]()));
+ expect$.Expect.equals(-305419896, -dart.notNull((305419896)[dartx.roundToDouble]()));
+ expect$.Expect.equals(-1250999896491, -dart.notNull((1250999896491)[dartx.roundToDouble]()));
+ expect$.Expect.equals(-81985529216486900.0, -dart.notNull((81985529216486895)[dartx.roundToDouble]()));
+ expect$.Expect.equals(-2.7898229935051914e+55, -dart.notNull((27898229935051914142968983831921934135401027036219428335)[dartx.roundToDouble]()));
+ expect$.Expect.isTrue(typeof (0)[dartx.roundToDouble]() == 'number');
+ expect$.Expect.isTrue(typeof (1)[dartx.roundToDouble]() == 'number');
+ expect$.Expect.isTrue(typeof (4660)[dartx.roundToDouble]() == 'number');
+ expect$.Expect.isTrue(typeof (305419896)[dartx.roundToDouble]() == 'number');
+ expect$.Expect.isTrue(typeof (1250999896491)[dartx.roundToDouble]() == 'number');
+ expect$.Expect.isTrue(typeof (81985529216486895)[dartx.roundToDouble]() == 'number');
+ expect$.Expect.isTrue(typeof (27898229935051914142968983831921934135401027036219428335)[dartx.roundToDouble]() == 'number');
+ expect$.Expect.isTrue(typeof -dart.notNull((1)[dartx.roundToDouble]()) == 'number');
+ expect$.Expect.isTrue(typeof -dart.notNull((4660)[dartx.roundToDouble]()) == 'number');
+ expect$.Expect.isTrue(typeof -dart.notNull((305419896)[dartx.roundToDouble]()) == 'number');
+ expect$.Expect.isTrue(typeof -dart.notNull((1250999896491)[dartx.roundToDouble]()) == 'number');
+ expect$.Expect.isTrue(typeof -dart.notNull((81985529216486895)[dartx.roundToDouble]()) == 'number');
+ expect$.Expect.isTrue(typeof -dart.notNull((27898229935051914142968983831921934135401027036219428335)[dartx.roundToDouble]()) == 'number');
+ };
+ dart.fn(int_round_to_double_test.main, VoidTodynamic());
+ // Exports:
+ exports.int_round_to_double_test = int_round_to_double_test;
+});
« no previous file with comments | « test/codegen/expect/corelib/int_round_test.js ('k') | test/codegen/expect/corelib/int_to_int_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698