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

Unified Diff: test/codegen/expect/corelib/int_to_int_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/corelib/int_to_int_test.js
diff --git a/test/codegen/expect/corelib/int_to_int_test.js b/test/codegen/expect/corelib/int_to_int_test.js
new file mode 100644
index 0000000000000000000000000000000000000000..876e99b80bf1696c5fdb15ba4391a5613651e78a
--- /dev/null
+++ b/test/codegen/expect/corelib/int_to_int_test.js
@@ -0,0 +1,43 @@
+dart_library.library('corelib/int_to_int_test', null, /* Imports */[
+ 'dart_sdk',
+ 'expect'
+], function load__int_to_int_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_to_int_test = Object.create(null);
+ let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [])))();
+ int_to_int_test.main = function() {
+ expect$.Expect.equals(0, (0)[dartx.toInt]());
+ expect$.Expect.equals(1, (1)[dartx.toInt]());
+ expect$.Expect.equals(4660, (4660)[dartx.toInt]());
+ expect$.Expect.equals(305419896, (305419896)[dartx.toInt]());
+ expect$.Expect.equals(1250999896491, (1250999896491)[dartx.toInt]());
+ expect$.Expect.equals(81985529216486895, (81985529216486895)[dartx.toInt]());
+ expect$.Expect.equals(27898229935051914142968983831921934135401027036219428335, (27898229935051914142968983831921934135401027036219428335)[dartx.toInt]());
+ expect$.Expect.equals(-1, -dart.notNull((1)[dartx.toInt]()));
+ expect$.Expect.equals(-4660, -dart.notNull((4660)[dartx.toInt]()));
+ expect$.Expect.equals(-305419896, -dart.notNull((305419896)[dartx.toInt]()));
+ expect$.Expect.equals(-1250999896491, -dart.notNull((1250999896491)[dartx.toInt]()));
+ expect$.Expect.equals(-81985529216486895, -dart.notNull((81985529216486895)[dartx.toInt]()));
+ expect$.Expect.equals(-27898229935051914142968983831921934135401027036219428335, -dart.notNull((27898229935051914142968983831921934135401027036219428335)[dartx.toInt]()));
+ expect$.Expect.isTrue(typeof (0)[dartx.toInt]() == 'number');
+ expect$.Expect.isTrue(typeof (1)[dartx.toInt]() == 'number');
+ expect$.Expect.isTrue(typeof (4660)[dartx.toInt]() == 'number');
+ expect$.Expect.isTrue(typeof (305419896)[dartx.toInt]() == 'number');
+ expect$.Expect.isTrue(typeof (1250999896491)[dartx.toInt]() == 'number');
+ expect$.Expect.isTrue(typeof (81985529216486895)[dartx.toInt]() == 'number');
+ expect$.Expect.isTrue(typeof (27898229935051914142968983831921934135401027036219428335)[dartx.toInt]() == 'number');
+ expect$.Expect.isTrue(typeof -dart.notNull((1)[dartx.toInt]()) == 'number');
+ expect$.Expect.isTrue(typeof -dart.notNull((4660)[dartx.toInt]()) == 'number');
+ expect$.Expect.isTrue(typeof -dart.notNull((305419896)[dartx.toInt]()) == 'number');
+ expect$.Expect.isTrue(typeof -dart.notNull((1250999896491)[dartx.toInt]()) == 'number');
+ expect$.Expect.isTrue(typeof -dart.notNull((81985529216486895)[dartx.toInt]()) == 'number');
+ expect$.Expect.isTrue(typeof -dart.notNull((27898229935051914142968983831921934135401027036219428335)[dartx.toInt]()) == 'number');
+ };
+ dart.fn(int_to_int_test.main, VoidTodynamic());
+ // Exports:
+ exports.int_to_int_test = int_to_int_test;
+});
« no previous file with comments | « test/codegen/expect/corelib/int_round_to_double_test.js ('k') | test/codegen/expect/corelib/int_truncate_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698