diff --git a/commonlibrary/ets_utils/process_lib_standard/src/main/js/test/Process.test.js b/commonlibrary/ets_utils/process_lib_standard/src/main/js/test/Process.test.js index e90bc893453d5e037c8d51d08819cacfccddbbce..cf41d1bff0577746db3d1f20598957405b7c1ff0 100644 --- a/commonlibrary/ets_utils/process_lib_standard/src/main/js/test/Process.test.js +++ b/commonlibrary/ets_utils/process_lib_standard/src/main/js/test/Process.test.js @@ -320,11 +320,11 @@ describe('ChildProcessTest', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_001 + * @tc.name: testTid001 * @tc.desc: Returns the tid of the current thread. * @tc.author: liwenqiang */ - it('SUB_Runtime_JSAPI_001', 0, function () { + it('testTid001', 0, function () { let pres = process.tid if (pres > 0) { var flag = new Boolean(true) @@ -333,11 +333,11 @@ describe('ChildProcessTest', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_002 + * @tc.name: testTid002 * @tc.desc: Returns the tid of the current thread. * @tc.author: liwenqiang */ - it('SUB_Runtime_JSAPI_002', 0, function () { + it('testTid002', 0, function () { for (let i=0; i < 5; i++) { let pres = process.tid if (pres > 0) { @@ -348,11 +348,11 @@ describe('ChildProcessTest', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_003 + * @tc.name: testTid003 * @tc.desc: Returns the tid of the current thread. * @tc.author: liwenqiang */ - it('SUB_Runtime_JSAPI_003', 0, function () { + it('testTid003', 0, function () { for (let i=0; i < 3; i++) { let pres = process.tid if (pres > 0) { @@ -364,21 +364,21 @@ describe('ChildProcessTest', function () { /** - * @tc.name: SUB_Runtime_JSAPI_001 + * @tc.name: testisIsolatedProcess001 * @tc.desc: Returns a boolean whether the process is isolated. * @tc.author: liwenqiang */ - it('SUB_Runtime_JSAPI_001', 0, function () { + it('testisIsolatedProcess001', 0, function () { let pres = process.isIsolatedProcess() expect(pres).assertEqual(true) }) /** - * @tc.name: SUB_Runtime_JSAPI_002 + * @tc.name: testisIsolatedProcess002 * @tc.desc: Returns a boolean whether the process is isolated. * @tc.author: liwenqiang */ - it('SUB_Runtime_JSAPI_002', 0, function () { + it('testisIsolatedProcess002', 0, function () { for (let i=0; i < 3; i++) { let pres = process.isIsolatedProcess() expect(pres).assertEqual(true) @@ -386,11 +386,11 @@ describe('ChildProcessTest', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_003 + * @tc.name: testisIsolatedProcess003 * @tc.desc: Returns a boolean whether the process is isolated. * @tc.author: liwenqiang */ - it('SUB_Runtime_JSAPI_003', 0, function () { + it('testisIsolatedProcess003', 0, function () { for (let i=0; i < 5; i++) { let pres = process.isIsolatedProcess() expect(pres).assertEqual(true) @@ -399,21 +399,21 @@ describe('ChildProcessTest', function () { /** - * @tc.name: SUB_Runtime_JSAPI_001 + * @tc.name: testIsappuid001 * @tc.desc: Returns a boolean whether the specified uid belongs to a particular application. * @tc.author: liwenqiang */ - it('SUB_Runtime_JSAPI_001', 0, function () { + it('testIsappuid001', 0, function () { let isorno = process.isAppUid(167) expect(isorno).assertEqual(false) }) /** - * @tc.name: SUB_Runtime_JSAPI_002 + * @tc.name: testIsappuid002 * @tc.desc: Returns a boolean whether the specified uid belongs to a particular application. * @tc.author: liwenqiang */ - it('SUB_Runtime_JSAPI_002', 0, function () { + it('testIsappuid002', 0, function () { let isorno = process.isAppUid(123) expect(isorno).assertEqual(false) }) @@ -449,11 +449,11 @@ describe('ChildProcessTest', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_001 + * @tc.name: testIs64Bit001 * @tc.desc: Returns a boolean whether the process is running in a 64-bit environment. * @tc.author: liwenqiang */ - it('SUB_Runtime_JSAPI_001', 0, function () { + it('testIs64Bit001', 0, function () { let isorno = process.is64Bit() if (isorno) { expect(isorno).assertEqual(true) @@ -463,11 +463,11 @@ describe('ChildProcessTest', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_002 + * @tc.name: testIs64Bit002 * @tc.desc: Returns a boolean whether the process is running in a 64-bit environment. * @tc.author: liwenqiang */ - it('SUB_Runtime_JSAPI_002', 0, function () { + it('testIs64Bit002', 0, function () { for (let i=0; i<3; i++) { let isorno = process.is64Bit() if (isorno) { @@ -479,11 +479,11 @@ describe('ChildProcessTest', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_003 + * @tc.name: testIs64Bit003 * @tc.desc: Returns a boolean whether the process is running in a 64-bit environment. * @tc.author: liwenqiang */ - it('SUB_Runtime_JSAPI_003', 0, function () { + it('testIs64Bit004', 0, function () { for (let i=0; i<5; i++) { let isorno = process.is64Bit() if (isorno) { @@ -496,11 +496,11 @@ describe('ChildProcessTest', function () { /** - * @tc.name: SUB_Runtime_JSAPI_001 + * @tc.name: testGetUidForName001 * @tc.desc: Returns the uid based on the specified user name. * @tc.author: liwenqiang */ - it('SUB_Runtime_JSAPI_001',0, function () { + it('testGetUidForName001',0, function () { let pres = process.getUidForName("root") if (pres != -1) { let flag = new Boolean(true) @@ -509,11 +509,11 @@ describe('ChildProcessTest', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_002 + * @tc.name: testGetUidForName002 * @tc.desc: Returns the uid based on the specified user name. * @tc.author: liwenqiang */ - it('SUB_Runtime_JSAPI_002', 0, function () { + it('testGetUidForName002', 0, function () { for (let i=0; i<3; i++) { let pres = process.getUidForName("12356") expect(pres).assertEqual(-1) @@ -521,11 +521,11 @@ describe('ChildProcessTest', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_003 + * @tc.name: testGetUidForName003 * @tc.desc: Returns the uid based on the specified user name. * @tc.author: liwenqiang */ - it('SUB_Runtime_JSAPI_003', 0, function () { + it('testGetUidForName003', 0, function () { for (let i=0; i<5; i++) { let pres = process.getUidForName("12356") expect(pres).assertEqual(-1) @@ -534,11 +534,11 @@ describe('ChildProcessTest', function () { /** - * @tc.name: SUB_Runtime_JSAPI_001 + * @tc.name: testGetThreadPriority001 * @tc.desc: Returns the thread priority based on the specified tid. * @tc.author: liwenqiang */ - it('SUB_Runtime_JSAPI_001', 0, function () { + it('testGetThreadPriority001', 0, function () { let pres = process.tid let pri = process.getThreadPriority(pres) if (pri) { @@ -548,11 +548,11 @@ describe('ChildProcessTest', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_002 + * @tc.name: testGetThreadPriority002 * @tc.desc: Returns the thread priority based on the specified tid. * @tc.author: liwenqiang */ - it('SUB_Runtime_JSAPI_002', 0, function () { + it('testGetThreadPriority002', 0, function () { let pres = process.tid for (let i=0; i<3; i++) { let pri = process.getThreadPriority(pres) @@ -564,11 +564,11 @@ describe('ChildProcessTest', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_003 + * @tc.name: testGetThreadPriority003 * @tc.desc: Returns the thread priority based on the specified tid. * @tc.author: liwenqiang */ - it('SUB_Runtime_JSAPI_003', 0, function () { + it('testGetThreadPriority003', 0, function () { let pres = process.tid for (let i=0; i<5; i++) { let pri = process.getThreadPriority(pres) @@ -580,12 +580,12 @@ describe('ChildProcessTest', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_001 + * @tc.name: testGetStartRealtime001 * @tc.desc: Returns the elapsed real time (in milliseconds) taken from the start of * @the system to the start of the process. * @tc.author: liwenqiang */ - it('SUB_Runtime_JSAPI_001', 0, function () { + it('testGetStartRealtime001', 0, function () { for (let i=0; i<3; i++) { let pri = process.getStartRealtime() if (pri !== null) { @@ -596,12 +596,12 @@ describe('ChildProcessTest', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_002 + * @tc.name: testGetStartRealtime002 * @tc.desc: Returns the elapsed real time (in milliseconds) taken from the start of * @the system to the start of the process. * @tc.author: liwenqiang */ - it('SUB_Runtime_JSAPI_002', 0, function () { + it('testGetStartRealtime002', 0, function () { let pri = process.getStartRealtime() if (pri !== null) { var flag = new Boolean(true) @@ -610,12 +610,12 @@ describe('ChildProcessTest', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_003 + * @tc.name: testGetStartRealtime003 * @tc.desc: Returns the elapsed real time (in milliseconds) taken from the start of * @the system to the start of the process. * @tc.author: liwenqiang */ - it('SUB_Runtime_JSAPI_003', 0, function () { + it('testGetStartRealtime003', 0, function () { for (let i=0; i<5; i++) { let pri = process.getStartRealtime() if (pri !== null) { @@ -626,12 +626,12 @@ describe('ChildProcessTest', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_004 + * @tc.name: testGetStartRealtime004 * @tc.desc: Returns the elapsed real time (in milliseconds) * @taken from the start of the system to the start of the process. * @tc.author: liwenqiang */ - it('SUB_Runtime_JSAPI_004', 0, function () { + it('testGetStartRealtime004', 0, function () { for (let i=0; i<8; i++) { let pri = process.getStartRealtime() if (pri !== null) { @@ -642,12 +642,12 @@ describe('ChildProcessTest', function () { }) /** - * @tc.name: testGetstartrealtime005 + * @tc.name: testGetStartRealtime005 * @tc.desc: Returns the elapsed real time (in milliseconds) taken from the start of * @the system to the start of the process. * @tc.author: liwenqiang */ - it('testGetstartrealtime005', 0, function () { + it('testGetStartRealtime005', 0, function () { for (let i=0; i<6; i++) { let pri = process.getStartRealtime() if (pri !== null) { @@ -673,11 +673,11 @@ describe('ChildProcessTest', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_002 + * @tc.name: testGetpastCpuTime002 * @tc.desc: Returns the cpu time (in milliseconds) from the time when the process starts to the current time. * @tc.author: liwenqiang */ - it('SUB_Runtime_JSAPI_002', 0, function () { + it('testGetpastCpuTime002', 0, function () { let pri = process.getPastCpuTime() if (pri > 0) { var flag = new Boolean(true) @@ -686,11 +686,11 @@ describe('ChildProcessTest', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_003 + * @tc.name: testGetpastCpuTime003 * @tc.desc: Returns the cpu time (in milliseconds) from the time when the process starts to the current time. * @tc.author: liwenqiang */ - it('SUB_Runtime_JSAPI_003', 0, function () { + it('testGetpastCpuTime003', 0, function () { for (let i=0; i<5; i++) { let pri = process.getPastCpuTime() if (pri > 0) { @@ -701,11 +701,11 @@ describe('ChildProcessTest', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_004 + * @tc.name: testGetpastCpuTime004 * @tc.desc: Returns the cpu time (in milliseconds) from the time when the process starts to the current time. * @tc.author: liwenqiang */ - it('SUB_Runtime_JSAPI_004', 0, function () { + it('testGetpastCpuTime004', 0, function () { for (let i=0; i<8; i++) { let pri = process.getPastCpuTime() if (pri > 0) { @@ -716,11 +716,11 @@ describe('ChildProcessTest', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_001 + * @tc.name: testGetSystemConfig001 * @tc.desc: Returns the system configuration at runtime. * @tc.author: liwenqiang */ - it('SUB_Runtime_JSAPI_001', 0, function () { + it('testGetSystemConfig001', 0, function () { let _SC_ARG_MAX = 0 let pri = process.getSystemConfig(_SC_ARG_MAX) if (pri > 0) { @@ -730,11 +730,11 @@ describe('ChildProcessTest', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_002 + * @tc.name: testGetSystemConfig002 * @tc.desc: Returns the system configuration at runtime. * @tc.author: liwenqiang */ - it('SUB_Runtime_JSAPI_002', 0, function () { + it('testGetSystemConfig002', 0, function () { let _SC_ARG_MAX = 0 for (let i=0; i<3; i++) { let pri = process.getSystemConfig(_SC_ARG_MAX) @@ -746,11 +746,11 @@ describe('ChildProcessTest', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_003 + * @tc.name: testGetSystemConfig003 * @tc.desc: Returns the system configuration at runtime. * @tc.author: liwenqiang */ - it('SUB_Runtime_JSAPI_003', 0, function () { + it('testGetSystemConfig003', 0, function () { let _SC_ARG_MAX = 0 for (let i=0; i<5; i++) { let pri = process.getSystemConfig(_SC_ARG_MAX) @@ -762,11 +762,11 @@ describe('ChildProcessTest', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_004 + * @tc.name: testGetSystemConfig004 * @tc.desc: Returns the system configuration at runtime. * @tc.author: liwenqiang */ - it('SUB_Runtime_JSAPI_004', 0, function () { + it('testGetSystemConfig004', 0, function () { let _SC_OPEN_MAX = 4 let pri = process.getSystemConfig(_SC_OPEN_MAX) if (pri > 0) { @@ -776,11 +776,11 @@ describe('ChildProcessTest', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_005 + * @tc.name: testGetSystemConfig005 * @tc.desc: Returns the system configuration at runtime. * @tc.author: liwenqiang */ - it('SUB_Runtime_JSAPI_005', 0, function () { + it('testGetSystemConfig005', 0, function () { let _SC_PAGESIZE = 8 let pri = process.getSystemConfig(_SC_PAGESIZE) if (pri > 0) { @@ -790,11 +790,11 @@ describe('ChildProcessTest', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_001 + * @tc.name: testGetEnvironmentVar001 * @tc.desc: Returns the system value for environment variables. * @tc.author: liwenqiang */ - it('SUB_Runtime_JSAPI_001', 0, function () { + it('testGetEnvironmentVar001', 0, function () { let pri = process.getEnvironmentVar("USER") if (pri != null) { var flag = new Boolean(true) @@ -803,11 +803,11 @@ describe('ChildProcessTest', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_002 + * @tc.name: testGetEnvironmentVar002 * @tc.desc: Returns the system value for environment variables. * @tc.author: liwenqiang */ - it('SUB_Runtime_JSAPI_002', 0, function () { + it('testGetEnvironmentVar002', 0, function () { for (let i=0; i<3; i++) { let pri = process.getEnvironmentVar("PATH") if (pri != null) { @@ -833,11 +833,11 @@ describe('ChildProcessTest', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_004 + * @tc.name: testGetEnvironmentVar004 * @tc.desc: Returns the system value for environment variables. * @tc.author: liwenqiang */ - it('SUB_Runtime_JSAPI_004', 0, function () { + it('testGetEnvironmentVar004', 0, function () { for (let i=0; i<6; i++) { let pri = process.getEnvironmentVar("USER") if (pri != null) { @@ -848,11 +848,11 @@ describe('ChildProcessTest', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_005 + * @tc.name: testGetEnvironmentVar005 * @tc.desc: Returns the system value for environment variables. * @tc.author: liwenqiang */ - it('SUB_Runtime_JSAPI_005', 0, function () { + it('testGetEnvironmentVar005', 0, function () { for (let i=0; i<8; i++) { let pri = process.getEnvironmentVar("USER") if (pri != null) { @@ -863,11 +863,11 @@ describe('ChildProcessTest', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_006 + * @tc.name: testGetEnvironmentVar006 * @tc.desc: Returns the system value for environment variables. * @tc.author: liwenqiang */ - it('SUB_Runtime_JSAPI_006', 0, function () { + it('testGetEnvironmentVar006', 0, function () { for (let i=0; i<100; i++) { let pri = process.getEnvironmentVar("i123") if (pri == null) { @@ -876,4 +876,4 @@ describe('ChildProcessTest', function () { } } }) -})} +})} \ No newline at end of file diff --git a/commonlibrary/ets_utils/url_lib_standard/src/main/js/test/url.test.js b/commonlibrary/ets_utils/url_lib_standard/src/main/js/test/url.test.js index 628f7681953a9ea1cb1aa3f76d787b8751189719..2ef887abd7962fea423702fe95b1025430d8a61e 100644 --- a/commonlibrary/ets_utils/url_lib_standard/src/main/js/test/url.test.js +++ b/commonlibrary/ets_utils/url_lib_standard/src/main/js/test/url.test.js @@ -436,22 +436,22 @@ describe('UrlFunTest', function () { }) /** - * @tc.name: testUrlForEach002 + * @tc.name: testUrlGet002 * @tc.desc: Returns the first value associated to the given search parameter. * @tc.author: maxiaodong */ - it('testUrlForEach002', 0, function () { + it('testUrlGet002', 0, function () { let params = new Url.URLSearchParams("key1=value1&key2=value2") var result = params.get("key2") expect(result).assertEqual("value2") }) /** - * @tc.name: testUrlForEach003 + * @tc.name: testUrlGet003 * @tc.desc: Returns the first value associated to the given search parameter. * @tc.author: maxiaodong */ - it('testUrlForEach003', 0, function () { + it('testUrlGet003', 0, function () { let params = new Url.URLSearchParams("key1=value1&key2=value2") params.append("5","JKL") var result = params.get("5") @@ -459,22 +459,22 @@ describe('UrlFunTest', function () { }) /** - * @tc.name: testUrlForEach004 + * @tc.name: testUrlGet004 * @tc.desc: Returns the first value associated to the given search parameter. * @tc.author: maxiaodong */ - it('testUrlForEach004', 0, function () { + it('testUrlGet004', 0, function () { let params = new Url.URLSearchParams("key1=value1&key2=value2") var result = params.get("key1") expect(result).assertEqual("value1") }) /** - * @tc.name: testUrlForEach005 + * @tc.name: testUrlGet005 * @tc.desc: Returns the first value associated to the given search parameter. * @tc.author: maxiaodong */ - it('testUrlForEach005', 0, function () { + it('testUrlGet005', 0, function () { let params = new Url.URLSearchParams("key1=value1&key2=value2") params.append("jss","JL") var result = params.get("jss") @@ -893,22 +893,22 @@ describe('UrlFunTest', function () { }) /** - * @tc.name: testUrlToString001 + * @tc.name: testUrlSearchParamsToString001 * @tc.desc: Returns a query string suitable for use in a URL. * @tc.author: maxiaodong */ - it('testUrlToString001', 0, function () { + it('testUrlSearchParamsToString001', 0, function () { let params = new Url.URLSearchParams("d=value1&c=value2&b=大") var result= params.toString() expect(result).assertEqual("d=value1&c=value2&b=%E5%A4%A7") }) /** - * @tc.name: testUrlToString002 + * @tc.name: testUrlSearchParamsToString002 * @tc.desc: Returns a query string suitable for use in a URL. * @tc.author: maxiaodong */ - it('testUrlToString002', 0, function () { + it('testUrlSearchParamsToString002', 0, function () { let params = new Url.URLSearchParams("d=value1&c=value2&b= 大") params.append("1 12","QQQ") var result= params.toString() @@ -916,11 +916,11 @@ describe('UrlFunTest', function () { }) /** - * @tc.name: testUrlToString003 + * @tc.name: testUrlSearchParamsToString003 * @tc.desc: Returns a query string suitable for use in a URL. * @tc.author: maxiaodong */ - it('testUrlToString003', 0, function () { + it('testUrlSearchParamsToString003', 0, function () { let params = new Url.URLSearchParams("¥=)") params.delete("5") var result= params.toString() @@ -928,22 +928,22 @@ describe('UrlFunTest', function () { }) /** - * @tc.name: testUrlToString004 + * @tc.name: testUrlSearchParamsToString004 * @tc.desc: Returns a query string suitable for use in a URL. * @tc.author: maxiaodong */ - it('testUrlToString004', 0, function () { + it('testUrlSearchParamsToString004', 0, function () { let params = new Url.URLSearchParams("d=value1&c=value2&b=大&4=key4") var result= params.toString() expect(result).assertEqual("d=value1&c=value2&b=%E5%A4%A7&4=key4") }) /** - * @tc.name: testUrlToString005 + * @tc.name: testUrlSearchParamsToString005 * @tc.desc: Returns a query string suitable for use in a URL. * @tc.author: maxiaodong */ - it('testUrlToString005', 0, function () { + it('testUrlSearchParamsToString005', 0, function () { let params = new Url.URLSearchParams("d=value1&c=value2&b= 大&4=key4&5=key5") params.append("1 12","QQQ") var result= params.toString() @@ -2064,4 +2064,4 @@ describe('UrlFunTest', function () { var result = params.searchParams.toString(); expect(result).assertEqual('abc=123&def=456') }) -})} +})} \ No newline at end of file diff --git a/commonlibrary/ets_utils/util_lib_standard/src/main/js/test/util.test.js b/commonlibrary/ets_utils/util_lib_standard/src/main/js/test/util.test.js index c66dc8f40561e5590bff8512f5e877f11b426dfb..53d310133cf894978bbb98d8767eb85c6a9caaa1 100644 --- a/commonlibrary/ets_utils/util_lib_standard/src/main/js/test/util.test.js +++ b/commonlibrary/ets_utils/util_lib_standard/src/main/js/test/util.test.js @@ -169,12 +169,12 @@ describe('TextEncoderTest', function () { }) /** - * @tc.name: testUtilPromiseWrapper001 + * @tc.name: testUtilPromiseWrapper_new_001 * @tc.desc: Takes a function following the common error-first callback style, taking an callback as the last argument, and return a function that returns promises. * @tc.author: shikai */ - it('testUtilPromiseWrapper001', 0, async function () { + it('testUtilPromiseWrapper_new_001', 0, async function () { function aysnFun(str, callback) { if (typeof str === 'string') { callback(null, str); @@ -189,12 +189,12 @@ describe('TextEncoderTest', function () { }) /** - * @tc.name: testUtilPromiseWrapper002 + * @tc.name: testUtilPromiseWrapper_new_002 * @tc.desc: Takes a function following the common error-first callback style, taking an callback as the last argument, and return a function that returns promises. * @tc.author: shikai */ - it('testUtilPromiseWrapper002', 0, async function () { + it('testUtilPromiseWrapper_new_002', 0, async function () { function aysnFun(str, callback) { if (typeof str === 'string') { callback(null, str); @@ -209,12 +209,12 @@ describe('TextEncoderTest', function () { }) /** - * @tc.name: testUtilPromiseWrapper003 + * @tc.name: testUtilPromiseWrapper_new_003 * @tc.desc: Takes a function following the common error-first callback style, taking an callback as the last argument, and return a function that returns promises. * @tc.author: shikai */ - it('testUtilPromiseWrapper003', 0, async function () { + it('testUtilPromiseWrapper_new_003', 0, async function () { function fn(err, val, callback) { callback(err, val); } @@ -225,12 +225,12 @@ describe('TextEncoderTest', function () { }) /** - * @tc.name: testUtilPromiseWrapper004 + * @tc.name: testUtilPromiseWrapper_new_004 * @tc.desc: Takes a function following the common error-first callback style, taking an callback as the last argument, and return a function that returns promises. * @tc.author: shikai */ - it('testUtilPromiseWrapper004', 0, async function () { + it('testUtilPromiseWrapper_new_004', 0, async function () { function aysnFun(str1, str2, callback) { if (typeof str1 === 'string' && typeof str1 === 'string') { callback(null, str1 + str2); @@ -245,12 +245,12 @@ describe('TextEncoderTest', function () { }) /** - * @tc.name: testUtilPromiseWrapper005 + * @tc.name: testUtilPromiseWrapper_new_005 * @tc.desc: Takes a function following the common error-first callback style, taking an callback as the last argument, and return a function that returns promises. * @tc.author: shikai */ - it('testUtilPromiseWrapper005', 0, async function () { + it('testUtilPromiseWrapper_new_005', 0, async function () { function aysnFun(str1, str2, callback) { if (typeof str1 === 'string' && typeof str1 === 'string') { callback(null, str1 + str2); @@ -494,55 +494,55 @@ describe('TextEncoderTest', function () { }) /** - * @tc.name: testEncoding001 + * @tc.name: testencoding_textdecoder_001 * @tc.desc: The source encoding's name, lowercased. * @tc.author: wangben */ - it('testEncoding001', 0, function () { + it('testencoding_textdecoder_001', 0, function () { var that = new util.TextDecoder('utf-8', { ignoreBOM : true }) var retStr = that.encoding expect(retStr).assertEqual('utf-8') }) /** - * @tc.name: testEncoding002 + * @tc.name: testencoding_textdecoder_002 * @tc.desc: The source encoding's name, lowercased. * @tc.author: wangben */ - it('testEncoding002', 0, function () { + it('testencoding_textdecoder_002', 0, function () { var that = new util.TextDecoder('utf-16le') var encodingStr = that.encoding expect(encodingStr).assertEqual('utf-16le') }) /** - * @tc.name: testEncoding003 + * @tc.name: testencoding_textdecoder_003 * @tc.desc: The source encoding's name, lowercased. * @tc.author: wangben */ - it('testEncoding003', 0, function () { + it('testencoding_textdecoder_003', 0, function () { var that = new util.TextDecoder('utf-16be') var encodingStr = that.encoding expect(encodingStr).assertEqual('utf-16be') }) /** - * @tc.name: testEncoding004 + * @tc.name: testencoding_textdecoder_004 * @tc.desc: The source encoding's name, lowercased. * @tc.author: wangben */ - it('testEncoding004', 0, function () { + it('testencoding_textdecoder_004', 0, function () { var that = new util.TextDecoder('utf-16be', { ignoreBOM : true }) var encodingStr = that.encoding expect(encodingStr).assertEqual('utf-16be') }) /** - * @tc.name: testEncoding005 + * @tc.name: testencoding_textdecoder_005 * @tc.desc: The source encoding's name, lowercased. * @tc.author: wangben */ - it('testEncoding005', 0, function () { + it('testencoding_textdecoder_005', 0, function () { var that = new util.TextDecoder('utf-16be', { ignoreBOM : false }) var encodingStr = that.encoding expect(encodingStr).assertEqual('utf-16be') @@ -704,11 +704,11 @@ describe('TextEncoderTest', function () { }) /** - * @tc.name: testIgnoreBOM006 + * @tc.name: testIgnoreBOM007 * @tc.desc: Returns `true` if ignore BOM flag is set, and `false` otherwise. * @tc.author: wangben */ - it('testIgnoreBOM006', 0, function () { + it('testIgnoreBOM007', 0, function () { var that = new util.TextDecoder('gb18030') var ignoreBOMStr = that.ignoreBOM expect(ignoreBOMStr).assertEqual(false) @@ -726,11 +726,11 @@ describe('TextEncoderTest', function () { }) /** - * @tc.name: testDecode001 + * @tc.name: testdecode_testdecode_001 * @tc.desc: Returns the result of running encoding's decoder. * @tc.author: wangben */ - it('testDecode001', 0, function () { + it('testdecode_testdecode_001', 0, function () { var that = new util.TextDecoder('utf-8'); var arr = new Uint8Array(3); for (var i = 0; i < 3; i++) { @@ -742,11 +742,11 @@ describe('TextEncoderTest', function () { }) /** - * @tc.name: testDecode002 + * @tc.name: testdecode_testdecode_002 * @tc.desc: Returns the result of running encoding's decoder. * @tc.author: wangben */ - it('testDecode002', 0, function () { + it('testdecode_testdecode_002', 0, function () { var that = new util.TextDecoder('utf-16le') var arr = new Uint8Array(6) arr[0] = 0x61; @@ -761,11 +761,11 @@ describe('TextEncoderTest', function () { }) /** - * @tc.name: testDecode003 + * @tc.name: testdecode_testdecode_003 * @tc.desc: Returns the result of running encoding's decoder. * @tc.author: wangben */ - it('testDecode003', 0, function () { + it('testdecode_testdecode_003', 0, function () { var that = new util.TextDecoder('utf-16be'); var arr = new Uint8Array(6); arr[0] = 0x00; @@ -780,11 +780,11 @@ describe('TextEncoderTest', function () { }) /** - * @tc.name: testDecode004 + * @tc.name: testdecode_testdecode_004 * @tc.desc: Returns the result of running encoding's decoder. * @tc.author: wangben */ - it('testDecode004', 0, function () { + it('testdecode_testdecode_004', 0, function () { var that = new util.TextDecoder('utf-8', { ignoreBOM : true }) var arr = new Uint8Array(6) arr[0] = 0xEF; @@ -801,11 +801,11 @@ describe('TextEncoderTest', function () { }) /** - * @tc.name: testDecode005 + * @tc.name: testdecode_testdecode_005 * @tc.desc: Returns the result of running encoding's decoder. * @tc.author: wangben */ - it('testDecode005', 0, function () { + it('testdecode_testdecode_005', 0, function () { var that = new util.TextDecoder('utf-16le', { ignoreBOM : false }) var arr = new Uint8Array(8) arr[0] = 0xFF; @@ -824,11 +824,11 @@ describe('TextEncoderTest', function () { }) /** - * @tc.name: testDecode006 + * @tc.name: testdecode_testdecode_006 * @tc.desc: Returns the result of running encoding's decoder. * @tc.author: wangben */ - it('testDecode006', 0, function () { + it('testdecode_testdecode_006', 0, function () { var that = new util.TextDecoder('gbk') var arr = new Uint8Array(8) arr[0] = 0xC4; @@ -845,11 +845,11 @@ describe('TextEncoderTest', function () { }) /** - * @tc.name: testDecode007 + * @tc.name: testdecode_testdecode_007 * @tc.desc: Returns the result of running encoding's decoder. * @tc.author: wangben */ - it('testDecode007', 0, function () { + it('testdecode_testdecode_007', 0, function () { var that = new util.TextDecoder('gb18030') var arr = new Uint8Array(8) arr[0] = 0xC4; @@ -866,11 +866,11 @@ describe('TextEncoderTest', function () { }) /** - * @tc.name: testDecode008 + * @tc.name: testdecode_testdecode_008 * @tc.desc: Returns the result of running encoding's decoder. * @tc.author: wangben */ - it('testDecode008', 0, function () { + it('testdecode_testdecode_008', 0, function () { var that = new util.TextDecoder('gb2312') var arr = new Uint8Array(8) arr[0] = 0xC4; @@ -887,35 +887,22 @@ describe('TextEncoderTest', function () { }) /** - * @tc.name: testGetEncoding001 + * @tc.name: testencoding_textencoder_001 * @tc.desc: Encoding format. * @tc.author: wangben */ - it('testGetEncoding001', 0, function () { + it('testencoding_textencoder_001', 0, function () { var that = new util.TextEncoder() var str = that.encoding expect(str).assertEqual('utf-8') }) /** - * @tc.name: testEncode001 - * @tc.desc: Returns the result of encoder. - * @tc.author: wangben - */ - it('testEncode001', 0, function () { - var that = new util.TextEncoder() - var buffer = new ArrayBuffer(20) - var result = new Uint8Array(buffer) - result = that.encode('abc') - expect(result[0]).assertEqual(0x61) - }) - - /** - * @tc.name: testEncoding002 + * @tc.name: testencoding_textencoder_002 * @tc.desc: Encoding format test gb18030. * @tc.author: wangben */ - it('testEncoding002', 0, function () { + it('testencoding_textencoder_002', 0, function () { let that = new util.TextEncoder('gb18030') let str = that.encoding expect(str).assertEqual('gb18030') @@ -925,11 +912,11 @@ describe('TextEncoderTest', function () { }) /** - * @tc.name: testEncoding003 + * @tc.name: testencoding_textencoder_003 * @tc.desc: Encoding format test gbk. * @tc.author: wangben */ - it('testEncoding003', 0, function () { + it('testencoding_textencoder_003', 0, function () { let that = new util.TextEncoder('gbk') let str = that.encoding expect(str).assertEqual('gbk') @@ -939,11 +926,11 @@ describe('TextEncoderTest', function () { }) /** - * @tc.name: testEncoding004 + * @tc.name: testencoding_textencoder_004 * @tc.desc: Encoding format test gb2313. * @tc.author: wangben */ - it('testEncoding004', 0, function () { + it('testencoding_textencoder_004', 0, function () { let that = new util.TextEncoder('gb2312') let str = that.encoding expect(str).assertEqual('gb2312') @@ -952,6 +939,19 @@ describe('TextEncoderTest', function () { expect(str).assertEqual('GB2312') }) + /** + * @tc.name: testEncode001 + * @tc.desc: Returns the result of encoder. + * @tc.author: wangben + */ + it('testEncode001', 0, function () { + var that = new util.TextEncoder() + var buffer = new ArrayBuffer(20) + var result = new Uint8Array(buffer) + result = that.encode('abc') + expect(result[0]).assertEqual(0x61) + }) + /** * @tc.name: testEncode002 * @tc.desc: Returns the result of encoder. @@ -1287,556 +1287,556 @@ describe('TextEncoderTest', function () { describe('ScopeTest', function () { /** - * @tc.name: SUB_Runtime_JSAPI_001 + * @tc.name: test_getLower_001 * @tc.desc: Obtains the lower bound of the current range. * @tc.author: jiangkai */ - it('SUB_Runtime_JSAPI_001', 0, function () { + it('test_getLower_001', 0, function () { var result = range.getLower() expect(result.toString()).assertEqual('30') }) /** - * @tc.name: SUB_Runtime_JSAPI_002 + * @tc.name: test_getLower_002 * @tc.desc: Obtains the lower bound of the current range. * @tc.author: jiangkai */ - it('SUB_Runtime_JSAPI_002', 0, function () { + it('test_getLower_002', 0, function () { var result = rangeFir.getLower() expect(result.toString()).assertEqual('35') }) /** - * @tc.name: SUB_Runtime_JSAPI_003 + * @tc.name: test_getLower_003 * @tc.desc: Obtains the lower bound of the current range. * @tc.author: jiangkai */ - it('SUB_Runtime_JSAPI_003', 0, function () { + it('test_getLower_003', 0, function () { var result = rangeSec.getLower() expect(result.toString()).assertEqual('20') }) /** - * @tc.name: SUB_Runtime_JSAPI_004 + * @tc.name: test_getLower_004 * @tc.desc: Obtains the lower bound of the current range. * @tc.author: jiangkai */ - it('SUB_Runtime_JSAPI_004', 0, function () { + it('test_getLower_004', 0, function () { var result = rangeThi.getLower() expect(result.toString()).assertEqual('20') }) /** - * @tc.name: SUB_Runtime_JSAPI_005 + * @tc.name: test_getLower_005 * @tc.desc: Obtains the lower bound of the current range. * @tc.author: jiangkai */ - it('SUB_Runtime_JSAPI_005', 0, function () { + it('test_getLower_005', 0, function () { var result = rangeFif.getLower() expect(result.toString()).assertEqual('35') }) /** - * @tc.name: SUB_Runtime_JSAPI_001 + * @tc.name: test_getUpper_001 * @tc.desc: Obtains the upper bound of the current range. * @tc.author: jiangkai */ - it('SUB_Runtime_JSAPI_001', 0, function () { + it('test_getUpper_001', 0, function () { var result = range.getUpper() expect(result.toString()).assertEqual('40') }) /** - * @tc.name: SUB_Runtime_JSAPI_002 + * @tc.name: test_getUpper_002 * @tc.desc: Obtains the upper bound of the current range. * @tc.author: jiangkai */ - it('SUB_Runtime_JSAPI_002', 0, function () { + it('test_getUpper_002', 0, function () { var result = rangeFir.getUpper() expect(result.toString()).assertEqual('39') }) /** - * @tc.name: SUB_Runtime_JSAPI_003 + * @tc.name: test_getUpper_003 * @tc.desc: Obtains the upper bound of the current range. * @tc.author: jiangkai */ - it('SUB_Runtime_JSAPI_003', 0, function () { + it('test_getUpper_003', 0, function () { var result = rangeSec.getUpper() expect(result.toString()).assertEqual('45') }) /** - * @tc.name: SUB_Runtime_JSAPI_004 + * @tc.name: test_getUpper_004 * @tc.desc: Obtains the upper bound of the current range. * @tc.author: jiangkai */ - it('SUB_Runtime_JSAPI_004', 0, function () { + it('test_getUpper_004', 0, function () { var result = rangeThi.getUpper() expect(result.toString()).assertEqual('35') }) /** - * @tc.name: SUB_Runtime_JSAPI_005 + * @tc.name: test_getUpper_005 * @tc.desc: Obtains the upper bound of the current range. * @tc.author: jiangkai */ - it('SUB_Runtime_JSAPI_005', 0, function () { + it('test_getUpper_005', 0, function () { var result = rangeFif.getUpper() expect(result.toString()).assertEqual('45') }) /** - * @tc.name: SUB_Runtime_JSAPI_001 + * @tc.name: test_clamp_001 * @tc.desc: Clamps a given value to the current range. * @tc.author: jiangkai */ - it('SUB_Runtime_JSAPI_001', 0, function () { + it('test_clamp_001', 0, function () { var result =range.clamp(tempLess) expect(result.toString()).assertEqual('30') }) /** - * @tc.name: SUB_Runtime_JSAPI_002 + * @tc.name: test_clamp_002 * @tc.desc: Clamps a given value to the current range. * @tc.author: jiangkai */ - it('SUB_Runtime_JSAPI_002', 0, function () { + it('test_clamp_002', 0, function () { var result =range.clamp(tempMiDF) expect(result.toString()).assertEqual('35') }) /** - * @tc.name: SUB_Runtime_JSAPI_003 + * @tc.name: test_clamp_003 * @tc.desc: Clamps a given value to the current range. * @tc.author: jiangkai */ - it('SUB_Runtime_JSAPI_003', 0, function () { + it('test_clamp_003', 0, function () { var result =range.clamp(tempMore) expect(result.toString()).assertEqual('40') }) /** - * @tc.name: SUB_Runtime_JSAPI_004 + * @tc.name: test_clamp_004 * @tc.desc: Clamps a given value to the current range. * @tc.author: jiangkai */ - it('SUB_Runtime_JSAPI_004', 0, function () { + it('test_clamp_004', 0, function () { var result =range.clamp(tempLower) expect(result.toString()).assertEqual('30') }) /** - * @tc.name: SUB_Runtime_JSAPI_005 + * @tc.name: test_clamp_005 * @tc.desc: Clamps a given value to the current range. * @tc.author: jiangkai */ - it('SUB_Runtime_JSAPI_005', 0, function () { + it('test_clamp_005', 0, function () { var result =range.clamp(tempUpper) expect(result.toString()).assertEqual('40') }) /** - * @tc.name: SUB_Runtime_JSAPI_001 + * @tc.name: test_contains_001 * @tc.desc: Checks whether a given value is within the current range. * @tc.author: jiangkai */ - it('SUB_Runtime_JSAPI_001', 0, function () { + it('test_contains_001', 0, function () { var result = range.contains(tempLess) expect(result).assertEqual(false) }) /** - * @tc.name: SUB_Runtime_JSAPI_002 + * @tc.name: test_contains_002 * @tc.desc: Checks whether a given value is within the current range. * @tc.author: jiangkai */ - it('SUB_Runtime_JSAPI_002', 0, function () { + it('test_contains_002', 0, function () { var result = range.contains(tempMiDF) expect(result).assertEqual(true) }) /** - * @tc.name: SUB_Runtime_JSAPI_003 + * @tc.name: test_contains_003 * @tc.desc: Checks whether a given value is within the current range. * @tc.author: jiangkai */ - it('SUB_Runtime_JSAPI_003', 0, function () { + it('test_contains_003', 0, function () { var result = range.contains(tempMore) expect(result).assertEqual(false) }) /** - * @tc.name: SUB_Runtime_JSAPI_004 + * @tc.name: test_contains_004 * @tc.desc: Checks whether a given value is within the current range. * @tc.author: jiangkai */ - it('SUB_Runtime_JSAPI_004', 0, function () { + it('test_contains_004', 0, function () { var result = range.contains(tempLower) expect(result).assertEqual(true) }) /** - * @tc.name: SUB_Runtime_JSAPI_005 + * @tc.name: test_contains_005 * @tc.desc: Checks whether a given value is within the current range. * @tc.author: jiangkai */ - it('SUB_Runtime_JSAPI_005', 0, function () { + it('test_contains_005', 0, function () { var result = range.contains(tempUpper) expect(result).assertEqual(true) }) /** - * @tc.name: SUB_Runtime_JSAPI_006 + * @tc.name: test_contains_006 * @tc.desc: Checks whether a given range is within the current range. * @tc.author: jiangkai */ - it('SUB_Runtime_JSAPI_006', 0, function () { + it('test_contains_006', 0, function () { var result = range.contains(rangeFir) expect(result).assertEqual(true) }) /** - * @tc.name: SUB_Runtime_JSAPI_007 + * @tc.name: test_contains_007 * @tc.desc: Checks whether a given range is within the current range. * @tc.author: jiangkai */ - it('SUB_Runtime_JSAPI_007', 0, function () { + it('test_contains_007', 0, function () { var result = range.contains(rangeSec) expect(result).assertEqual(false) }) /** - * @tc.name: SUB_Runtime_JSAPI_008 + * @tc.name: test_contains_008 * @tc.desc: Checks whether a given range is within the current range. * @tc.author: jiangkai */ - it('SUB_Runtime_JSAPI_008', 0, function () { + it('test_contains_008', 0, function () { var result = range.contains(rangeThi) expect(result).assertEqual(false) }) /** - * @tc.name: SUB_Runtime_JSAPI_009 + * @tc.name: test_contains_009 * @tc.desc: Checks whether a given range is within the current range. * @tc.author: jiangkai */ - it('SUB_Runtime_JSAPI_009', 0, function () { + it('test_contains_009', 0, function () { var result = range.contains(rangeFif) expect(result).assertEqual(false) }) /** - * @tc.name: SUB_Runtime_JSAPI_010 + * @tc.name: test_contains_010 * @tc.desc: Checks whether a given range is within the current range. * @tc.author: jiangkai */ - it('SUB_Runtime_JSAPI_010', 0, function () { + it('test_contains_010', 0, function () { var result = range.contains(range) expect(result).assertEqual(true) }) /** - * @tc.name: SUB_Runtime_JSAPI_001 + * @tc.name: test_expand_001 * @tc.desc: Creates the smallest range that includes the current range and the given lower and upper bounds. * @tc.author: jiangkai */ - it('SUB_Runtime_JSAPI_001', 0, function () { + it('test_expand_001', 0, function () { var result = range.expand(tempMiDF, tempMidS) expect(result.toString()).assertEqual('[30, 40]') }) /** - * @tc.name: SUB_Runtime_JSAPI_002 + * @tc.name: test_expand_002 * @tc.desc: Creates the smallest range that includes the current range and the given lower and upper bounds. * @tc.author: jiangkai */ - it('SUB_Runtime_JSAPI_002', 0, function () { + it('test_expand_002', 0, function () { var result = range.expand(tempLess, tempMore) expect(result.toString()).assertEqual('[20, 45]') }) /** - * @tc.name: SUB_Runtime_JSAPI_003 + * @tc.name: test_expand_003 * @tc.desc: Creates the smallest range that includes the current range and the given lower and upper bounds. * @tc.author: jiangkai */ - it('SUB_Runtime_JSAPI_003', 0, function () { + it('test_expand_003', 0, function () { var result = range.expand(tempLess, tempMiDF) expect(result.toString()).assertEqual('[20, 40]') }) /** - * @tc.name: SUB_Runtime_JSAPI_004 + * @tc.name: test_expand_004 * @tc.desc: Creates the smallest range that includes the current range and the given lower and upper bounds. * @tc.author: jiangkai */ - it('SUB_Runtime_JSAPI_004', 0, function () { + it('test_expand_004', 0, function () { var result = range.expand(tempMiDF, tempMore) expect(result.toString()).assertEqual('[30, 45]') }) /** - * @tc.name: SUB_Runtime_JSAPI_005 + * @tc.name: test_expand_005 * @tc.desc: Creates the smallest range that includes the current range and the given lower and upper bounds. * @tc.author: jiangkai */ - it('SUB_Runtime_JSAPI_005', 0, function () { + it('test_expand_005', 0, function () { var result = range.expand(tempLower, tempUpper) expect(result.toString()).assertEqual('[30, 40]') }) /** - * @tc.name: SUB_Runtime_JSAPI_006 + * @tc.name: test_expand_006 * @tc.desc: Creates the smallest range that includes the current range and a given range. * @tc.author: jiangkai */ - it('SUB_Runtime_JSAPI_006', 0, function () { + it('test_expand_006', 0, function () { var result = range.expand(rangeFir) expect(result.toString()).assertEqual('[30, 40]') }) /** - * @tc.name: SUB_Runtime_JSAPI_007 + * @tc.name: test_expand_007 * @tc.desc: Creates the smallest range that includes the current range and a given range. * @tc.author: jiangkai */ - it('SUB_Runtime_JSAPI_007', 0, function () { + it('test_expand_007', 0, function () { var result = range.expand(rangeSec) expect(result.toString()).assertEqual('[20, 45]') }) /** - * @tc.name: SUB_Runtime_JSAPI_008 + * @tc.name: test_expand_008 * @tc.desc: Creates the smallest range that includes the current range and a given range. * @tc.author: jiangkai */ - it('SUB_Runtime_JSAPI_008', 0, function () { + it('test_expand_008', 0, function () { var result = range.expand(rangeThi) expect(result.toString()).assertEqual('[20, 40]') }) /** - * @tc.name: SUB_Runtime_JSAPI_009 + * @tc.name: test_expand_009 * @tc.desc: Creates the smallest range that includes the current range and a given range. * @tc.author: jiangkai */ - it('SUB_Runtime_JSAPI_009', 0, function () { + it('test_expand_009', 0, function () { var result = range.expand(rangeFif) expect(result.toString()).assertEqual('[30, 45]') }) /** - * @tc.name: SUB_Runtime_JSAPI_010 + * @tc.name: test_expand_010 * @tc.desc: Creates the smallest range that includes the current range and a given range. * @tc.author: jiangkai */ - it('SUB_Runtime_JSAPI_010', 0, function () { + it('test_expand_010', 0, function () { var result = range.expand(range) expect(result.toString()).assertEqual('[30, 40]') }) /** - * @tc.name: SUB_Runtime_JSAPI_011 + * @tc.name: test_expand_011 * @tc.desc: Creates the smallest range that includes the current range and a given value. * @tc.author: jiangkai */ - it('SUB_Runtime_JSAPI_011', 0, function () { + it('test_expand_011', 0, function () { var result = range.expand(tempMiDF) expect(result.toString()).assertEqual('[30, 40]') }) /** - * @tc.name: SUB_Runtime_JSAPI_012 + * @tc.name: test_expand_012 * @tc.desc: Creates the smallest range that includes the current range and a given value. * @tc.author: jiangkai */ - it('SUB_Runtime_JSAPI_012', 0, function () { + it('test_expand_012', 0, function () { var result = range.expand(tempLess) expect(result.toString()).assertEqual('[20, 40]') }) /** - * @tc.name: SUB_Runtime_JSAPI_013 + * @tc.name: test_expand_013 * @tc.desc: Creates the smallest range that includes the current range and a given value. * @tc.author: jiangkai */ - it('SUB_Runtime_JSAPI_013', 0, function () { + it('test_expand_013', 0, function () { var result = range.expand(tempMore) expect(result.toString()).assertEqual('[30, 45]') }) /** - * @tc.name: SUB_Runtime_JSAPI_014 + * @tc.name: test_expand_014 * @tc.desc: Creates the smallest range that includes the current range and a given value. * @tc.author: jiangkai */ - it('SUB_Runtime_JSAPI_014', 0, function () { + it('test_expand_014', 0, function () { var result = range.expand(tempLower) expect(result.toString()).assertEqual('[30, 40]') }) /** - * @tc.name: SUB_Runtime_JSAPI_015 + * @tc.name: test_expand_015 * @tc.desc: Creates the smallest range that includes the current range and a given value. * @tc.author: jiangkai */ - it('SUB_Runtime_JSAPI_015', 0, function () { + it('test_expand_015', 0, function () { var result = range.expand(tempUpper) expect(result.toString()).assertEqual('[30, 40]') }) /** - * @tc.name: SUB_Runtime_JSAPI_001 + * @tc.name: test_intersect_001 * @tc.desc: Returns the intersection of a given range and the current range. * @tc.author: jiangkai */ - it('SUB_Runtime_JSAPI_001', 0, function () { + it('test_intersect_001', 0, function () { var result = range.intersect(rangeFir) expect(result.toString()).assertEqual('[35, 39]') }) /** - * @tc.name: SUB_Runtime_JSAPI_002 + * @tc.name: test_intersect_002 * @tc.desc: Returns the intersection of a given range and the current range. * @tc.author: jiangkai */ - it('SUB_Runtime_JSAPI_002', 0, function () { + it('test_intersect_002', 0, function () { var result = range.intersect(rangeSec) expect(result.toString()).assertEqual('[30, 40]') }) /** - * @tc.name: SUB_Runtime_JSAPI_003 + * @tc.name: test_intersect_003 * @tc.desc: Returns the intersection of a given range and the current range. * @tc.author: jiangkai */ - it('SUB_Runtime_JSAPI_003', 0, function () { + it('test_intersect_003', 0, function () { var result = range.intersect(rangeThi) expect(result.toString()).assertEqual('[30, 35]') }) /** - * @tc.name: SUB_Runtime_JSAPI_004 + * @tc.name: test_intersect_004 * @tc.desc: Returns the intersection of a given range and the current range. * @tc.author: jiangkai */ - it('SUB_Runtime_JSAPI_004', 0, function () { + it('test_intersect_004', 0, function () { var result = range.intersect(rangeFif) expect(result.toString()).assertEqual('[35, 40]') }) /** - * @tc.name: SUB_Runtime_JSAPI_005 + * @tc.name: test_intersect_005 * @tc.desc: Returns the intersection of a given range and the current range. * @tc.author: jiangkai */ - it('SUB_Runtime_JSAPI_005', 0, function () { + it('test_intersect_005', 0, function () { var result = range.intersect(range) expect(result.toString()).assertEqual('[30, 40]') }) /** - * @tc.name: SUB_Runtime_JSAPI_006 + * @tc.name: test_intersect_006 * @tc.desc: Returns the intersection of the current range and the range specified by the given lower and upper bounds. * @tc.author: jiangkai */ - it('SUB_Runtime_JSAPI_006', 0, function () { + it('test_intersect_006', 0, function () { var result = range.intersect(tempMiDF, tempMidS) expect(result.toString()).assertEqual('[35, 39]') }) /** - * @tc.name: SUB_Runtime_JSAPI_007 + * @tc.name: test_intersect_007 * @tc.desc: Returns the intersection of the current range and the range specified by the given lower and upper bounds. * @tc.author: jiangkai */ - it('SUB_Runtime_JSAPI_007', 0, function () { + it('test_intersect_007', 0, function () { var result = range.intersect(tempLess, tempMore) expect(result.toString()).assertEqual('[30, 40]') }) /** - * @tc.name: SUB_Runtime_JSAPI_008 + * @tc.name: test_intersect_008 * @tc.desc: Returns the intersection of the current range and the range specified by the given lower and upper bounds. * @tc.author: jiangkai */ - it('SUB_Runtime_JSAPI_008', 0, function () { + it('test_intersect_008', 0, function () { var result = range.intersect(tempLess, tempMiDF) expect(result.toString()).assertEqual('[30, 35]') }) /** - * @tc.name: SUB_Runtime_JSAPI_009 + * @tc.name: test_intersect_009 * @tc.desc: Returns the intersection of the current range and the range specified by the given lower and upper bounds. * @tc.author: jiangkai */ - it('SUB_Runtime_JSAPI_009', 0, function () { + it('test_intersect_009', 0, function () { var result = range.intersect(tempMiDF, tempMore) expect(result.toString()).assertEqual('[35, 40]') }) /** - * @tc.name: SUB_Runtime_JSAPI_010 + * @tc.name: test_intersect_010 * @tc.desc: Returns the intersection of the current range and the range specified by the given lower and upper bounds. * @tc.author: jiangkai */ - it('SUB_Runtime_JSAPI_010', 0, function () { + it('test_intersect_010', 0, function () { var result = range.intersect(tempLower, tempUpper) expect(result.toString()).assertEqual('[30, 40]') }) /** - * @tc.name: SUB_Runtime_JSAPI_001 + * @tc.name: test_toString_001 * @tc.desc: Obtains a string representation of the current range. * @tc.author: jiangkai */ - it('SUB_Runtime_JSAPI_001', 0, function () { + it('test_toString_001', 0, function () { var result = range.toString() expect(result.toString()).assertEqual('[30, 40]') }) /** - * @tc.name: SUB_Runtime_JSAPI_002 + * @tc.name: test_toString_002 * @tc.desc: Obtains a string representation of the current range. * @tc.author: jiangkai */ - it('SUB_Runtime_JSAPI_002', 0, function () { + it('test_toString_002', 0, function () { var result = rangeFir.toString() expect(result.toString()).assertEqual('[35, 39]') }) /** - * @tc.name: SUB_Runtime_JSAPI_003 + * @tc.name: test_toString_003 * @tc.desc: Obtains a string representation of the current range. * @tc.author: jiangkai */ - it('SUB_Runtime_JSAPI_003', 0, function () { + it('test_toString_003', 0, function () { var result = rangeSec.toString() expect(result.toString()).assertEqual('[20, 45]') }) /** - * @tc.name: SUB_Runtime_JSAPI_004 + * @tc.name: test_toString_004 * @tc.desc: Obtains a string representation of the current range. * @tc.author: jiangkai */ - it('SUB_Runtime_JSAPI_004', 0, function () { + it('test_toString_004', 0, function () { var result = rangeThi.toString() expect(result.toString()).assertEqual('[20, 35]') }) /** - * @tc.name: SUB_Runtime_JSAPI_005 + * @tc.name: test_toString_005 * @tc.desc: Obtains a string representation of the current range. * @tc.author: jiangkai */ - it('SUB_Runtime_JSAPI_005', 0, function () { + it('test_toString_005', 0, function () { var result = rangeFif.toString() expect(result.toString()).assertEqual('[35, 45]') }) @@ -1845,12 +1845,12 @@ describe('ScopeTest', function () { describe('Base64Test', function () { /** - * @tc.name: SUB_Runtime_JSAPI_001 + * @tc.name: test_encodeSync_base64_001 * @tc.desc: Encodes all bytes from the specified u8 array into a newly-allocated u8 array using the Base64 encoding scheme. * @tc.author: bihu */ - it('SUB_Runtime_JSAPI_001', 0, function () { + it('test_encodeSync_base64_001', 0, function () { var that = new util.Base64() var array = new Uint8Array([115,49,51]); var rarray = new Uint8Array([99,122,69,122]); @@ -1861,12 +1861,12 @@ describe('Base64Test', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_002 + * @tc.name: test_encodeSync_base64_002 * @tc.desc: Encodes all bytes from the specified u8 array into a newly-allocated u8 array using the Base64 encoding scheme. * @tc.author: bihu */ - it('SUB_Runtime_JSAPI_002', 0, function () { + it('test_encodeSync_base64_002', 0, function () { var that = new util.Base64() var array = new Uint8Array([66, 97, 115, 101, 54, 52, 32, 78, 111, 100, 101, 46, 106, 115]); var rarray = new Uint8Array([81,109,70,122,90,84,89,48,73,69,53,118,90,71,85,117,97,110,77,61]); @@ -1877,12 +1877,12 @@ describe('Base64Test', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_003 + * @tc.name: test_encodeSync_base64_003 * @tc.desc: Encodes all bytes from the specified u8 array into a newly-allocated u8 array using the Base64 encoding scheme. * @tc.author: bihu */ - it('SUB_Runtime_JSAPI_003', 0, function () { + it('test_encodeSync_base64_003', 0, function () { var that = new util.Base64() var array = new Uint8Array([66,97,115,101,54,52,32,69,110,99,111,100,105,110,103,32,105, 110,32,78,111,100,101,46,106,115]); @@ -1895,12 +1895,12 @@ describe('Base64Test', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_004 + * @tc.name: test_encodeSync_base64_004 * @tc.desc: Encodes all bytes from the specified u8 array into a newly-allocated u8 array using the Base64 encoding scheme. * @tc.author: bihu */ - it('SUB_Runtime_JSAPI_004', 0, function () { + it('test_encodeSync_base64_004', 0, function () { var that = new util.Base64() var array = new Uint8Array([168, 174, 155, 255]); var rarray = new Uint8Array([113,75,54,98,47,119,61,61]); @@ -1911,12 +1911,12 @@ describe('Base64Test', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_005 + * @tc.name: test_encodeSync_base64_005 * @tc.desc: Encodes all bytes from the specified u8 array into a newly-allocated u8 array using the Base64 encoding scheme. * @tc.author: bihu */ - it('SUB_Runtime_JSAPI_005', 0, function () { + it('test_encodeSync_base64_005', 0, function () { var that = new util.Base64() var array = new Uint8Array([66, 97, 115, 101, 54, 52]); var rarray = new Uint8Array([81, 109, 70, 122, 90, 84, 89, 48]); @@ -1927,11 +1927,11 @@ describe('Base64Test', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_001 + * @tc.name: test_encodeToStringSync_base64_001 * @tc.desc: Encodes the specified byte array into a String using the Base64 encoding scheme. * @tc.author: bihu */ - it('SUB_Runtime_JSAPI_001', 0, function () { + it('test_encodeToStringSync_base64_001', 0, function () { var that = new util.Base64() var array = new Uint8Array([115,49,51]); var result = that.encodeToStringSync(array) @@ -1939,11 +1939,11 @@ describe('Base64Test', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_002 + * @tc.name: test_encodeToStringSync_base64_002 * @tc.desc: Encodes the specified byte array into a String using the Base64 encoding scheme. * @tc.author: bihu */ - it('SUB_Runtime_JSAPI_002', 0, function () { + it('test_encodeToStringSync_base64_002', 0, function () { var that = new util.Base64() var array = new Uint8Array([66, 97, 115, 101, 54, 52, 32, 78, 111, 100, 101, 46, 106, 115]); var result = that.encodeToStringSync(array); @@ -1951,11 +1951,11 @@ describe('Base64Test', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_003 + * @tc.name: test_encodeToStringSync_base64_003 * @tc.desc: Encodes the specified byte array into a String using the Base64 encoding scheme. * @tc.author: bihu */ - it('SUB_Runtime_JSAPI_003', 0, function () { + it('test_encodeToStringSync_base64_003', 0, function () { var that = new util.Base64() var array = new Uint8Array([66,97,115,101,54,52,32,69,110,99,111,100,105,110,103,32,105,110, 32,78,111,100,101,46,106,115]); @@ -1964,11 +1964,11 @@ describe('Base64Test', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_004 + * @tc.name: test_encodeToStringSync_base64_004 * @tc.desc: Encodes the specified byte array into a String using the Base64 encoding scheme. * @tc.author: bihu */ - it('SUB_Runtime_JSAPI_004', 0, function () { + it('test_encodeToStringSync_base64_004', 0, function () { var that = new util.Base64() var array = new Uint8Array([168, 174, 155, 255]); var result = that.encodeToStringSync(array); @@ -1976,11 +1976,11 @@ describe('Base64Test', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_005 + * @tc.name: test_encodeToStringSync_base64_005 * @tc.desc: Encodes the specified byte array into a String using the Base64 encoding scheme. * @tc.author: bihu */ - it('SUB_Runtime_JSAPI_005', 0, function () { + it('test_encodeToStringSync_base64_005', 0, function () { var that = new util.Base64() var array = new Uint8Array([66, 97, 115, 101, 54, 52]); var result = that.encodeToStringSync(array); @@ -1988,12 +1988,12 @@ describe('Base64Test', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_001 + * @tc.name: test_decodeSync_base64_001 * @tc.desc: Decodes a Base64 encoded String or input u8 array into a newly-allocated u8 array using the Base64 encoding scheme. * @tc.author: bihu */ - it('SUB_Runtime_JSAPI_001', 0, function () { + it('test_decodeSync_base64_001', 0, function () { var that = new util.Base64() var buff = 'czEz'; var rarray = new Uint8Array([115,49,51]); @@ -2004,12 +2004,12 @@ describe('Base64Test', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_002 + * @tc.name: test_decodeSync_base64_002 * @tc.desc: Decodes a Base64 encoded String or input u8 array into a newly-allocated u8 array using the Base64 encoding scheme. * @tc.author: bihu */ - it('SUB_Runtime_JSAPI_002', 0, function () { + it('test_decodeSync_base64_002', 0, function () { var that = new util.Base64() var buff = 'QmFzZTY0IE5vZGUuanM='; var rarray = new Uint8Array([66, 97, 115, 101, 54, 52, 32, 78, 111, 100, 101, 46, 106, 115]); @@ -2020,12 +2020,12 @@ describe('Base64Test', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_003 + * @tc.name: test_decodeSync_base64_003 * @tc.desc: Decodes a Base64 encoded String or input u8 array into a newly-allocated u8 array using the Base64 encoding scheme. * @tc.author: bihu */ - it('SUB_Runtime_JSAPI_003', 0, function () { + it('test_decodeSync_base64_003', 0, function () { var that = new util.Base64() var buff = 'QmFzZTY0IEVuY29kaW5nIGluIE5vZGUuanM='; var rarray = new Uint8Array([66,97,115,101,54,52,32,69,110,99,111,100,105,110,103,32, @@ -2037,12 +2037,12 @@ describe('Base64Test', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_004 + * @tc.name: test_decodeSync_base64_004 * @tc.desc: Decodes a Base64 encoded String or input u8 array into a newly-allocated u8 array using the Base64 encoding scheme. * @tc.author: bihu */ - it('SUB_Runtime_JSAPI_004', 0, function () { + it('test_decodeSync_base64_004', 0, function () { var that = new util.Base64() var buff = 'qK6b/w=='; var rarray = new Uint8Array([168, 174, 155, 255]); @@ -2053,12 +2053,12 @@ describe('Base64Test', function () { }) /** - * @tc.name: testDecodeSync005 + * @tc.name: test_decodeSync_base64_005 * @tc.desc: Decodes a Base64 encoded String or input u8 array into a newly-allocated u8 array using the Base64 encoding scheme. * @tc.author: bihu */ - it('testDecodeSync005', 0, function () { + it('test_decodeSync_base64_005', 0, function () { var that = new util.Base64() var buff = 'QmFzZTY0'; var rarray = new Uint8Array([66, 97, 115, 101, 54, 52]); @@ -2069,12 +2069,12 @@ describe('Base64Test', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_001 + * @tc.name: test_decodeSync_base64_006 * @tc.desc: Decodes a Base64 encoded String or input u8 array into a newly-allocated u8 array using the Base64 encoding scheme. * @tc.author: bihu */ - it('SUB_Runtime_JSAPI_001', 0, function () { + it('test_decodeSync_base64_006', 0, function () { var that = new util.Base64() var array = new Uint8Array([99,122,69,122]); var rarray = new Uint8Array([115,49,51]); @@ -2085,12 +2085,12 @@ describe('Base64Test', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_002 + * @tc.name: test_decodeSync_base64_007 * @tc.desc: Decodes a Base64 encoded String or input u8 array into a newly-allocated u8 array using the Base64 encoding scheme. * @tc.author: bihu */ - it('SUB_Runtime_JSAPI_002', 0, function () { + it('test_decodeSync_base64_007', 0, function () { var that = new util.Base64() var array = new Uint8Array([81,109,70,122,90,84,89,48,73,69,53,118,90,71,85,117,97,110,77,61]); var rarray = new Uint8Array([66, 97, 115, 101, 54, 52, 32, 78, 111, 100, 101, 46, 106, 115]); @@ -2101,12 +2101,12 @@ describe('Base64Test', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_003 + * @tc.name: test_decodeSync_base64_008 * @tc.desc: Decodes a Base64 encoded String or input u8 array into a newly-allocated u8 array using the Base64 encoding scheme. * @tc.author: bihu */ - it('SUB_Runtime_JSAPI_003', 0, function () { + it('test_decodeSync_base64_008', 0, function () { var that = new util.Base64() var array = new Uint8Array([81,109,70,122,90,84,89,48,73,69,86,117,89,50,57,107,97,87, 53,110,73,71,108,117,73,69,53,118,90,71,85,117,97,110,77,61]); @@ -2119,12 +2119,12 @@ describe('Base64Test', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_004 + * @tc.name: test_decodeSync_base64_009 * @tc.desc: Decodes a Base64 encoded String or input u8 array into a newly-allocated u8 array using the Base64 encoding scheme. * @tc.author: bihu */ - it('SUB_Runtime_JSAPI_004', 0, function () { + it('test_decodeSync_base64_009', 0, function () { var that = new util.Base64() var array = new Uint8Array([113,75,54,98,47,119,61,61]); var rarray = new Uint8Array([168, 174, 155, 255]); @@ -2135,12 +2135,12 @@ describe('Base64Test', function () { }) /** - * @tc.name: testDecodeSync005 + * @tc.name: test_decodeSync_base64_010 * @tc.desc: Decodes a Base64 encoded String or input u8 array into a newly-allocated u8 array using the Base64 encoding scheme. * @tc.author: bihu */ - it('testDecodeSync005', 0, function () { + it('test_decodeSync_base64_010', 0, function () { var that = new util.Base64() var array = new Uint8Array([81, 109, 70, 122, 90, 84, 89, 48]); var rarray = new Uint8Array([66, 97, 115, 101, 54, 52]); @@ -2152,12 +2152,12 @@ describe('Base64Test', function () { //base64 EncodeAsync test /** - * @tc.name: SUB_Runtime_JSAPI_001 + * @tc.name: test_encodeSync_base64_001 * @tc.desc: Asynchronously encodes all bytes in the specified u8 array into the newly allocated u8 array using the Base64 encoding scheme. * @tc.author: bihu */ - it('SUB_Runtime_JSAPI_001', 0, async function () { + it('test_encodeSync_base64_001', 0, async function () { var that = await new util.Base64(); var array = new Uint8Array([115,49,51]); var rarray = new Uint8Array([99,122,69,122]); @@ -2169,12 +2169,12 @@ describe('Base64Test', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_002 + * @tc.name: test_encodeSync_base64_002 * @tc.desc: Asynchronously encodes all bytes in the specified u8 array into the newly allocated u8 array using the Base64 encoding scheme. * @tc.author: bihu */ - it('SUB_Runtime_JSAPI_002', 0, async function () { + it('test_encodeSync_base64_002', 0, async function () { var that = new util.Base64() var array = new Uint8Array([66, 97, 115, 101, 54, 52, 32, 78, 111, 100, 101, 46, 106, 115]); var rarray = new Uint8Array([81,109,70,122,90,84,89,48,73,69,53,118,90,71,85,117,97,110,77,61]); @@ -2186,12 +2186,12 @@ describe('Base64Test', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_003 + * @tc.name: test_encodeSync_base64_003 * @tc.desc: Asynchronously encodes all bytes in the specified u8 array into the newly allocated u8 array using the Base64 encoding scheme. * @tc.author: bihu */ - it('SUB_Runtime_JSAPI_003', 0, async function () { + it('test_encodeSync_base64_003', 0, async function () { var that = new util.Base64() var array = new Uint8Array([66,97,115,101,54,52,32,69,110,99,111,100,105,110,103,32,105,110,32, 78,111,100,101,46,106,115]); @@ -2205,12 +2205,12 @@ describe('Base64Test', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_004 + * @tc.name: test_encodeSync_base64_004 * @tc.desc: Asynchronously encodes all bytes in the specified u8 array into the newly allocated u8 array using the Base64 encoding scheme. * @tc.author: bihu */ - it('SUB_Runtime_JSAPI_004', 0, async function () { + it('test_encodeSync_base64_004', 0, async function () { var that = new util.Base64() var array = new Uint8Array([168, 174, 155, 255]); var rarray = new Uint8Array([113,75,54,98,47,119,61,61]); @@ -2222,12 +2222,12 @@ describe('Base64Test', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_005 + * @tc.name: test_encodeSync_base64_005 * @tc.desc: Asynchronously encodes all bytes in the specified u8 array into the newly allocated u8 array using the Base64 encoding scheme. * @tc.author: bihu */ - it('SUB_Runtime_JSAPI_005', 0, async function () { + it('test_encodeSync_base64_005', 0, async function () { var that = new util.Base64() var array = new Uint8Array([66, 97, 115, 101, 54, 52]); var rarray = new Uint8Array([81, 109, 70, 122, 90, 84, 89, 48]); @@ -2239,11 +2239,11 @@ describe('Base64Test', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_001 + * @tc.name: test_encodeToString_base64_001 * @tc.desc: Asynchronously encodes the specified byte array into a String using the Base64 encoding scheme. * @tc.author: bihu */ - it('SUB_Runtime_JSAPI_001', 0, async function () { + it('test_encodeToString_base64_001', 0, async function () { var that = new util.Base64() var array = new Uint8Array([115,49,51]); that.encodeToString(array).then(val=>{ @@ -2252,11 +2252,11 @@ describe('Base64Test', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_002 + * @tc.name: test_encodeToString_base64_002 * @tc.desc: Asynchronously encodes the specified byte array into a String using the Base64 encoding scheme. * @tc.author: bihu */ - it('SUB_Runtime_JSAPI_002', 0, async function () { + it('test_encodeToString_base64_002', 0, async function () { var that = new util.Base64() var array = new Uint8Array([66, 97, 115, 101, 54, 52, 32, 78, 111, 100, 101, 46, 106, 115]); that.encodeToString(array).then(val=>{ @@ -2265,11 +2265,11 @@ describe('Base64Test', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_003 + * @tc.name: test_encodeToString_base64_003 * @tc.desc: Asynchronously encodes the specified byte array into a String using the Base64 encoding scheme. * @tc.author: bihu */ - it('SUB_Runtime_JSAPI_003', 0, async function () { + it('test_encodeToString_base64_003', 0, async function () { var that = new util.Base64() var array = new Uint8Array([81,109,70,122,90,84,89,48,73,69,86,117,89,50,57,107,97,87,53,110,73,71,108, 117,73,69,53,118,90,71,85,117,97,110,77,61]); @@ -2279,11 +2279,11 @@ describe('Base64Test', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_004 + * @tc.name: test_encodeToString_base64_004 * @tc.desc: Asynchronously encodes the specified byte array into a String using the Base64 encoding scheme. * @tc.author: bihu */ - it('SUB_Runtime_JSAPI_004', 0, async function () { + it('test_encodeToString_base64_004', 0, async function () { var that = new util.Base64() var array = new Uint8Array([168, 174, 155, 255]); that.encodeToString(array).then(val=>{ @@ -2292,11 +2292,11 @@ describe('Base64Test', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_005 + * @tc.name: test_encodeToString_base64_005 * @tc.desc: Asynchronously encodes the specified byte array into a String using the Base64 encoding scheme. * @tc.author: bihu */ - it('SUB_Runtime_JSAPI_005', 0, async function () { + it('test_encodeToString_base64_005', 0, async function () { var that = new util.Base64() var array = new Uint8Array([66, 97, 115, 101, 54, 52]); that.encodeToString(array).then(val=>{ @@ -2305,12 +2305,12 @@ describe('Base64Test', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_001 + * @tc.name: test_decode_base64_001 * @tc.desc: Use the Base64 encoding scheme to asynchronously decode a Base64-encoded string or input u8 array into a newly allocated u8 array. * @tc.author: bihu */ - it('SUB_Runtime_JSAPI_001', 0, async function () { + it('test_decode_base64_001', 0, async function () { var that = new util.Base64() var buff = 'czEz'; var array = new Uint8Array([115,49,51]); @@ -2322,12 +2322,12 @@ describe('Base64Test', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_002 + * @tc.name: test_decode_base64_002 * @tc.desc: Use the Base64 encoding scheme to asynchronously decode a Base64-encoded string or input u8 array into a newly allocated u8 array. * @tc.author: bihu */ - it('SUB_Runtime_JSAPI_002', 0, async function () { + it('test_decode_base64_002', 0, async function () { var that = new util.Base64() var buff = 'QmFzZTY0IE5vZGUuanM='; var array = new Uint8Array([66, 97, 115, 101, 54, 52, 32, 78, 111, 100, 101, 46, 106, 115]); @@ -2339,12 +2339,12 @@ describe('Base64Test', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_003 + * @tc.name: test_decode_base64_003 * @tc.desc: Use the Base64 encoding scheme to asynchronously decode a Base64-encoded string or input u8 array into a newly allocated u8 array. * @tc.author: bihu */ - it('SUB_Runtime_JSAPI_003', 0, async function () { + it('test_decode_base64_003', 0, async function () { var that = new util.Base64() var buff = 'QmFzZTY0IEVuY29kaW5nIGluIE5vZGUuanM='; var array = new Uint8Array([66,97,115,101,54,52,32,69,110,99,111,100,105,110,103,32,105,110,32,78, @@ -2357,12 +2357,12 @@ describe('Base64Test', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_004 + * @tc.name: test_decode_base64_004 * @tc.desc: Use the Base64 encoding scheme to asynchronously decode a Base64-encoded string or input u8 array into a newly allocated u8 array. * @tc.author: bihu */ - it('SUB_Runtime_JSAPI_004', 0, async function () { + it('test_decode_base64_004', 0, async function () { var that = new util.Base64() var buff = 'qK6b/w=='; var array = new Uint8Array([168, 174, 155, 255]); @@ -2374,12 +2374,12 @@ describe('Base64Test', function () { }) /** - * @tc.name: testDecode005 + * @tc.name: test_decode_base64_005 * @tc.desc: Use the Base64 encoding scheme to asynchronously decode a Base64-encoded string or input u8 array into a newly allocated u8 array. * @tc.author: bihu */ - it('testDecode005', 0, async function () { + it('test_decode_base64_005', 0, async function () { var that = new util.Base64() var buff = 'QmFzZTY0'; var rarray = new Uint8Array([66, 97, 115, 101, 54, 52]); @@ -2391,12 +2391,12 @@ describe('Base64Test', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_001 + * @tc.name: test_decode_base64_006 * @tc.desc: Use the Base64 encoding scheme to asynchronously decode a Base64-encoded string or input u8 array into a newly allocated u8 array. * @tc.author: bihu */ - it('SUB_Runtime_JSAPI_001', 0, async function () { + it('test_decode_base64_006', 0, async function () { var that = new util.Base64() var array = new Uint8Array([99,122,69,122]); var rarray = new Uint8Array([115,49,51]); @@ -2408,12 +2408,12 @@ describe('Base64Test', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_002 + * @tc.name: test_decode_base64_007 * @tc.desc: Use the Base64 encoding scheme to asynchronously decode a Base64-encoded string or input u8 array into a newly allocated u8 array. * @tc.author: bihu */ - it('SUB_Runtime_JSAPI_002', 0, async function () { + it('test_decode_base64_007', 0, async function () { var that = new util.Base64() var array = new Uint8Array([81,109,70,122,90,84,89,48,73,69,53,118,90,71,85,117,97,110,77,61]); var rarray = new Uint8Array([66, 97, 115, 101, 54, 52, 32, 78, 111, 100, 101, 46, 106, 115]); @@ -2425,12 +2425,12 @@ describe('Base64Test', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_003 + * @tc.name: test_decode_base64_008 * @tc.desc: Use the Base64 encoding scheme to asynchronously decode a Base64-encoded string or input u8 array into a newly allocated u8 array. * @tc.author: bihu */ - it('SUB_Runtime_JSAPI_003', 0, async function () { + it('test_decode_base64_008', 0, async function () { var that = new util.Base64() var array = new Uint8Array([81,109,70,122,90,84,89,48,73,69,86,117,89,50,57,107,97,87,53,110,73,71,108, 117,73,69,53,118,90,71,85,117,97,110,77,61]); @@ -2444,12 +2444,12 @@ describe('Base64Test', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_004 + * @tc.name: test_decode_base64_009 * @tc.desc: Use the Base64 encoding scheme to asynchronously decode a Base64-encoded string or input u8 array into a newly allocated u8 array. * @tc.author: bihu */ - it('SUB_Runtime_JSAPI_004', 0, async function () { + it('test_decode_base64_009', 0, async function () { var that = new util.Base64() var array = new Uint8Array([113,75,54,98,47,119,61,61]); var rarray = new Uint8Array([168, 174, 155, 255]); @@ -2461,12 +2461,12 @@ describe('Base64Test', function () { }) /** - * @tc.name: testDecode005 + * @tc.name: test_decode_base64_010 * @tc.desc: Use the Base64 encoding scheme to asynchronously decode a Base64-encoded string or input u8 array into a newly allocated u8 array. * @tc.author: bihu */ - it('testDecode005', 0, async function () { + it('test_decode_base64_010', 0, async function () { var that = new util.Base64() var array = new Uint8Array([81, 109, 70, 122, 90, 84, 89, 48]); var rarray = new Uint8Array([66, 97, 115, 101, 54, 52]); @@ -2481,11 +2481,11 @@ describe('Base64Test', function () { describe('RationalNumberFunTest', function () { /** - * @tc.name: SUB_Runtime_JSAPI_001 + * @tc.name: test_createRationalFromString_001 * @tc.desc: Creates a RationalNumber object based on a given string. * @tc.author: liuqiang */ - it('SUB_Runtime_JSAPI_001', 0, function () { + it('test_createRationalFromString_001', 0, function () { var pro = new util.RationalNumber(1, 2) var res = pro.createRationalFromString('-1:2') var result1 = res.valueOf() @@ -2493,11 +2493,11 @@ describe('RationalNumberFunTest', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_002 + * @tc.name: test_createRationalFromString_002 * @tc.desc: Creates a RationalNumber object based on a given string. * @tc.author: liuqiang */ - it('SUB_Runtime_JSAPI_002', 0, function () { + it('test_createRationalFromString_002', 0, function () { var pro = new util.RationalNumber(1, 2) var res = pro.createRationalFromString('+3/4') var result1 = res.valueOf() @@ -2505,11 +2505,11 @@ describe('RationalNumberFunTest', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_003 + * @tc.name: test_createRationalFromString_003 * @tc.desc: Creates a RationalNumber object based on a given string. * @tc.author: liuqiang */ - it('SUB_Runtime_JSAPI_003', 0, function () { + it('test_createRationalFromString_003', 0, function () { var pro = new util.RationalNumber(1, 2) var res = pro.createRationalFromString('+3:-4') var result1 = res.valueOf() @@ -2517,11 +2517,11 @@ describe('RationalNumberFunTest', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_004 + * @tc.name: test_createRationalFromString_004 * @tc.desc: Creates a RationalNumber object based on a given string. * @tc.author: liuqiang */ - it('SUB_Runtime_JSAPI_004', 0, function () { + it('test_createRationalFromString_004', 0, function () { var pro = new util.RationalNumber(1, 2) var res = pro.createRationalFromString('+2:4') var result1 = res.valueOf() @@ -2529,11 +2529,11 @@ describe('RationalNumberFunTest', function () { }) /** - * @tc.name: testRationalNumberCreateRationalFromString005 + * @tc.name: test_createRationalFromString_005 * @tc.desc: Creates a RationalNumber object based on a given string. * @tc.author: liuqiang */ - it('testRationalNumberCreateRationalFromString005', 0, function () { + it('test_createRationalFromString_005', 0, function () { var pro = new util.RationalNumber(1, 2) var res = pro.createRationalFromString('+2:-4') var result1 = res.valueOf() @@ -2541,11 +2541,11 @@ describe('RationalNumberFunTest', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_001 + * @tc.name: test_compareTo_001 * @tc.desc: Compares the current RationalNumber object with a given object. * @tc.author: liuqiang */ - it('SUB_Runtime_JSAPI_001', 0, function () { + it('test_compareTo_001', 0, function () { var pro = new util.RationalNumber(2, 1) var proc = new util.RationalNumber(3, 4) var res = pro.compareTo(proc) @@ -2553,11 +2553,11 @@ describe('RationalNumberFunTest', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_002 + * @tc.name: test_compareTo_002 * @tc.desc: Compares the current RationalNumber object with a given object. * @tc.author: liuqiang */ - it('SUB_Runtime_JSAPI_002', 0, function () { + it('test_compareTo_002', 0, function () { var pro = new util.RationalNumber(2, 1) var proc = new util.RationalNumber(0, 0) var res = pro.compareTo(proc) @@ -2565,11 +2565,11 @@ describe('RationalNumberFunTest', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_003 + * @tc.name: test_compareTo_003 * @tc.desc: Compares the current RationalNumber object with a given object. * @tc.author: liuqiang */ - it('SUB_Runtime_JSAPI_003', 0, function () { + it('test_compareTo_003', 0, function () { var pro = new util.RationalNumber(2, 1) var proc = new util.RationalNumber(8, 3) var res = pro.compareTo(proc) @@ -2577,11 +2577,11 @@ describe('RationalNumberFunTest', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_004 + * @tc.name: test_compareTo_004 * @tc.desc: Compares the current RationalNumber object with a given object. * @tc.author: liuqiang */ - it('SUB_Runtime_JSAPI_004', 0, function () { + it('test_compareTo_004', 0, function () { var pro = new util.RationalNumber(2, 1) var proc = new util.RationalNumber(2, 1) var res = pro.compareTo(proc) @@ -2589,11 +2589,11 @@ describe('RationalNumberFunTest', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_005 + * @tc.name: test_compareTo_005 * @tc.desc: Compares the current RationalNumber object with a given object. * @tc.author: liuqiang */ - it('SUB_Runtime_JSAPI_005', 0, function () { + it('test_compareTo_005', 0, function () { var pro = new util.RationalNumber(0, 0) var proc = new util.RationalNumber(2, 1) var res = pro.compareTo(proc) @@ -2601,11 +2601,11 @@ describe('RationalNumberFunTest', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_001 + * @tc.name: test_equals_001 * @tc.desc: Checks whether a given object is the same as the current RationalNumber object. * @tc.author: liuqiang */ - it('SUB_Runtime_JSAPI_001', 0, function () { + it('test_equals_001', 0, function () { var pro = new util.RationalNumber(2, 1) var proc = new util.RationalNumber(3, 4) var res = pro.equals(proc) @@ -2613,11 +2613,11 @@ describe('RationalNumberFunTest', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_002 + * @tc.name: test_equals_002 * @tc.desc: Checks whether a given object is the same as the current RationalNumber object. * @tc.author: liuqiang */ - it('SUB_Runtime_JSAPI_002', 0, function () { + it('test_equals_002', 0, function () { var pro = new util.RationalNumber(2, 1) var proc = new util.RationalNumber(4, 2) var res = pro.equals(proc) @@ -2625,11 +2625,11 @@ describe('RationalNumberFunTest', function () { }) /** - * @tc.name: testRationalNumberEquals003 + * @tc.name: test_equals_003 * @tc.desc: Checks whether a given object is the same as the current RationalNumber object. * @tc.author: liuqiang */ - it('testRationalNumberEquals003', 0, function () { + it('test_equals_003', 0, function () { var pro = new util.RationalNumber(0, 1) var proc = new util.RationalNumber(0, 2) var res = pro.equals(proc) @@ -2637,11 +2637,11 @@ describe('RationalNumberFunTest', function () { }) /** - * @tc.name: testRationalNumberEquals004 + * @tc.name: test_equals_004 * @tc.desc: Checks whether a given object is the same as the current RationalNumber object. * @tc.author: liuqiang */ - it('testRationalNumberEquals004', 0, function () { + it('test_equals_004', 0, function () { var pro = new util.RationalNumber(0, 0) var proc = new util.RationalNumber(0, 2) var res = pro.equals(proc) @@ -2649,11 +2649,11 @@ describe('RationalNumberFunTest', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_004 + * @tc.name: test_equals_005 * @tc.desc: Checks whether a given object is the same as the current RationalNumber object. * @tc.author: liuqiang */ - it('SUB_Runtime_JSAPI_004', 0, function () { + it('test_equals_005', 0, function () { var pro = new util.RationalNumber(-2, 0) var proc = new util.RationalNumber(2, 0) var res = pro.equals(proc) @@ -2672,11 +2672,11 @@ describe('RationalNumberFunTest', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_002 + * @tc.name: testRationalNumberValueOf002 * @tc.desc: Obtains the value of the current RationalNumber object as a number. * @tc.author: liuqiang */ - it('SUB_Runtime_JSAPI_002', 0, function () { + it('testRationalNumberValueOf002', 0, function () { var pro = new util.RationalNumber(2, 10) var res = pro.valueOf() expect(res).assertEqual(0.2) @@ -2694,11 +2694,11 @@ describe('RationalNumberFunTest', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_004 + * @tc.name: testRationalNumberValueOf004 * @tc.desc: Obtains the value of the current RationalNumber object as a number. * @tc.author: liuqiang */ - it('SUB_Runtime_JSAPI_004', 0, function () { + it('testRationalNumberValueOf004', 0, function () { var pro = new util.RationalNumber(4, 2) var res = pro.valueOf() expect(res).assertEqual(2) @@ -2716,341 +2716,341 @@ describe('RationalNumberFunTest', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_001 + * @tc.name: testGetCommonDivisor001 * @tc.desc: Obtains the greatest common divisor of two specified numbers. * @tc.author: liuqiang */ - it('SUB_Runtime_JSAPI_001', 0, function () { + it('testGetCommonDivisor001', 0, function () { var pro = new util.RationalNumber(0, 0) var res = pro.getCommonDivisor(4, 8) expect(res).assertEqual(4) }) /** - * @tc.name: SUB_Runtime_JSAPI_002 + * @tc.name: testGetCommonDivisor002 * @tc.desc: Obtains the greatest common divisor of two specified numbers. * @tc.author: liuqiang */ - it('SUB_Runtime_JSAPI_002', 0, function () { + it('testGetCommonDivisor002', 0, function () { var pro = new util.RationalNumber(0, 0) var res = pro.getCommonDivisor(10, 15) expect(res).assertEqual(5) }) /** - * @tc.name: testRationalNumberGetCommonDivisor003 + * @tc.name: testGetCommonDivisor003 * @tc.desc: Obtains the greatest common divisor of two specified numbers. * @tc.author: liuqiang */ - it('testRationalNumberGetCommonDivisor003', 0, function () { + it('testGetCommonDivisor003', 0, function () { var pro = new util.RationalNumber(0, 0) var res = pro.getCommonDivisor(8, 4) expect(res).assertEqual(4) }) /** - * @tc.name: SUB_Runtime_JSAPI_004 + * @tc.name: testGetCommonDivisor004 * @tc.desc: Obtains the greatest common divisor of two specified numbers. * @tc.author: liuqiang */ - it('SUB_Runtime_JSAPI_004', 0, function () { + it('testGetCommonDivisor004', 0, function () { var pro = new util.RationalNumber(0, 0) var res = pro.getCommonDivisor(8, 16) expect(res).assertEqual(8) }) /** - * @tc.name: testRationalNumberGetCommonDivisor005 + * @tc.name: testGetCommonDivisor005 * @tc.desc: Obtains the greatest common divisor of two specified numbers. * @tc.author: liuqiang */ - it('testRationalNumberGetCommonDivisor005', 0, function () { + it('testGetCommonDivisor005', 0, function () { var pro = new util.RationalNumber(0, 0) var res = pro.getCommonDivisor(2, 16) expect(res).assertEqual(2) }) /** - * @tc.name: SUB_Runtime_JSAPI_001 + * @tc.name: testGetDenominator001 * @tc.desc: Obtains the denominator of the current RationalNumber object. * @tc.author: liuqiang */ - it('SUB_Runtime_JSAPI_001', 0, function () { + it('testGetDenominator001', 0, function () { var pro = new util.RationalNumber(2, 1) var res = pro.getDenominator() expect(res).assertEqual(1) }) /** - * @tc.name: testRationalNumberGetDenominator002 + * @tc.name: testGetDenominator002 * @tc.desc: Obtains the denominator of the current RationalNumber object. * @tc.author: liuqiang */ - it('testRationalNumberGetDenominator002', 0, function () { + it('testGetDenominator002', 0, function () { var pro = new util.RationalNumber(2, 3) var res = pro.getDenominator() expect(res).assertEqual(3) }) /** - * @tc.name: SUB_Runtime_JSAPI_003 + * @tc.name: testGetDenominator003 * @tc.desc: Obtains the denominator of the current RationalNumber object. * @tc.author: liuqiang */ - it('SUB_Runtime_JSAPI_003', 0, function () { + it('testGetDenominator003', 0, function () { var pro = new util.RationalNumber(2, 0) var res = pro.getDenominator() expect(res).assertEqual(0) }) /** - * @tc.name: testRationalNumberGetDenominator004 + * @tc.name: testGetDenominator004 * @tc.desc: Obtains the denominator of the current RationalNumber object. * @tc.author: liuqiang */ - it('testRationalNumberGetDenominator004', 0, function () { + it('testGetDenominator004', 0, function () { var pro = new util.RationalNumber(10, 5) var res = pro.getDenominator() expect(res).assertEqual(1) }) /** - * @tc.name: testRationalNumberGetDenominator005 + * @tc.name: testGetDenominator005 * @tc.desc: Obtains the denominator of the current RationalNumber object. * @tc.author: liuqiang */ - it('testRationalNumberGetDenominator005', 0, function () { + it('testGetDenominator005', 0, function () { var pro = new util.RationalNumber(6, 3) var res = pro.getDenominator() expect(res).assertEqual(1) }) /** - * @tc.name: SUB_Runtime_JSAPI_006 + * @tc.name: testGetDenominator006 * @tc.desc: Obtains the denominator of the current RationalNumber object. * @tc.author: liuqiang */ - it('SUB_Runtime_JSAPI_006', 0, function () { + it('testGetDenominator006', 0, function () { var pro = new util.RationalNumber(6, -3) var res = pro.getDenominator() expect(res).assertEqual(1) }) /** - * @tc.name: SUB_Runtime_JSAPI_001 + * @tc.name: testGetNumerator001 * @tc.desc: Obtains the numerator of the current RationalNumber object. * @tc.author: liuqiang */ - it('SUB_Runtime_JSAPI_001', 0, function () { + it('testGetNumerator001', 0, function () { var pro = new util.RationalNumber(-2, 1) var res = pro.getNumerator() expect(res).assertEqual(-2) }) /** - * @tc.name: SUB_Runtime_JSAPI_002 + * @tc.name: testGetNumerator002 * @tc.desc: Obtains the numerator of the current RationalNumber object. * @tc.author: liuqiang */ - it('SUB_Runtime_JSAPI_002', 0, function () { + it('testGetNumerator002', 0, function () { var pro = new util.RationalNumber(0, 3) var res = pro.getNumerator() expect(res).assertEqual(0) }) /** - * @tc.name: SUB_Runtime_JSAPI_003 + * @tc.name: testGetNumerator003 * @tc.desc: Obtains the numerator of the current RationalNumber object. * @tc.author: liuqiang */ - it('SUB_Runtime_JSAPI_003', 0, function () { + it('testGetNumerator003', 0, function () { var pro = new util.RationalNumber(2, 4) var res = pro.getNumerator() expect(res).assertEqual(1) }) /** - * @tc.name: testRationalNumberGetNumerator004 + * @tc.name: testGetNumerator004 * @tc.desc: Obtains the numerator of the current RationalNumber object. * @tc.author: liuqiang */ - it('testRationalNumberGetNumerator004', 0, function () { + it('testGetNumerator004', 0, function () { var pro = new util.RationalNumber(3, 6) var res = pro.getNumerator() expect(res).assertEqual(1) }) /** - * @tc.name: testRationalNumberGetNumerator005 + * @tc.name: testGetNumerator005 * @tc.desc: Obtains the numerator of the current RationalNumber object. * @tc.author: liuqiang */ - it('testRationalNumberGetNumerator005', 0, function () { + it('testGetNumerator005', 0, function () { var pro = new util.RationalNumber(10, 5) var res = pro.getNumerator() expect(res).assertEqual(2) }) /** - * @tc.name: SUB_Runtime_JSAPI_001 + * @tc.name: testisFinite001 * @tc.desc: Checks whether the current RationalNumber object represents a finite value. * @tc.author: liuqiang */ - it('SUB_Runtime_JSAPI_001', 0, function () { + it('testisFinite001', 0, function () { var pro = new util.RationalNumber(-2, 1) var res = pro.isFinite() expect(res).assertEqual(true) }) /** - * @tc.name: testRationalNumberIsFinite002 + * @tc.name: testisFinite002 * @tc.desc: Checks whether the current RationalNumber object represents a finite value. * @tc.author: liuqiang */ - it('testRationalNumberIsFinite002', 0, function () { + it('testisFinite002', 0, function () { var pro = new util.RationalNumber(0, 3) var res = pro.isFinite() expect(res).assertEqual(true) }) /** - * @tc.name: SUB_Runtime_JSAPI_003 + * @tc.name: testisFinite003 * @tc.desc: Checks whether the current RationalNumber object represents a finite value. * @tc.author: liuqiang */ - it('SUB_Runtime_JSAPI_003', 0, function () { + it('testisFinite003', 0, function () { var pro = new util.RationalNumber(2, 0) var res = pro.isFinite() expect(res).assertEqual(false) }) /** - * @tc.name: SUB_Runtime_JSAPI_004 + * @tc.name: testisFinite004 * @tc.desc: Checks whether the current RationalNumber object represents a finite value. * @tc.author: liuqiang */ - it('SUB_Runtime_JSAPI_004', 0, function () { + it('testisFinite004', 0, function () { var pro = new util.RationalNumber(1, 3) var res = pro.isFinite() expect(res).assertEqual(true) }) /** - * @tc.name: testRationalNumberIsFinite005 + * @tc.name: testisFinite005 * @tc.desc: Checks whether the current RationalNumber object represents a finite value. * @tc.author: liuqiang */ - it('testRationalNumberIsFinite005', 0, function () { + it('testisFinite005', 0, function () { var pro = new util.RationalNumber(10, 5) var res = pro.isFinite() expect(res).assertEqual(true) }) /** - * @tc.name: SUB_Runtime_JSAPI_001 + * @tc.name: testisNaN001 * @tc.desc: Checks whether the current RationalNumber object represents a finite value. * @tc.author: liuqiang */ - it('SUB_Runtime_JSAPI_001', 0, function () { + it('testisNaN001', 0, function () { var pro = new util.RationalNumber(-2, 1) var res = pro.isNaN() expect(res).assertEqual(false) }) /** - * @tc.name: SUB_Runtime_JSAPI_002 + * @tc.name: testisNaN002 * @tc.desc: Checks whether the current RationalNumber object represents a Not-a-Number (NaN) value. * @tc.author: liuqiang */ - it('SUB_Runtime_JSAPI_002', 0, function () { + it('testisNaN002', 0, function () { var pro = new util.RationalNumber(0, 3) var res = pro.isNaN() expect(res).assertEqual(false) }) /** - * @tc.name: SUB_Runtime_JSAPI_003 + * @tc.name: testisNaN003 * @tc.desc: Checks whether the current RationalNumber object represents a Not-a-Number (NaN) value. * @tc.author: liuqiang */ - it('SUB_Runtime_JSAPI_003', 0, function () { + it('testisNaN003', 0, function () { var pro = new util.RationalNumber(0, 0) var res = pro.isNaN() expect(res).assertEqual(true) }) /** - * @tc.name: SUB_Runtime_JSAPI_004 + * @tc.name: testisNaN004 * @tc.desc: Checks whether the current RationalNumber object represents a Not-a-Number (NaN) value. * @tc.author: liuqiang */ - it('SUB_Runtime_JSAPI_004', 0, function () { + it('testisNaN004', 0, function () { var pro = new util.RationalNumber(10, 0) var res = pro.isNaN() expect(res).assertEqual(false) }) /** - * @tc.name: testRationalNumberIsNaN005 + * @tc.name: testisNaN005 * @tc.desc: Checks whether the current RationalNumber object represents a Not-a-Number (NaN) value. * @tc.author: liuqiang */ - it('testRationalNumberIsNaN005', 0, function () { + it('testisNaN005', 0, function () { var pro = new util.RationalNumber(10, 1) var res = pro.isNaN() expect(res).assertEqual(false) }) /** - * @tc.name: SUB_Runtime_JSAPI_001 + * @tc.name: testisZero001 * @tc.desc: Checks whether the current RationalNumber object represents the value 0. * @tc.author: liuqiang */ - it('SUB_Runtime_JSAPI_001', 0, function () { + it('testisZero001', 0, function () { var pro = new util.RationalNumber(-2, 1) var res = pro.isZero() expect(res).assertEqual(false) }) /** - * @tc.name: SUB_Runtime_JSAPI_002 + * @tc.name: testisZero002 * @tc.desc: Checks whether the current RationalNumber object represents the value 0. * @tc.author: liuqiang */ - it('SUB_Runtime_JSAPI_002', 0, function () { + it('testisZero002', 0, function () { var pro = new util.RationalNumber(0, 3) var res = pro.isZero() expect(res).assertEqual(true) }) /** - * @tc.name: SUB_Runtime_JSAPI_003 + * @tc.name: testisZero003 * @tc.desc: Checks whether the current RationalNumber object represents the value 0. * @tc.author: liuqiang */ - it('SUB_Runtime_JSAPI_003', 0, function () { + it('testisZero003', 0, function () { var pro = new util.RationalNumber(0, 0) var res = pro.isZero() expect(res).assertEqual(false) }) /** - * @tc.name: SUB_Runtime_JSAPI_004 + * @tc.name: testisZero004 * @tc.desc: Checks whether the current RationalNumber object represents the value 0. * @tc.author: liuqiang */ - it('SUB_Runtime_JSAPI_004', 0, function () { + it('testisZero004', 0, function () { var pro = new util.RationalNumber(10, 2) var res = pro.isZero() expect(res).assertEqual(false) }) /** - * @tc.name: testRationalNumberIsZero005 + * @tc.name: testisZero005 * @tc.desc: Checks whether the current RationalNumber object represents the value 0. * @tc.author: liuqiang */ - it('testRationalNumberIsZero005', 0, function () { + it('testisZero005', 0, function () { var pro = new util.RationalNumber(1, 1) var res = pro.isZero() expect(res).assertEqual(false) @@ -3068,44 +3068,44 @@ describe('RationalNumberFunTest', function () { }) /** - * @tc.name: SUB_Runtime_JSAPI_002 + * @tc.name: testRationalNumberToString002 * @tc.desc: Obtains a string representation of the current RationalNumber object. * @tc.author: liuqiang */ - it('SUB_Runtime_JSAPI_002', 0, function () { + it('testRationalNumberToString002', 0, function () { var pro = new util.RationalNumber(0, 0) var res = pro.toString() expect(res).assertEqual("NaN") }) /** - * @tc.name: SUB_Runtime_JSAPI_003 + * @tc.name: testRationalNumberToString003 * @tc.desc: Obtains a string representation of the current RationalNumber object. * @tc.author: liuqiang */ - it('SUB_Runtime_JSAPI_003', 0, function () { + it('testRationalNumberToString003', 0, function () { var pro = new util.RationalNumber(3, 0) var res = pro.toString() expect(res).assertEqual("Infinity") }) /** - * @tc.name: SUB_Runtime_JSAPI_004 + * @tc.name: testRationalNumberToString004 * @tc.desc: Obtains a string representation of the current RationalNumber object. * @tc.author: liuqiang */ - it('SUB_Runtime_JSAPI_004', 0, function () { + it('testRationalNumberToString004', 0, function () { var pro = new util.RationalNumber(-3, 0) var res = pro.toString() expect(res).assertEqual("-Infinity") }) /** - * @tc.name: SUB_Runtime_JSAPI_005 + * @tc.name: testRationalNumberToString005 * @tc.desc: Obtains a string representation of the current RationalNumber object. * @tc.author: liuqiang */ - it('SUB_Runtime_JSAPI_005', 0, function () { + it('testRationalNumberToString005', 0, function () { var pro = new util.RationalNumber(2, 3) var res = pro.toString() expect(res).assertEqual('2/3')