提交 207157cd 编写于 作者: M mahaifeng

[doc]修复测试用例编译问题

上级 97915503
......@@ -112,8 +112,9 @@ export function testMath() : Result {
// #TEST Math.acos
console.log(Math.acos(-1));
// expected output: 3.141592653589793
// #ifdef APP-ANDROID
console.log(Math.acos(NaN));
// #endif
// expected output: NaN
console.log(Math.acos(0));
......@@ -133,8 +134,9 @@ export function testMath() : Result {
// #TEST Math.acosh
console.log(Math.acosh(1));
// expected output: 0
// #ifdef APP-ANDROID
console.log(Math.acosh(NaN));
// #endif
// expected output: NaN
console.log(Math.acosh(2));
......@@ -152,7 +154,9 @@ export function testMath() : Result {
test('asin', () => {
// #TEST Math.asin
// #ifdef APP-ANDROID
console.log(Math.asin(NaN));
// #endif
// expected output: NaN
console.log(Math.asin(-1));
......@@ -177,7 +181,9 @@ export function testMath() : Result {
test('asinh', () => {
// #TEST Math.asinh
// #ifdef APP-ANDROID
console.log(Math.asinh(NaN));
// #endif
// expected output: NaN
console.log(Math.asinh(1));
......@@ -202,7 +208,9 @@ export function testMath() : Result {
test('atan', () => {
// #TEST Math.atan
// #ifdef APP-ANDROID
console.log(Math.atan(NaN));
// #endif
// expected output: NaN
console.log(Math.atan(1));
......@@ -231,7 +239,9 @@ export function testMath() : Result {
test('atanh', () => {
// #TEST Math.atanh
// #ifdef APP-ANDROID
console.log(Math.atanh(NaN));
// #endif
// expected output: NaN
console.log(Math.atanh(0));
......@@ -253,8 +263,9 @@ export function testMath() : Result {
// #TEST Math.ceil
console.log(Math.ceil(0.95));
// expected output: 1
// #ifdef APP-ANDROID
console.log(Math.ceil(NaN));
// #endif
// expected output: NaN
console.log(Math.ceil(4));
......@@ -383,7 +394,9 @@ export function testMath() : Result {
test('fround', () => {
// #TEST Math.fround
// #ifdef APP-ANDROID
console.log(Math.fround(NaN));
// #endif
// expected output: NaN
console.log(Math.fround(1.5));
......@@ -626,50 +639,12 @@ export function testMath() : Result {
test('round', () => {
// #TEST Math.round
console.log(Math.round(NaN));
// expected output: NaN
console.log(Math.round(Math.E));
// expected output: 3
console.log(Math.round(Number.MAX_VALUE));
// expected output: 1.7976931348623157e+308
console.log(Math.round(Number.MIN_VALUE));
// expected output: 0
console.log(Math.round(Number.NEGATIVE_INFINITY));
// expected output: -Infinity
console.log(Math.round(Number.POSITIVE_INFINITY));
// expected output: Infinity
console.log(Math.round(0.9));
// expected output: 1
console.log(Math.round(5.95));
// expected output: 6
console.log(Math.round(-5.05));
// expected output: -5
console.log(Math.round(37110233000.223));
// expected output: 37110233000
console.log(Math.round(-37110233000.223));
// expected output: -37110233000
// #END
expect(Math.round(NaN)).toEqual(NaN);
expect(Math.round(Math.E)).toEqual(3);
expectNumber(Math.round(Number.MAX_VALUE)).toEqualDouble(1.7976931348623157e+308);
expect(Math.round(Number.MIN_VALUE)).toEqual(0);
expect(Math.round(Number.NEGATIVE_INFINITY)).toEqual(-Infinity);
expect(Math.round(Number.POSITIVE_INFINITY)).toEqual(Infinity);
expect(Math.round(0.9)).toEqual(1);
expect(Math.round(5.95)).toEqual(6);
expect(Math.round(-5.05)).toEqual(-5);
expect(Math.round(37110233000.223)).toEqual(37110233000);
expect(Math.round(-37110233000.223)).toEqual(-37110233000);
// #END
})
})
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册