1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 04:27:44 +00:00

LibJS: Uncomment the tests that pass now

This commit is contained in:
Egor Ananyin 2020-12-29 13:44:52 +03:00 committed by Andreas Kling
parent 92c6ae57fc
commit 1dbd264239
8 changed files with 19 additions and 22 deletions

View file

@ -5,5 +5,5 @@ test("basic functionality", () => {
expect(Math.acosh(0)).toBeNaN(); expect(Math.acosh(0)).toBeNaN();
expect(Math.acosh(0.5)).toBeNaN(); expect(Math.acosh(0.5)).toBeNaN();
expect(Math.acosh(1)).toBeCloseTo(0); expect(Math.acosh(1)).toBeCloseTo(0);
// FIXME: expect(Math.acosh(2)).toBeCloseTo(1.316957); expect(Math.acosh(2)).toBeCloseTo(1.316957);
}); });

View file

@ -2,5 +2,5 @@ test("basic functionality", () => {
expect(Math.asinh).toHaveLength(1); expect(Math.asinh).toHaveLength(1);
expect(Math.asinh(0)).toBeCloseTo(0); expect(Math.asinh(0)).toBeCloseTo(0);
// FIXME: expect(Math.asinh(1)).toBeCloseTo(0.881373); expect(Math.asinh(1)).toBeCloseTo(0.881373);
}); });

View file

@ -4,7 +4,7 @@ test("basic functionality", () => {
expect(Math.atanh(-2)).toBeNaN(); expect(Math.atanh(-2)).toBeNaN();
expect(Math.atanh(2)).toBeNaN(); expect(Math.atanh(2)).toBeNaN();
expect(Math.atanh(-1)).toBe(-Infinity); expect(Math.atanh(-1)).toBe(-Infinity);
// FIXME: expect(Math.atanh(0)).toBe(0); expect(Math.atanh(0)).toBe(0);
expect(Math.atanh(0.5)).toBeCloseTo(0.549306); expect(Math.atanh(0.5)).toBeCloseTo(0.549306);
// FIXME: expect(Math.atanh(1)).toBe(Infinity); expect(Math.atanh(1)).toBe(Infinity);
}); });

View file

@ -2,11 +2,11 @@ test("basic functionality", () => {
expect(Math.cbrt).toHaveLength(1); expect(Math.cbrt).toHaveLength(1);
expect(Math.cbrt(NaN)).toBeNaN(); expect(Math.cbrt(NaN)).toBeNaN();
// FIXME: expect(Math.cbrt(-1)).toBe(-1); expect(Math.cbrt(-1)).toBe(-1);
expect(Math.cbrt(-0)).toBe(-0); expect(Math.cbrt(-0)).toBe(-0);
// FIXME: expect(Math.cbrt(-Infinity)).toBe(-Infinity); expect(Math.cbrt(-Infinity)).toBe(-Infinity);
// FIXME: expect(Math.cbrt(1)).toBe(1); expect(Math.cbrt(1)).toBe(1);
// FIXME: expect(Math.cbrt(Infinity)).toBe(Infinity); expect(Math.cbrt(Infinity)).toBe(Infinity);
// FIXME: expect(Math.cbrt(null)).toBe(0); expect(Math.cbrt(null)).toBe(0);
// FIXME: expect(Math.cbrt(2)).toBeCloseTo(1.259921)); expect(Math.cbrt(2)).toBeCloseTo(1.259921);
}); });

View file

@ -3,7 +3,6 @@ test("basic functionality", () => {
expect(Math.log(-1)).toBe(NaN); expect(Math.log(-1)).toBe(NaN);
expect(Math.log(0)).toBe(-Infinity); expect(Math.log(0)).toBe(-Infinity);
// FIXME: not precise enough expect(Math.log(1)).toBe(0);
//expect(Math.log(1)).toBe(0);
expect(Math.log(10)).toBeCloseTo(2.302585092994046); expect(Math.log(10)).toBeCloseTo(2.302585092994046);
}); });

View file

@ -1,10 +1,9 @@
test("basic functionality", () => { test("basic functionality", () => {
expect(Math.log10).toHaveLength(1); expect(Math.log10).toHaveLength(1);
// FIXME: not precise enough expect(Math.log10(2)).toBeCloseTo(0.3010299956639812);
// expect(Math.log10(2)).toBeCloseTo(0.3010299956639812); expect(Math.log10(1)).toBe(0);
// expect(Math.log10(1)).toBe(0);
expect(Math.log10(0)).toBe(-Infinity); expect(Math.log10(0)).toBe(-Infinity);
expect(Math.log10(-2)).toBe(NaN); expect(Math.log10(-2)).toBe(NaN);
// expect(Math.log10(100000)).toBe(5); expect(Math.log10(100000)).toBe(5);
}); });

View file

@ -3,6 +3,6 @@ test("basic functionality", () => {
expect(Math.log1p(-2)).toBeNaN(); expect(Math.log1p(-2)).toBeNaN();
expect(Math.log1p(-1)).toBe(-Infinity); expect(Math.log1p(-1)).toBe(-Infinity);
// FIXME: expect(Math.log1p(0)).toBe(0); expect(Math.log1p(0)).toBe(0);
// FIXME: expect(Math.log1p(1)).toBeCloseTo(0.693147); expect(Math.log1p(1)).toBeCloseTo(0.693147);
}); });

View file

@ -2,10 +2,9 @@ test("basic functionality", () => {
expect(Math.log2).toHaveLength(1); expect(Math.log2).toHaveLength(1);
expect(Math.log2(3)).toBeCloseTo(1.584962500721156); expect(Math.log2(3)).toBeCloseTo(1.584962500721156);
// FIXME: not precise enough expect(Math.log2(2)).toBe(1);
// expect(Math.log2(2)).toBe(1); expect(Math.log2(1)).toBe(0);
// expect(Math.log2(1)).toBe(0);
expect(Math.log2(0)).toBe(-Infinity); expect(Math.log2(0)).toBe(-Infinity);
expect(Math.log2(-2)).toBe(NaN); expect(Math.log2(-2)).toBe(NaN);
// expect(Math.log2(1024)).toBe(10); expect(Math.log2(1024)).toBe(10);
}); });