diff --git a/uni_modules/uts-tests/utssdk/Number.uts b/uni_modules/uts-tests/utssdk/Number.uts index 0d1103ab5d0203a4013001357c79d9d2bb26ec74..5a22aa7f3e30fa4e195f1c79a46092018f128837 100644 --- a/uni_modules/uts-tests/utssdk/Number.uts +++ b/uni_modules/uts-tests/utssdk/Number.uts @@ -59,6 +59,14 @@ export function testNumber() : Result { expect(isFinite(1000 / 1)).toEqual(true); expect(isFinite(910)).toEqual(true); expect(isFinite(0)).toEqual(true); + + let aj2 = JSON.parse('{"a":1}') as UTSJSONObject; + let aNumber = aj2['a'] as UTSNumber + expect(isFinite(aNumber)).toEqual(true); + expect(UTSNumber.isFinite(aNumber)).toEqual(true); + expect(UTSNumber.isFinite(11.00)).toEqual(true); + expect(UTSNumber.isFinite(Double.POSITIVE_INFINITY)).toEqual(false); + }) test('number-from-json-parse', () => {