mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-03 08:08:43 +00:00
LibJS: Add spec comments and check for edge cases in Math.log
This commit is contained in:
parent
d4e5644df8
commit
4813385c9a
Notes:
sideshowbarker
2024-07-17 05:18:58 +09:00
Author: https://github.com/davidot
Commit: 4813385c9a
Pull-request: https://github.com/SerenityOS/serenity/pull/16234
2 changed files with 23 additions and 3 deletions
|
@ -5,4 +5,7 @@ test("basic functionality", () => {
|
|||
expect(Math.log(0)).toBe(-Infinity);
|
||||
expect(Math.log(1)).toBe(0);
|
||||
expect(Math.log(10)).toBeCloseTo(2.302585092994046);
|
||||
expect(Math.log(NaN)).toBe(NaN);
|
||||
expect(Math.log(Number.POSITIVE_INFINITY)).toBe(Number.POSITIVE_INFINITY);
|
||||
expect(Math.log(-0.0)).toBe(Number.NEGATIVE_INFINITY);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue