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

Unified Diff: test/codegen/expect/corelib/hashcode_boxed_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/hashcode_boxed_test.js
diff --git a/test/codegen/expect/corelib/hashcode_boxed_test.js b/test/codegen/expect/corelib/hashcode_boxed_test.js
new file mode 100644
index 0000000000000000000000000000000000000000..d86e1c4aeb6ddde9c0730af60c8a50b3de7ce835
--- /dev/null
+++ b/test/codegen/expect/corelib/hashcode_boxed_test.js
@@ -0,0 +1,28 @@
+dart_library.library('corelib/hashcode_boxed_test', null, /* Imports */[
+ 'dart_sdk',
+ 'expect'
+], function load__hashcode_boxed_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 hashcode_boxed_test = Object.create(null);
+ let doubleTodouble = () => (doubleTodouble = dart.constFn(dart.definiteFunctionType(core.double, [core.double])))();
+ let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [])))();
+ hashcode_boxed_test.fib = function(n) {
+ return dart.notNull(n) <= 1.0 ? 1.0 : dart.notNull(hashcode_boxed_test.fib(dart.notNull(n) - 1)) + dart.notNull(hashcode_boxed_test.fib(dart.notNull(n) - 2));
+ };
+ dart.fn(hashcode_boxed_test.fib, doubleTodouble());
+ hashcode_boxed_test.main = function() {
+ let a = dart.notNull(hashcode_boxed_test.fib(5.0)) + 1.0;
+ let b = dart.notNull(hashcode_boxed_test.fib(4.0)) + 4.0;
+ expect$.Expect.isTrue(core.identical(a, b));
+ expect$.Expect.equals(core.identityHashCode(a), core.identityHashCode(b));
+ expect$.Expect.equals(a, b);
+ expect$.Expect.equals(dart.hashCode(a), dart.hashCode(b));
+ };
+ dart.fn(hashcode_boxed_test.main, VoidTodynamic());
+ // Exports:
+ exports.hashcode_boxed_test = hashcode_boxed_test;
+});
« no previous file with comments | « test/codegen/expect/corelib/hash_set_type_check_test.js ('k') | test/codegen/expect/corelib/hashcode_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698