From 3a4ff0fa562dfe1e903fe3b3f663c1c803f73447 Mon Sep 17 00:00:00 2001 From: duqingquan Date: Fri, 11 Oct 2024 12:21:27 +0800 Subject: [PATCH] =?UTF-8?q?IJSONStringify=20=E5=91=BD=E5=90=8D=E8=B0=83?= =?UTF-8?q?=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- uni_modules/uts-tests/utssdk/JSON.uts | 12 ++++++------ uni_modules/uts-tests/utssdk/UTSJSONObject.uts | 2 +- uni_modules/uts-tests/utssdk/tests.uts | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/uni_modules/uts-tests/utssdk/JSON.uts b/uni_modules/uts-tests/utssdk/JSON.uts index aecf8c4..3ff104a 100644 --- a/uni_modules/uts-tests/utssdk/JSON.uts +++ b/uni_modules/uts-tests/utssdk/JSON.uts @@ -39,7 +39,7 @@ function countOccurrences(str : string, substr : string) : number { } // #ifdef APP-ANDROID -class A1 implements IJsonStringify{ +class A1 implements IJSONStringify{ override toJSON():any|null{ let jsonRet = { 'name': "zhangsan", @@ -49,31 +49,31 @@ class A1 implements IJsonStringify{ } } -class A2 implements IJsonStringify{ +class A2 implements IJSONStringify{ toJSON():any|null{ return 2 } } -class A3 implements IJsonStringify{ +class A3 implements IJSONStringify{ toJSON():any|null{ return "json" } } -class A4 implements IJsonStringify{ +class A4 implements IJSONStringify{ toJSON():any|null{ return null } } -class A5 implements IJsonStringify{ +class A5 implements IJSONStringify{ toJSON():any|null{ return new A1() } } -class A6 implements IJsonStringify{ +class A6 implements IJSONStringify{ toJSON():any|null{ return new A5() } diff --git a/uni_modules/uts-tests/utssdk/UTSJSONObject.uts b/uni_modules/uts-tests/utssdk/UTSJSONObject.uts index 5e8e9d4..9682272 100644 --- a/uni_modules/uts-tests/utssdk/UTSJSONObject.uts +++ b/uni_modules/uts-tests/utssdk/UTSJSONObject.uts @@ -59,7 +59,7 @@ export function testUTSJSONObject() : Result { expect(data2!.toJSONString()).toEqual('{"str":"test","num":1.0,"num2":2.369}') - class TestData2 implements IJsonStringify{ + class TestData2 implements IJSONStringify{ toJSON():any|null{ return "122" } diff --git a/uni_modules/uts-tests/utssdk/tests.uts b/uni_modules/uts-tests/utssdk/tests.uts index 5304142..678b073 100644 --- a/uni_modules/uts-tests/utssdk/tests.uts +++ b/uni_modules/uts-tests/utssdk/tests.uts @@ -2,7 +2,7 @@ import { Matchers,NumberMatchers } from './Matchers.uts' export const describes = new Map() // #ifndef APP-IOS -export class Result implements IJsonStringify { +export class Result implements IJSONStringify { total = 0 passed: string[] = [] failed: string[] = [] -- GitLab