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

Unified Diff: test/codegen/expect/language/mul_recipr_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/language/modulo_test.js ('k') | test/codegen/expect/language/multi_assign_test.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/codegen/expect/language/mul_recipr_test.js
diff --git a/test/codegen/expect/language/mul_recipr_test.js b/test/codegen/expect/language/mul_recipr_test.js
new file mode 100644
index 0000000000000000000000000000000000000000..5bec3775067d4580a12281a10dd0313aaf25360b
--- /dev/null
+++ b/test/codegen/expect/language/mul_recipr_test.js
@@ -0,0 +1,39 @@
+dart_library.library('language/mul_recipr_test', null, /* Imports */[
+ 'dart_sdk',
+ 'expect'
+], function load__mul_recipr_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 mul_recipr_test = Object.create(null);
+ let VoidTodynamic = () => (VoidTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [])))();
+ let doubleTodynamic = () => (doubleTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [core.double])))();
+ let dynamicTodynamic = () => (dynamicTodynamic = dart.constFn(dart.definiteFunctionType(dart.dynamic, [dart.dynamic])))();
+ mul_recipr_test.xx = 23.0;
+ mul_recipr_test.main = function() {
+ mul_recipr_test.xx = 0.000001;
+ mul_recipr_test.scaleIt(1e-310);
+ expect$.Expect.isTrue(mul_recipr_test.xx[dartx.isInfinite]);
+ for (let i = 0; i < 10; i++) {
+ mul_recipr_test.xx = 24.0;
+ mul_recipr_test.scaleIt(6.0);
+ expect$.Expect.equals(4.0, mul_recipr_test.xx);
+ }
+ mul_recipr_test.xx = 0.000001;
+ mul_recipr_test.scaleIt(1e-310);
+ expect$.Expect.isTrue(mul_recipr_test.xx[dartx.isInfinite]);
+ };
+ dart.fn(mul_recipr_test.main, VoidTodynamic());
+ mul_recipr_test.scaleIt = function(b) {
+ mul_recipr_test.scale(1.0 / dart.notNull(b));
+ };
+ dart.fn(mul_recipr_test.scaleIt, doubleTodynamic());
+ mul_recipr_test.scale = function(a) {
+ mul_recipr_test.xx = dart.notNull(mul_recipr_test.xx) * dart.notNull(core.num._check(a));
+ };
+ dart.fn(mul_recipr_test.scale, dynamicTodynamic());
+ // Exports:
+ exports.mul_recipr_test = mul_recipr_test;
+});
« no previous file with comments | « test/codegen/expect/language/modulo_test.js ('k') | test/codegen/expect/language/multi_assign_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698