diff --git a/uni_modules/uts-tests/utssdk/UTSJSONObject.uts b/uni_modules/uts-tests/utssdk/UTSJSONObject.uts index 8b870e18d86dfce4f2cdf6477bfd38dea9f2f2e1..b1a896245b42b28b34ad460c967e65c0e01b9155 100644 --- a/uni_modules/uts-tests/utssdk/UTSJSONObject.uts +++ b/uni_modules/uts-tests/utssdk/UTSJSONObject.uts @@ -89,6 +89,16 @@ export function testUTSJSONObject() : Result { // #endif }) + test('get-no-exist-value', () => { + // #ifdef APP-ANDROID + let test = { + qq:[11,22] + } + expect(test.getNumber("qq[2]")).toEqual(null); + expect(test.getNumber("qq[2]",999)).toEqual(999); + + // #endif + }) test('setvalue-after-get', () => { // #ifdef APP-ANDROID // #TEST UTSJSONObject.getJSON,UTSJSONObject.getArray