ladybird/Libraries/LibJS/Tests/builtins/Math/Math.f16round.js
rmg-x ea20545853 LibJS: Add support for Float16Array
Implements TC39 stage three proposal for Float16Arrays:
https://tc39.es/proposal-float16array
2024-11-10 14:48:20 -07:00

8 lines
266 B
JavaScript

test("basic functionality", () => {
expect(Math.f16round).toHaveLength(1);
expect(Math.f16round(5.5)).toBe(5.5);
expect(Math.f16round(5.05)).toBe(5.05078125);
expect(Math.f16round(5)).toBe(5);
expect(Math.f16round(-5.05)).toBe(-5.05078125);
});