Skip to content

Commit

Permalink
add some entries
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock committed Jul 22, 2023
1 parent 2972525 commit 5c61011
Show file tree
Hide file tree
Showing 12 changed files with 26 additions and 8 deletions.
2 changes: 2 additions & 0 deletions packages/core-js/actual/data-view/get-float16.js
@@ -0,0 +1,2 @@
'use strict';
require('../../modules/esnext.data-view.get-float16');
2 changes: 2 additions & 0 deletions packages/core-js/actual/data-view/index.js
@@ -1,4 +1,6 @@
'use strict';
var parent = require('../../stable/data-view');
require('../../modules/esnext.data-view.get-float16');
require('../../modules/esnext.data-view.set-float16');

module.exports = parent;
2 changes: 2 additions & 0 deletions packages/core-js/actual/data-view/set-float16.js
@@ -0,0 +1,2 @@
'use strict';
require('../../modules/esnext.data-view.set-float16');
5 changes: 5 additions & 0 deletions packages/core-js/actual/math/f16round.js
@@ -0,0 +1,5 @@
'use strict';
require('../../modules/esnext.math.f16round');
var path = require('../../internals/path');

module.exports = path.Math.f16round;
1 change: 1 addition & 0 deletions packages/core-js/actual/math/index.js
@@ -1,4 +1,5 @@
'use strict';
var parent = require('../../stable/math');
require('../../modules/esnext.math.f16round');

module.exports = parent;
4 changes: 4 additions & 0 deletions packages/core-js/full/data-view/get-float16.js
@@ -0,0 +1,4 @@
'use strict';
var parent = require('../../actual/data-view/get-float16');

module.exports = parent;
2 changes: 0 additions & 2 deletions packages/core-js/full/data-view/index.js
@@ -1,8 +1,6 @@
'use strict';
var parent = require('../../actual/data-view');
require('../../modules/esnext.data-view.get-float16');
require('../../modules/esnext.data-view.get-uint8-clamped');
require('../../modules/esnext.data-view.set-float16');
require('../../modules/esnext.data-view.set-uint8-clamped');

module.exports = parent;
4 changes: 4 additions & 0 deletions packages/core-js/full/data-view/set-float16.js
@@ -0,0 +1,4 @@
'use strict';
var parent = require('../../actual/data-view/set-float16');

module.exports = parent;
5 changes: 2 additions & 3 deletions packages/core-js/full/math/f16round.js
@@ -1,5 +1,4 @@
'use strict';
require('../../modules/esnext.math.f16round');
var path = require('../../internals/path');
var parent = require('../../actual/math/f16round');

module.exports = path.Math.f16round;
module.exports = parent;
1 change: 0 additions & 1 deletion packages/core-js/full/math/index.js
Expand Up @@ -4,7 +4,6 @@ require('../../modules/esnext.math.clamp');
require('../../modules/esnext.math.deg-per-rad');
require('../../modules/esnext.math.degrees');
require('../../modules/esnext.math.fscale');
require('../../modules/esnext.math.f16round');
require('../../modules/esnext.math.rad-per-deg');
require('../../modules/esnext.math.radians');
require('../../modules/esnext.math.scale');
Expand Down
4 changes: 3 additions & 1 deletion tests/entries/unit.mjs
Expand Up @@ -673,6 +673,8 @@ for (PATH of ['core-js-pure', 'core-js']) {
ok(typeof load(NS, 'async-iterator/some') == 'function');
ok(typeof load(NS, 'async-iterator/take') == 'function');
ok(typeof load(NS, 'async-iterator/to-array') == 'function');
load(NS, 'data-view/get-float16');
load(NS, 'data-view/set-float16');
ok(load(NS, 'function/metadata') === null);
ok(typeof load(NS, 'iterator') == 'function');
ok(typeof load(NS, 'iterator/drop') == 'function');
Expand All @@ -692,6 +694,7 @@ for (PATH of ['core-js-pure', 'core-js']) {
ok(load(NS, 'json/parse')('[42]', (key, value, { source }) => typeof value == 'number' ? source + source : value)[0] === '4242');
ok(typeof load(NS, 'json/raw-json')(42) == 'object');
ok(load(NS, 'map/group-by')([], it => it) instanceof load(NS, 'map'));
ok(load(NS, 'math/f16round')(1.337) === 1.3369140625);
ok(load(NS, 'promise/with-resolvers')().promise instanceof load(NS, 'promise'));
ok(load(NS, 'object/group-by')([1, 2, 3, 4, 5], it => it % 2 === 0 ? 'even' : 'odd').odd.length === 3);
ok(load(NS, 'set/difference')(new Set([1, 2, 3]), new Set([3, 4, 5])).size === 2);
Expand Down Expand Up @@ -787,7 +790,6 @@ for (PATH of ['core-js-pure', 'core-js']) {
ok(load(NS, 'math/deg-per-rad') === Math.PI / 180);
ok(load(NS, 'math/degrees')(Math.PI) === 180);
ok(load(NS, 'math/fscale')(3, 1, 2, 1, 2) === 3);
ok(load(NS, 'math/f16round')(1.337) === 1.3369140625);
ok(load(NS, 'math/iaddh')(3, 2, 0xFFFFFFFF, 4) === 7);
ok(load(NS, 'math/isubh')(3, 4, 0xFFFFFFFF, 2) === 1);
ok(load(NS, 'math/imulh')(0xFFFFFFFF, 7) === -1);
Expand Down
2 changes: 1 addition & 1 deletion tests/unit-pure/esnext.math.f16round.js
@@ -1,7 +1,7 @@
// some asserts based on https://github.com/petamoriken/float16/blob/master/test/f16round.js
import { createConversionChecker } from '../helpers/helpers';

import f16round from 'core-js-pure/full/math/f16round';
import f16round from 'core-js-pure/actual/math/f16round';

const { MAX_VALUE, MIN_VALUE } = Number;

Expand Down

0 comments on commit 5c61011

Please sign in to comment.