未验证 提交 cd878eae 编写于 作者: O openharmony_ci 提交者: Gitee

!2564 修改 xts_acts 用例名称 master

Merge pull request !2564 from xllify/master
...@@ -1775,12 +1775,12 @@ describe('ChildProcessTest', function () { ...@@ -1775,12 +1775,12 @@ describe('ChildProcessTest', function () {
}) })
/** /**
* @tc.name: testTid001 * @tc.name: SUB_Runtime_JSAPI_SR000GGR3G-001
* @tc.desc: Returns the tid of the current thread. * @tc.desc: Returns the tid of the current thread.
* @tc.require: AR000GFB04 * @tc.require: AR000GFB04
* @tc.author: liwenqiang * @tc.author: liwenqiang
*/ */
it('testTid001', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR3G-001', 0, function () {
var pres = process.tid var pres = process.tid
if(pres > 0) if(pres > 0)
{ {
...@@ -1790,12 +1790,12 @@ describe('ChildProcessTest', function () { ...@@ -1790,12 +1790,12 @@ describe('ChildProcessTest', function () {
}) })
/** /**
* @tc.name: testTid002 * @tc.name: SUB_Runtime_JSAPI_SR000GGR3G-002
* @tc.desc: Returns the tid of the current thread. * @tc.desc: Returns the tid of the current thread.
* @tc.require: AR000GFB04 * @tc.require: AR000GFB04
* @tc.author: liwenqiang * @tc.author: liwenqiang
*/ */
it('testTid002', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR3G-002', 0, function () {
for(var i=0; i < 5; i++) for(var i=0; i < 5; i++)
{ {
var pres = process.tid var pres = process.tid
...@@ -1808,12 +1808,12 @@ describe('ChildProcessTest', function () { ...@@ -1808,12 +1808,12 @@ describe('ChildProcessTest', function () {
}) })
/** /**
* @tc.name: testTid003 * @tc.name: SUB_Runtime_JSAPI_SR000GGR3G-003
* @tc.desc: Returns the tid of the current thread. * @tc.desc: Returns the tid of the current thread.
* @tc.require: AR000GFB04 * @tc.require: AR000GFB04
* @tc.author: liwenqiang * @tc.author: liwenqiang
*/ */
it('testTid003', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR3G-003', 0, function () {
for(var i=0; i < 3; i++) for(var i=0; i < 3; i++)
{ {
var pres = process.tid var pres = process.tid
...@@ -1827,23 +1827,23 @@ describe('ChildProcessTest', function () { ...@@ -1827,23 +1827,23 @@ describe('ChildProcessTest', function () {
/** /**
* @tc.name: testIsisolatedProcess001 * @tc.name: SUB_Runtime_JSAPI_SR000GGR3G-004
* @tc.desc: Returns a boolean whether the process is isolated. * @tc.desc: Returns a boolean whether the process is isolated.
* @tc.require: AR000GFB04 * @tc.require: AR000GFB04
* @tc.author: liwenqiang * @tc.author: liwenqiang
*/ */
it('testIsisolatedProcess001', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR3G-004', 0, function () {
var pres = process.isIsolatedProcess() var pres = process.isIsolatedProcess()
expect(pres).assertEqual(true) expect(pres).assertEqual(true)
}) })
/** /**
* @tc.name: testIsisolatedProcess002 * @tc.name: SUB_Runtime_JSAPI_SR000GGR3G-005
* @tc.desc: Returns a boolean whether the process is isolated. * @tc.desc: Returns a boolean whether the process is isolated.
* @tc.require: AR000GFB04 * @tc.require: AR000GFB04
* @tc.author: liwenqiang * @tc.author: liwenqiang
*/ */
it('testIsisolatedProcess002', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR3G-005', 0, function () {
for(var i=0; i < 3; i++) for(var i=0; i < 3; i++)
{ {
var pres =process.isIsolatedProcess() var pres =process.isIsolatedProcess()
...@@ -1852,12 +1852,12 @@ describe('ChildProcessTest', function () { ...@@ -1852,12 +1852,12 @@ describe('ChildProcessTest', function () {
}) })
/** /**
* @tc.name: testIsisolatedProcess003 * @tc.name: SUB_Runtime_JSAPI_SR000GGR3G-006
* @tc.desc: Returns a boolean whether the process is isolated. * @tc.desc: Returns a boolean whether the process is isolated.
* @tc.require: AR000GFB04 * @tc.require: AR000GFB04
* @tc.author: liwenqiang * @tc.author: liwenqiang
*/ */
it('testIsisolatedProcess003', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR3G-006', 0, function () {
for(var i=0; i < 5; i++) for(var i=0; i < 5; i++)
{ {
var pres =process.isIsolatedProcess() var pres =process.isIsolatedProcess()
...@@ -1867,23 +1867,23 @@ describe('ChildProcessTest', function () { ...@@ -1867,23 +1867,23 @@ describe('ChildProcessTest', function () {
/** /**
* @tc.name: testIsappuid001 * @tc.name: SUB_Runtime_JSAPI_SR000GGR3G-007
* @tc.desc: Returns a boolean whether the specified uid belongs to a particular application. * @tc.desc: Returns a boolean whether the specified uid belongs to a particular application.
* @tc.require: AR000GFB04 * @tc.require: AR000GFB04
* @tc.author: liwenqiang * @tc.author: liwenqiang
*/ */
it('testIsappuid001', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR3G-007', 0, function () {
var isorno = process.isAppUid(167) var isorno = process.isAppUid(167)
expect(isorno).assertEqual(false) expect(isorno).assertEqual(false)
}) })
/** /**
* @tc.name: testIsappuid002 * @tc.name: SUB_Runtime_JSAPI_SR000GGR3G-008
* @tc.desc: Returns a boolean whether the specified uid belongs to a particular application. * @tc.desc: Returns a boolean whether the specified uid belongs to a particular application.
* @tc.require: AR000GFB04 * @tc.require: AR000GFB04
* @tc.author: liwenqiang * @tc.author: liwenqiang
*/ */
it('testIsappuid002', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR3G-008', 0, function () {
var isorno = process.isAppUid(123) var isorno = process.isAppUid(123)
expect(isorno).assertEqual(false) expect(isorno).assertEqual(false)
}) })
...@@ -1922,23 +1922,23 @@ describe('ChildProcessTest', function () { ...@@ -1922,23 +1922,23 @@ describe('ChildProcessTest', function () {
}) })
/** /**
* @tc.name: testIs64Bit001 * @tc.name: SUB_Runtime_JSAPI_SR000GGR3G-009
* @tc.desc: Returns a boolean whether the process is running in a 64-bit environment. * @tc.desc: Returns a boolean whether the process is running in a 64-bit environment.
* @tc.require: AR000GFB04 * @tc.require: AR000GFB04
* @tc.author: liwenqiang * @tc.author: liwenqiang
*/ */
it('testIs64Bit001', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR3G-009', 0, function () {
var isorno = process.is64Bit() var isorno = process.is64Bit()
expect(isorno).assertEqual(false) expect(isorno).assertEqual(false)
}) })
/** /**
* @tc.name: testIs64Bit002 * @tc.name: SUB_Runtime_JSAPI_SR000GGR3G-010
* @tc.desc: Returns a boolean whether the process is running in a 64-bit environment. * @tc.desc: Returns a boolean whether the process is running in a 64-bit environment.
* @tc.require: AR000GFB04 * @tc.require: AR000GFB04
* @tc.author: liwenqiang * @tc.author: liwenqiang
*/ */
it('testIs64Bit002', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR3G-010', 0, function () {
for(var i=0; i<3; i++) for(var i=0; i<3; i++)
{ {
var isorno = process.is64Bit() var isorno = process.is64Bit()
...@@ -1947,12 +1947,12 @@ describe('ChildProcessTest', function () { ...@@ -1947,12 +1947,12 @@ describe('ChildProcessTest', function () {
}) })
/** /**
* @tc.name: testIs64Bit003 * @tc.name: SUB_Runtime_JSAPI_SR000GGR3G-011
* @tc.desc: Returns a boolean whether the process is running in a 64-bit environment. * @tc.desc: Returns a boolean whether the process is running in a 64-bit environment.
* @tc.require: AR000GFB04 * @tc.require: AR000GFB04
* @tc.author: liwenqiang * @tc.author: liwenqiang
*/ */
it('testIs64Bit003', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR3G-011', 0, function () {
for(var i=0; i<5; i++) for(var i=0; i<5; i++)
{ {
var isorno = process.is64Bit() var isorno = process.is64Bit()
...@@ -1962,12 +1962,12 @@ describe('ChildProcessTest', function () { ...@@ -1962,12 +1962,12 @@ describe('ChildProcessTest', function () {
/** /**
* @tc.name: testGetuidforname001 * @tc.name: SUB_Runtime_JSAPI_SR000GGR3G-012
* @tc.desc: Returns the uid based on the specified user name. * @tc.desc: Returns the uid based on the specified user name.
* @tc.require: AR000GFB04 * @tc.require: AR000GFB04
* @tc.author: liwenqiang * @tc.author: liwenqiang
*/ */
it('testGetuidforname001',0, function () { it('SUB_Runtime_JSAPI_SR000GGR3G-012',0, function () {
var pres = process.getUidForName("root") var pres = process.getUidForName("root")
if(pres != -1) if(pres != -1)
{ {
...@@ -1977,12 +1977,12 @@ describe('ChildProcessTest', function () { ...@@ -1977,12 +1977,12 @@ describe('ChildProcessTest', function () {
}) })
/** /**
* @tc.name: testGetuidforname002 * @tc.name: SUB_Runtime_JSAPI_SR000GGR3G-013
* @tc.desc: Returns the uid based on the specified user name. * @tc.desc: Returns the uid based on the specified user name.
* @tc.require: AR000GFB04 * @tc.require: AR000GFB04
* @tc.author: liwenqiang * @tc.author: liwenqiang
*/ */
it('testGetuidforname002', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR3G-013', 0, function () {
for(var i=0; i<3; i++) for(var i=0; i<3; i++)
{ {
var pres = process.getUidForName("12356") var pres = process.getUidForName("12356")
...@@ -1991,12 +1991,12 @@ describe('ChildProcessTest', function () { ...@@ -1991,12 +1991,12 @@ describe('ChildProcessTest', function () {
}) })
/** /**
* @tc.name: testGetuidforname003 * @tc.name: SUB_Runtime_JSAPI_SR000GGR3G-014
* @tc.desc: Returns the uid based on the specified user name. * @tc.desc: Returns the uid based on the specified user name.
* @tc.require: AR000GFB04 * @tc.require: AR000GFB04
* @tc.author: liwenqiang * @tc.author: liwenqiang
*/ */
it('testGetuidforname003', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR3G-014', 0, function () {
for(var i=0; i<5; i++) for(var i=0; i<5; i++)
{ {
var pres = process.getUidForName("12356") var pres = process.getUidForName("12356")
...@@ -2006,12 +2006,12 @@ describe('ChildProcessTest', function () { ...@@ -2006,12 +2006,12 @@ describe('ChildProcessTest', function () {
/** /**
* @tc.name: testGetthreadpriority001 * @tc.name: SUB_Runtime_JSAPI_SR000GGR3G-015
* @tc.desc: Returns the thread priority based on the specified tid. * @tc.desc: Returns the thread priority based on the specified tid.
* @tc.require: AR000GFB04 * @tc.require: AR000GFB04
* @tc.author: liwenqiang * @tc.author: liwenqiang
*/ */
it('testGetthreadpriority001', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR3G-015', 0, function () {
var pres = process.tid var pres = process.tid
var pri = process.getThreadPriority(pres) var pri = process.getThreadPriority(pres)
if(pri) if(pri)
...@@ -2022,12 +2022,12 @@ describe('ChildProcessTest', function () { ...@@ -2022,12 +2022,12 @@ describe('ChildProcessTest', function () {
}) })
/** /**
* @tc.name: testGetthreadpriority002 * @tc.name: SUB_Runtime_JSAPI_SR000GGR3G-016
* @tc.desc: Returns the thread priority based on the specified tid. * @tc.desc: Returns the thread priority based on the specified tid.
* @tc.require: AR000GFB04 * @tc.require: AR000GFB04
* @tc.author: liwenqiang * @tc.author: liwenqiang
*/ */
it('testGetthreadpriority002', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR3G-016', 0, function () {
var pres = process.tid var pres = process.tid
for(var i=0; i<3; i++) for(var i=0; i<3; i++)
{ {
...@@ -2041,12 +2041,12 @@ describe('ChildProcessTest', function () { ...@@ -2041,12 +2041,12 @@ describe('ChildProcessTest', function () {
}) })
/** /**
* @tc.name: testGetthreadpriority003 * @tc.name: SUB_Runtime_JSAPI_SR000GGR3G-017
* @tc.desc: Returns the thread priority based on the specified tid. * @tc.desc: Returns the thread priority based on the specified tid.
* @tc.require: AR000GFB04 * @tc.require: AR000GFB04
* @tc.author: liwenqiang * @tc.author: liwenqiang
*/ */
it('testGetthreadpriority003', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR3G-017', 0, function () {
var pres = process.tid var pres = process.tid
for(var i=0; i<5; i++) for(var i=0; i<5; i++)
{ {
...@@ -2060,13 +2060,13 @@ describe('ChildProcessTest', function () { ...@@ -2060,13 +2060,13 @@ describe('ChildProcessTest', function () {
}) })
/** /**
* @tc.name: testGetstartrealtime001 * @tc.name: SUB_Runtime_JSAPI_SR000GGR3G-019
* @tc.desc: Returns the elapsed real time (in milliseconds) taken from the start of * @tc.desc: Returns the elapsed real time (in milliseconds) taken from the start of
the system to the start of the process. * @the system to the start of the process.
* @tc.require: AR000GFB04 * @tc.require: AR000GFB04
* @tc.author: liwenqiang * @tc.author: liwenqiang
*/ */
it('testGetstartrealtime001', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR3G-019', 0, function () {
for(var i=0; i<3; i++) for(var i=0; i<3; i++)
{ {
var pri = process.getStartRealtime() var pri = process.getStartRealtime()
...@@ -2079,13 +2079,13 @@ describe('ChildProcessTest', function () { ...@@ -2079,13 +2079,13 @@ describe('ChildProcessTest', function () {
}) })
/** /**
* @tc.name: testGetstartrealtime002 * @tc.name: SUB_Runtime_JSAPI_SR000GGR3G-018
* @tc.desc: Returns the elapsed real time (in milliseconds) taken from the start of * @tc.desc: Returns the elapsed real time (in milliseconds) taken from the start of
the system to the start of the process. * @the system to the start of the process.
* @tc.require: AR000GFB04 * @tc.require: AR000GFB04
* @tc.author: liwenqiang * @tc.author: liwenqiang
*/ */
it('testGetstartrealtime002', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR3G-018', 0, function () {
var pri = process.getStartRealtime() var pri = process.getStartRealtime()
if(pri !== null) if(pri !== null)
{ {
...@@ -2095,13 +2095,13 @@ describe('ChildProcessTest', function () { ...@@ -2095,13 +2095,13 @@ describe('ChildProcessTest', function () {
}) })
/** /**
* @tc.name: testGetstartrealtime003 * @tc.name: SUB_Runtime_JSAPI_SR000GGR3G-020
* @tc.desc: Returns the elapsed real time (in milliseconds) taken from the start of * @tc.desc: Returns the elapsed real time (in milliseconds) taken from the start of
the system to the start of the process. * @the system to the start of the process.
* @tc.require: AR000GFB04 * @tc.require: AR000GFB04
* @tc.author: liwenqiang * @tc.author: liwenqiang
*/ */
it('testGetstartrealtime003', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR3G-020', 0, function () {
for(var i=0; i<5; i++) for(var i=0; i<5; i++)
{ {
var pri = process.getStartRealtime() var pri = process.getStartRealtime()
...@@ -2113,10 +2113,23 @@ describe('ChildProcessTest', function () { ...@@ -2113,10 +2113,23 @@ describe('ChildProcessTest', function () {
} }
}) })
/**
* @tc.name: SUB_Runtime_JSAPI_SR000GGR3G-021
* @tc.desc: Returns the elapsed real time (in milliseconds)
* @taken from the start of the system to the start of the process.
* @tc.require: AR000GFB04
* @tc.author: liwenqiang
*/
it('SUB_Runtime_JSAPI_SR000GGR3G-021', 0, function () {
var priOne = process.getStartRealtime()
var priTwo = process.getStartRealtime()
expect(priOne - priTwo).assertEqual(0)
})
/** /**
* @tc.name: testGetstartrealtime004 * @tc.name: testGetstartrealtime004
* @tc.desc: Returns the elapsed real time (in milliseconds) taken from the start of * @tc.desc: Returns the elapsed real time (in milliseconds) taken from the start of
the system to the start of the process. * @the system to the start of the process.
* @tc.require: AR000GFB04 * @tc.require: AR000GFB04
* @tc.author: liwenqiang * @tc.author: liwenqiang
*/ */
...@@ -2151,12 +2164,12 @@ describe('ChildProcessTest', function () { ...@@ -2151,12 +2164,12 @@ describe('ChildProcessTest', function () {
}) })
/** /**
* @tc.name: testGetpastCpuTime002 * @tc.name: SUB_Runtime_JSAPI_SR000GGR3G-022
* @tc.desc: Returns the cpu time (in milliseconds) from the time when the process starts to the current time. * @tc.desc: Returns the cpu time (in milliseconds) from the time when the process starts to the current time.
* @tc.require: AR000GFB04 * @tc.require: AR000GFB04
* @tc.author: liwenqiang * @tc.author: liwenqiang
*/ */
it('testGetpastCpuTime002', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR3G-022', 0, function () {
var pri = process.getPastCpuTime() var pri = process.getPastCpuTime()
if(pri > 0) if(pri > 0)
{ {
...@@ -2166,12 +2179,12 @@ describe('ChildProcessTest', function () { ...@@ -2166,12 +2179,12 @@ describe('ChildProcessTest', function () {
}) })
/** /**
* @tc.name: testGetpastCpuTime003 * @tc.name: SUB_Runtime_JSAPI_SR000GGR3G-023
* @tc.desc: Returns the cpu time (in milliseconds) from the time when the process starts to the current time. * @tc.desc: Returns the cpu time (in milliseconds) from the time when the process starts to the current time.
* @tc.require: AR000GFB04 * @tc.require: AR000GFB04
* @tc.author: liwenqiang * @tc.author: liwenqiang
*/ */
it('testGetpastCpuTime003', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR3G-023', 0, function () {
for(var i=0; i<5; i++) for(var i=0; i<5; i++)
{ {
var pri = process.getPastCpuTime() var pri = process.getPastCpuTime()
...@@ -2184,12 +2197,12 @@ describe('ChildProcessTest', function () { ...@@ -2184,12 +2197,12 @@ describe('ChildProcessTest', function () {
}) })
/** /**
* @tc.name: testGetpastCpuTime004 * @tc.name: SUB_Runtime_JSAPI_SR000GGR3G-024
* @tc.desc: Returns the cpu time (in milliseconds) from the time when the process starts to the current time. * @tc.desc: Returns the cpu time (in milliseconds) from the time when the process starts to the current time.
* @tc.require: AR000GFB04 * @tc.require: AR000GFB04
* @tc.author: liwenqiang * @tc.author: liwenqiang
*/ */
it('testGetpastCpuTime004', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR3G-024', 0, function () {
for(var i=0; i<8; i++) for(var i=0; i<8; i++)
{ {
var pri = process.getPastCpuTime() var pri = process.getPastCpuTime()
...@@ -2202,12 +2215,12 @@ describe('ChildProcessTest', function () { ...@@ -2202,12 +2215,12 @@ describe('ChildProcessTest', function () {
}) })
/** /**
* @tc.name: testGetSystemConfig001 * @tc.name: SUB_Runtime_JSAPI_SR000GGR3G-025
* @tc.desc: Returns the system configuration at runtime. * @tc.desc: Returns the system configuration at runtime.
* @tc.require: AR000GFB04 * @tc.require: AR000GFB04
* @tc.author: liwenqiang * @tc.author: liwenqiang
*/ */
it('testGetSystemConfig001', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR3G-025', 0, function () {
var _SC_ARG_MAX = 0 var _SC_ARG_MAX = 0
var pri = process.getSystemConfig(_SC_ARG_MAX) var pri = process.getSystemConfig(_SC_ARG_MAX)
if(pri > 0) if(pri > 0)
...@@ -2218,12 +2231,12 @@ describe('ChildProcessTest', function () { ...@@ -2218,12 +2231,12 @@ describe('ChildProcessTest', function () {
}) })
/** /**
* @tc.name: testGetSystemConfig002 * @tc.name: SUB_Runtime_JSAPI_SR000GGR3G-026
* @tc.desc: Returns the system configuration at runtime. * @tc.desc: Returns the system configuration at runtime.
* @tc.require: AR000GFB04 * @tc.require: AR000GFB04
* @tc.author: liwenqiang * @tc.author: liwenqiang
*/ */
it('testGetSystemConfig002', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR3G-026', 0, function () {
var _SC_ARG_MAX = 0 var _SC_ARG_MAX = 0
for(var i=0; i<3; i++) for(var i=0; i<3; i++)
{ {
...@@ -2237,12 +2250,12 @@ describe('ChildProcessTest', function () { ...@@ -2237,12 +2250,12 @@ describe('ChildProcessTest', function () {
}) })
/** /**
* @tc.name: testGetSystemConfig003 * @tc.name: SUB_Runtime_JSAPI_SR000GGR3G-027
* @tc.desc: Returns the system configuration at runtime. * @tc.desc: Returns the system configuration at runtime.
* @tc.require: AR000GFB04 * @tc.require: AR000GFB04
* @tc.author: liwenqiang * @tc.author: liwenqiang
*/ */
it('testGetSystemConfig003', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR3G-027', 0, function () {
var _SC_ARG_MAX = 0 var _SC_ARG_MAX = 0
for(var i=0; i<5; i++) for(var i=0; i<5; i++)
{ {
...@@ -2256,12 +2269,12 @@ describe('ChildProcessTest', function () { ...@@ -2256,12 +2269,12 @@ describe('ChildProcessTest', function () {
}) })
/** /**
* @tc.name: testGetSystemConfig004 * @tc.name: SUB_Runtime_JSAPI_SR000GGR3G-028
* @tc.desc: Returns the system configuration at runtime. * @tc.desc: Returns the system configuration at runtime.
* @tc.require: AR000GFB04 * @tc.require: AR000GFB04
* @tc.author: liwenqiang * @tc.author: liwenqiang
*/ */
it('testGetSystemConfig004', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR3G-028', 0, function () {
var _SC_OPEN_MAX = 4 var _SC_OPEN_MAX = 4
var pri = process.getSystemConfig(_SC_OPEN_MAX) var pri = process.getSystemConfig(_SC_OPEN_MAX)
if(pri > 0) if(pri > 0)
...@@ -2272,12 +2285,12 @@ describe('ChildProcessTest', function () { ...@@ -2272,12 +2285,12 @@ describe('ChildProcessTest', function () {
}) })
/** /**
* @tc.name: testGetSystemConfig005 * @tc.name: SUB_Runtime_JSAPI_SR000GGR3G-029
* @tc.desc: Returns the system configuration at runtime. * @tc.desc: Returns the system configuration at runtime.
* @tc.require: AR000GFB04 * @tc.require: AR000GFB04
* @tc.author: liwenqiang * @tc.author: liwenqiang
*/ */
it('testGetSystemConfig005', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR3G-029', 0, function () {
var _SC_PAGESIZE = 8 var _SC_PAGESIZE = 8
var pri = process.getSystemConfig(_SC_PAGESIZE) var pri = process.getSystemConfig(_SC_PAGESIZE)
if(pri > 0) if(pri > 0)
...@@ -2288,12 +2301,12 @@ describe('ChildProcessTest', function () { ...@@ -2288,12 +2301,12 @@ describe('ChildProcessTest', function () {
}) })
/** /**
* @tc.name: testGetEnvironmentVar001 * @tc.name: SUB_Runtime_JSAPI_SR000GGR3G-033
* @tc.desc: Returns the system value for environment variables. * @tc.desc: Returns the system value for environment variables.
* @tc.require: AR000GFB04 * @tc.require: AR000GFB04
* @tc.author: liwenqiang * @tc.author: liwenqiang
*/ */
it('testGetEnvironmentVar001', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR3G-033', 0, function () {
var pri = process.getEnvironmentVar("USER") var pri = process.getEnvironmentVar("USER")
if(pri != null) { if(pri != null) {
var flag = new Boolean(true) var flag = new Boolean(true)
...@@ -2302,12 +2315,12 @@ describe('ChildProcessTest', function () { ...@@ -2302,12 +2315,12 @@ describe('ChildProcessTest', function () {
}) })
/** /**
* @tc.name: testGetEnvironmentVar002 * @tc.name: SUB_Runtime_JSAPI_SR000GGR3G-036
* @tc.desc: Returns the system value for environment variables. * @tc.desc: Returns the system value for environment variables.
* @tc.require: AR000GFB04 * @tc.require: AR000GFB04
* @tc.author: liwenqiang * @tc.author: liwenqiang
*/ */
it('testGetEnvironmentVar002', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR3G-036', 0, function () {
for(var i=0; i<3; i++) for(var i=0; i<3; i++)
{ {
var pri = process.getEnvironmentVar("PATH") var pri = process.getEnvironmentVar("PATH")
...@@ -2338,12 +2351,12 @@ describe('ChildProcessTest', function () { ...@@ -2338,12 +2351,12 @@ describe('ChildProcessTest', function () {
}) })
/** /**
* @tc.name: testGetEnvironmentVar004 * @tc.name: SUB_Runtime_JSAPI_SR000GGR3G-034
* @tc.desc: Returns the system value for environment variables. * @tc.desc: Returns the system value for environment variables.
* @tc.require: AR000GFB04 * @tc.require: AR000GFB04
* @tc.author: liwenqiang * @tc.author: liwenqiang
*/ */
it('testGetEnvironmentVar004', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR3G-034', 0, function () {
for(var i=0; i<6; i++) for(var i=0; i<6; i++)
{ {
var pri = process.getEnvironmentVar("USER") var pri = process.getEnvironmentVar("USER")
...@@ -2356,12 +2369,12 @@ describe('ChildProcessTest', function () { ...@@ -2356,12 +2369,12 @@ describe('ChildProcessTest', function () {
}) })
/** /**
* @tc.name: testGetEnvironmentVar005 * @tc.name: SUB_Runtime_JSAPI_SR000GGR3G-035
* @tc.desc: Returns the system value for environment variables. * @tc.desc: Returns the system value for environment variables.
* @tc.require: AR000GFB04 * @tc.require: AR000GFB04
* @tc.author: liwenqiang * @tc.author: liwenqiang
*/ */
it('testGetEnvironmentVar005', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR3G-035', 0, function () {
for(var i=0; i<8; i++) for(var i=0; i<8; i++)
{ {
var pri = process.getEnvironmentVar("USER") var pri = process.getEnvironmentVar("USER")
...@@ -2372,4 +2385,22 @@ describe('ChildProcessTest', function () { ...@@ -2372,4 +2385,22 @@ describe('ChildProcessTest', function () {
} }
} }
}) })
/**
* @tc.name: SUB_Runtime_JSAPI_SR000GGR3G-037
* @tc.desc: Returns the system value for environment variables.
* @tc.require: AR000GFB04
* @tc.author: liwenqiang
*/
it('SUB_Runtime_JSAPI_SR000GGR3G-037', 0, function () {
for(var i=0; i<100; i++)
{
var pri = process.getEnvironmentVar("i123")
if(pri == null)
{
var flag = new Boolean(true)
expect(flag).assertEqual(true)
}
}
})
}) })
\ No newline at end of file
...@@ -17,12 +17,12 @@ import URI from '@ohos.uri' ...@@ -17,12 +17,12 @@ import URI from '@ohos.uri'
describe('UriTest', function () { describe('UriTest', function () {
/** /**
* @tc.name: testConstructor001 * @tc.name: SUB_Runtime_JSAPI_SR000GGR34_012
* @tc.desc: Constructs a URI by parsing the given string. * @tc.desc: Constructs a URI by parsing the given string.
* @tc.require: AR000GFB2S * @tc.require: AR000GFB2S
* @tc.author: zhaoduwei * @tc.author: zhaoduwei
*/ */
it('testConstructor001', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR34_012', 0, function () {
try { try {
let that = new URI('#http://username:password@host:8080/directory/file?foo=1&bar=2'); let that = new URI('#http://username:password@host:8080/directory/file?foo=1&bar=2');
} catch (err) { } catch (err) {
...@@ -31,12 +31,12 @@ describe('UriTest', function () { ...@@ -31,12 +31,12 @@ describe('UriTest', function () {
}) })
/** /**
* @tc.name: testConstructor002 * @tc.name: SUB_Runtime_JSAPI_SR000GGR34_010
* @tc.desc: Constructs a URI by parsing the given string. * @tc.desc: Constructs a URI by parsing the given string.
* @tc.require: AR000GFB2S * @tc.require: AR000GFB2S
* @tc.author: zhaoduwei * @tc.author: zhaoduwei
*/ */
it('testConstructor002', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR34_010', 0, function () {
try { try {
let that = new URI({name: 'gaogao'}); let that = new URI({name: 'gaogao'});
} catch (err) { } catch (err) {
...@@ -45,12 +45,12 @@ describe('UriTest', function () { ...@@ -45,12 +45,12 @@ describe('UriTest', function () {
}) })
/** /**
* @tc.name: testConstructor003 * @tc.name: SUB_Runtime_JSAPI_SR000GGR34_032
* @tc.desc: Constructs a URI by parsing the given string. * @tc.desc: Constructs a URI by parsing the given string.
* @tc.require: AR000GFB2S * @tc.require: AR000GFB2S
* @tc.author: zhaoduwei * @tc.author: zhaoduwei
*/ */
it('testConstructor003', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR34_032', 0, function () {
try { try {
let that = new URI('ht/tp://username:pas sword@host:8080/directory/file?foo=1&bar=2'); let that = new URI('ht/tp://username:pas sword@host:8080/directory/file?foo=1&bar=2');
} catch (err) { } catch (err) {
...@@ -59,12 +59,12 @@ describe('UriTest', function () { ...@@ -59,12 +59,12 @@ describe('UriTest', function () {
}) })
/** /**
* @tc.name: testConstructor004 * @tc.name: SUB_Runtime_JSAPI_SR000GGR34_030
* @tc.desc: Constructs a URI by parsing the given string. * @tc.desc: Constructs a URI by parsing the given string.
* @tc.require: AR000GFB2S * @tc.require: AR000GFB2S
* @tc.author: zhaoduwei * @tc.author: zhaoduwei
*/ */
it('testConstructor004', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR34_030', 0, function () {
try { try {
let that = new URI('http://username:password@[::]:8080/directory/file?Query#gaogao faofao'); let that = new URI('http://username:password@[::]:8080/directory/file?Query#gaogao faofao');
} catch (err) { } catch (err) {
...@@ -73,12 +73,12 @@ describe('UriTest', function () { ...@@ -73,12 +73,12 @@ describe('UriTest', function () {
}) })
/** /**
* @tc.name: testConstructor005 * @tc.name: SUB_Runtime_JSAPI_SR000GGR34_028
* @tc.desc: Constructs a URI by parsing the given string. * @tc.desc: Constructs a URI by parsing the given string.
* @tc.require: AR000GFB2S * @tc.require: AR000GFB2S
* @tc.author: zhaoduwei * @tc.author: zhaoduwei
*/ */
it('testConstructor005', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR34_028', 0, function () {
try { try {
let that = new URI('http://username:password@host:8080/directory/file?foo^=1&bar=2#gaogaofaofao'); let that = new URI('http://username:password@host:8080/directory/file?foo^=1&bar=2#gaogaofaofao');
} catch (err) { } catch (err) {
...@@ -87,12 +87,12 @@ describe('UriTest', function () { ...@@ -87,12 +87,12 @@ describe('UriTest', function () {
}) })
/** /**
* @tc.name: testConstructor006 * @tc.name: SUB_Runtime_JSAPI_SR000GGR34_013
* @tc.desc: Constructs a URI by parsing the given string. * @tc.desc: Constructs a URI by parsing the given string.
* @tc.require: AR000GFB2S * @tc.require: AR000GFB2S
* @tc.author: zhaoduwei * @tc.author: zhaoduwei
*/ */
it('testConstructor006', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR34_013', 0, function () {
try { try {
let that = new URI('1http://username:password@host:8080/directory/file?foo=1&bar=2#gaogaofaofao'); let that = new URI('1http://username:password@host:8080/directory/file?foo=1&bar=2#gaogaofaofao');
} catch (err) { } catch (err) {
...@@ -101,12 +101,12 @@ describe('UriTest', function () { ...@@ -101,12 +101,12 @@ describe('UriTest', function () {
}) })
/** /**
* @tc.name: testConstructor007 * @tc.name: SUB_Runtime_JSAPI_SR000GGR34_014
* @tc.desc: Constructs a URI by parsing the given string. * @tc.desc: Constructs a URI by parsing the given string.
* @tc.require: AR000GFB2S * @tc.require: AR000GFB2S
* @tc.author: zhaoduwei * @tc.author: zhaoduwei
*/ */
it('testConstructor007', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR34_014', 0, function () {
try { try {
let that = new URI('ht@tp://username:password@host:8080/directory/file?foo=1&bar=2#gaogaofaofao'); let that = new URI('ht@tp://username:password@host:8080/directory/file?foo=1&bar=2#gaogaofaofao');
} catch (err) { } catch (err) {
...@@ -115,12 +115,12 @@ describe('UriTest', function () { ...@@ -115,12 +115,12 @@ describe('UriTest', function () {
}) })
/** /**
* @tc.name: testConstructor008 * @tc.name: SUB_Runtime_JSAPI_SR000GGR34_026
* @tc.desc: Constructs a URI by parsing the given string. * @tc.desc: Constructs a URI by parsing the given string.
* @tc.require: AR000GFB2S * @tc.require: AR000GFB2S
* @tc.author: zhaoduwei * @tc.author: zhaoduwei
*/ */
it('testConstructor008', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR34_026', 0, function () {
try { try {
let that = new URI('http://username:password@[::]:80r80/directory/file?foo=1&bar=2#gaogaofaofao'); let that = new URI('http://username:password@[::]:80r80/directory/file?foo=1&bar=2#gaogaofaofao');
} catch (err) { } catch (err) {
...@@ -129,12 +129,12 @@ describe('UriTest', function () { ...@@ -129,12 +129,12 @@ describe('UriTest', function () {
}) })
/** /**
* @tc.name: testConstructor009 * @tc.name: SUB_Runtime_JSAPI_SR000GGR34_021
* @tc.desc: Constructs a URI by parsing the given string. * @tc.desc: Constructs a URI by parsing the given string.
* @tc.require: AR000GFB2S * @tc.require: AR000GFB2S
* @tc.author: zhaoduwei * @tc.author: zhaoduwei
*/ */
it('testConstructor009', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR34_021', 0, function () {
try { try {
let that = new URI('http://username:password@[::12:55:8080/directory/file?foo=1&bar=2#gaogaofaofao'); let that = new URI('http://username:password@[::12:55:8080/directory/file?foo=1&bar=2#gaogaofaofao');
} catch (err) { } catch (err) {
...@@ -143,12 +143,12 @@ describe('UriTest', function () { ...@@ -143,12 +143,12 @@ describe('UriTest', function () {
}) })
/** /**
* @tc.name: testConstructor010 * @tc.name: SUB_Runtime_JSAPI_SR000GGR34_018
* @tc.desc: Constructs a URI by parsing the given string. * @tc.desc: Constructs a URI by parsing the given string.
* @tc.require: AR000GFB2S * @tc.require: AR000GFB2S
* @tc.author: zhaoduwei * @tc.author: zhaoduwei
*/ */
it('testConstructor010', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR34_018', 0, function () {
try { try {
let that = new URI('http://username:pa^ssword@[::12:55]:8080/directory/file?foo=1&bar=2#gaogaofaofao'); let that = new URI('http://username:pa^ssword@[::12:55]:8080/directory/file?foo=1&bar=2#gaogaofaofao');
} catch (err) { } catch (err) {
...@@ -157,12 +157,12 @@ describe('UriTest', function () { ...@@ -157,12 +157,12 @@ describe('UriTest', function () {
}) })
/** /**
* @tc.name: testConstructor011 * @tc.name: SUB_Runtime_JSAPI_SR000GGR34_020
* @tc.desc: Constructs a URI by parsing the given string. * @tc.desc: Constructs a URI by parsing the given string.
* @tc.require: AR000GFB2S * @tc.require: AR000GFB2S
* @tc.author: zhaoduwei * @tc.author: zhaoduwei
*/ */
it('testConstructor011', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR34_020', 0, function () {
try { try {
let that = new URI('http://username:password@[::1你2:55]:8080/directory/file?foo=1&bar=2#gaogaofaofao'); let that = new URI('http://username:password@[::1你2:55]:8080/directory/file?foo=1&bar=2#gaogaofaofao');
} catch (err) { } catch (err) {
...@@ -171,12 +171,12 @@ describe('UriTest', function () { ...@@ -171,12 +171,12 @@ describe('UriTest', function () {
}) })
/** /**
* @tc.name: testConstructor012 * @tc.name: SUB_Runtime_JSAPI_SR000GGR34_001
* @tc.desc: Constructs a URI by parsing the given string. * @tc.desc: Constructs a URI by parsing the given string.
* @tc.require: AR000GFB2S * @tc.require: AR000GFB2S
* @tc.author: zhaoduwei * @tc.author: zhaoduwei
*/ */
it('testConstructor012', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR34_001', 0, function () {
let gaogao = new URI('http://gg:gaogao@www.baidu.com:99/path/path?query#fagment'); let gaogao = new URI('http://gg:gaogao@www.baidu.com:99/path/path?query#fagment');
expect(gaogao.scheme).assertEqual("http"); expect(gaogao.scheme).assertEqual("http");
expect(gaogao.authority).assertEqual("gg:gaogao@www.baidu.com:99"); expect(gaogao.authority).assertEqual("gg:gaogao@www.baidu.com:99");
...@@ -209,12 +209,12 @@ describe('UriTest', function () { ...@@ -209,12 +209,12 @@ describe('UriTest', function () {
}) })
/** /**
* @tc.name: testConstructor014 * @tc.name: SUB_Runtime_JSAPI_SR000GGR34_002
* @tc.desc: Constructs a URI by parsing the given string. * @tc.desc: Constructs a URI by parsing the given string.
* @tc.require: AR000GFB2S * @tc.require: AR000GFB2S
* @tc.author: zhaoduwei * @tc.author: zhaoduwei
*/ */
it('testConstructor014', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR34_002', 0, function () {
let gaogao = new URI('http://gg:gaogao@[::]:88/path/path66?foooo#gaogao'); let gaogao = new URI('http://gg:gaogao@[::]:88/path/path66?foooo#gaogao');
expect(gaogao.scheme).assertEqual("http"); expect(gaogao.scheme).assertEqual("http");
expect(gaogao.authority).assertEqual("gg:gaogao@[::]:88"); expect(gaogao.authority).assertEqual("gg:gaogao@[::]:88");
...@@ -247,12 +247,12 @@ describe('UriTest', function () { ...@@ -247,12 +247,12 @@ describe('UriTest', function () {
}) })
/** /**
* @tc.name: testConstructor016 * @tc.name: SUB_Runtime_JSAPI_SR000GGR34_003
* @tc.desc: Constructs a URI by parsing the given string. * @tc.desc: Constructs a URI by parsing the given string.
* @tc.require: AR000GFB2S * @tc.require: AR000GFB2S
* @tc.author: zhaoduwei * @tc.author: zhaoduwei
*/ */
it('testConstructor016', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR34_003', 0, function () {
let gaogao = new URI('http://gg:gaogao@[::FFFF:129.144.52.38]:99/path/path?query#fagment'); let gaogao = new URI('http://gg:gaogao@[::FFFF:129.144.52.38]:99/path/path?query#fagment');
expect(gaogao.scheme).assertEqual("http"); expect(gaogao.scheme).assertEqual("http");
expect(gaogao.authority).assertEqual("gg:gaogao@[::FFFF:129.144.52.38]:99"); expect(gaogao.authority).assertEqual("gg:gaogao@[::FFFF:129.144.52.38]:99");
...@@ -343,12 +343,12 @@ describe('UriTest', function () { ...@@ -343,12 +343,12 @@ describe('UriTest', function () {
}) })
/** /**
* @tc.name: testConstructor021 * @tc.name: SUB_Runtime_JSAPI_SR000GGR34_004
* @tc.desc: Constructs a URI by parsing the given string. * @tc.desc: Constructs a URI by parsing the given string.
* @tc.require: AR000GFB2S * @tc.require: AR000GFB2S
* @tc.author: zhaoduwei * @tc.author: zhaoduwei
*/ */
it('testConstructor021', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR34_004', 0, function () {
let gaogao = new URI('http://gg:gaogao@199.98.55.44:99/path/path?query#fagment'); let gaogao = new URI('http://gg:gaogao@199.98.55.44:99/path/path?query#fagment');
expect(gaogao.scheme).assertEqual("http"); expect(gaogao.scheme).assertEqual("http");
expect(gaogao.authority).assertEqual("gg:gaogao@199.98.55.44:99"); expect(gaogao.authority).assertEqual("gg:gaogao@199.98.55.44:99");
...@@ -362,12 +362,12 @@ describe('UriTest', function () { ...@@ -362,12 +362,12 @@ describe('UriTest', function () {
}) })
/** /**
* @tc.name: testConstructor022 * @tc.name: SUB_Runtime_JSAPI_SR000GGR34_005
* @tc.desc: Constructs a URI by parsing the given string. * @tc.desc: Constructs a URI by parsing the given string.
* @tc.require: AR000GFB2S * @tc.require: AR000GFB2S
* @tc.author: zhaoduwei * @tc.author: zhaoduwei
*/ */
it('testConstructor022', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR34_005', 0, function () {
let gaogao = new URI('http://16.9.5.4:99/path/path?query#fagment'); let gaogao = new URI('http://16.9.5.4:99/path/path?query#fagment');
expect(gaogao.scheme).assertEqual("http"); expect(gaogao.scheme).assertEqual("http");
expect(gaogao.authority).assertEqual("16.9.5.4:99"); expect(gaogao.authority).assertEqual("16.9.5.4:99");
...@@ -400,12 +400,12 @@ describe('UriTest', function () { ...@@ -400,12 +400,12 @@ describe('UriTest', function () {
}) })
/** /**
* @tc.name: testConstructor024 * @tc.name: SUB_Runtime_JSAPI_SR000GGR34_006
* @tc.desc: Constructs a URI by parsing the given string. * @tc.desc: Constructs a URI by parsing the given string.
* @tc.require: AR000GFB2S * @tc.require: AR000GFB2S
* @tc.author: zhaoduwei * @tc.author: zhaoduwei
*/ */
it('testConstructor024', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR34_006', 0, function () {
let gaogao = new URI('http://user@49.10pe8.54.12:80/path/path23?query#qwer'); let gaogao = new URI('http://user@49.10pe8.54.12:80/path/path23?query#qwer');
expect(gaogao.scheme).assertEqual("http"); expect(gaogao.scheme).assertEqual("http");
expect(gaogao.authority).assertEqual("user@49.10pe8.54.12:80"); expect(gaogao.authority).assertEqual("user@49.10pe8.54.12:80");
...@@ -419,12 +419,12 @@ describe('UriTest', function () { ...@@ -419,12 +419,12 @@ describe('UriTest', function () {
}) })
/** /**
* @tc.name: testConstructor025 * @tc.name: SUB_Runtime_JSAPI_SR000GGR34_007
* @tc.desc: Constructs a URI by parsing the given string. * @tc.desc: Constructs a URI by parsing the given string.
* @tc.require: AR000GFB2S * @tc.require: AR000GFB2S
* @tc.author: zhaoduwei * @tc.author: zhaoduwei
*/ */
it('testConstructor025', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR34_007', 0, function () {
let gaogao = new URI('http://user@www.baidu.com/path/path23?query#qwer'); let gaogao = new URI('http://user@www.baidu.com/path/path23?query#qwer');
expect(gaogao.scheme).assertEqual("http"); expect(gaogao.scheme).assertEqual("http");
expect(gaogao.authority).assertEqual("user@www.baidu.com"); expect(gaogao.authority).assertEqual("user@www.baidu.com");
...@@ -438,12 +438,12 @@ describe('UriTest', function () { ...@@ -438,12 +438,12 @@ describe('UriTest', function () {
}) })
/** /**
* @tc.name: testConstructor026 * @tc.name: SUB_Runtime_JSAPI_SR000GGR34_008
* @tc.desc: Constructs a URI by parsing the given string. * @tc.desc: Constructs a URI by parsing the given string.
* @tc.require: AR000GFB2S * @tc.require: AR000GFB2S
* @tc.author: zhaoduwei * @tc.author: zhaoduwei
*/ */
it('testConstructor026', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR34_008', 0, function () {
let gaogao = new URI('http://user@www.hw.com:77/path/path23?query#qwer'); let gaogao = new URI('http://user@www.hw.com:77/path/path23?query#qwer');
expect(gaogao.scheme).assertEqual("http"); expect(gaogao.scheme).assertEqual("http");
expect(gaogao.authority).assertEqual("user@www.hw.com:77"); expect(gaogao.authority).assertEqual("user@www.hw.com:77");
...@@ -457,12 +457,12 @@ describe('UriTest', function () { ...@@ -457,12 +457,12 @@ describe('UriTest', function () {
}) })
/** /**
* @tc.name: testConstructor027 * @tc.name: SUB_Runtime_JSAPI_SR000GGR34_009
* @tc.desc: Constructs a URI by parsing the given string. * @tc.desc: Constructs a URI by parsing the given string.
* @tc.require: AR000GFB2S * @tc.require: AR000GFB2S
* @tc.author: zhaoduwei * @tc.author: zhaoduwei
*/ */
it('testConstructor027', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR34_009', 0, function () {
let gaogao = new URI('ht2tp://user@www.h12343w.com:77/path/path23?query#qwer'); let gaogao = new URI('ht2tp://user@www.h12343w.com:77/path/path23?query#qwer');
expect(gaogao.scheme).assertEqual("ht2tp"); expect(gaogao.scheme).assertEqual("ht2tp");
expect(gaogao.authority).assertEqual("user@www.h12343w.com:77"); expect(gaogao.authority).assertEqual("user@www.h12343w.com:77");
...@@ -565,12 +565,12 @@ describe('UriTest', function () { ...@@ -565,12 +565,12 @@ describe('UriTest', function () {
}) })
/** /**
* @tc.name: testEquals002 * @tc.name: SUB_Runtime_JSAPI_SR000GGR34_034
* @tc.desc: Tests this URI for equality with another object. * @tc.desc: Tests this URI for equality with another object.
* @tc.require: AR000GFB2S * @tc.require: AR000GFB2S
* @tc.author: zhaoduwei * @tc.author: zhaoduwei
*/ */
it('testEquals002', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR34_034', 0, function () {
let gaogao = new URI('http://gg:gaogao@[1:0:0:1:2:1:2:1]:99/path1?query#fagment'); let gaogao = new URI('http://gg:gaogao@[1:0:0:1:2:1:2:1]:99/path1?query#fagment');
let gaogao1 = new URI('http://gg:gaogao@[1:0:0:1:2:1:2:1]:99/path1?query#fagment'); let gaogao1 = new URI('http://gg:gaogao@[1:0:0:1:2:1:2:1]:99/path1?query#fagment');
let res = gaogao.equals(gaogao1); let res = gaogao.equals(gaogao1);
...@@ -578,12 +578,12 @@ describe('UriTest', function () { ...@@ -578,12 +578,12 @@ describe('UriTest', function () {
}) })
/** /**
* @tc.name: testEquals003 * @tc.name: SUB_Runtime_JSAPI_SR000GGR34_035
* @tc.desc: Tests this URI for equality with another object. * @tc.desc: Tests this URI for equality with another object.
* @tc.require: AR000GFB2S * @tc.require: AR000GFB2S
* @tc.author: zhaoduwei * @tc.author: zhaoduwei
*/ */
it('testEquals003', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR34_035', 0, function () {
let gaogao = new URI('http://gg:gaogao@[1:0:0:1:2:1:2:1]:99/path1?query#fagment'); let gaogao = new URI('http://gg:gaogao@[1:0:0:1:2:1:2:1]:99/path1?query#fagment');
let gaogao1 = new URI('http://gg:gaogao@[1:0:0:1:2:1:2:1]:99/path1?query#fagment123'); let gaogao1 = new URI('http://gg:gaogao@[1:0:0:1:2:1:2:1]:99/path1?query#fagment123');
let res = gaogao.equals(gaogao1); let res = gaogao.equals(gaogao1);
...@@ -617,12 +617,12 @@ describe('UriTest', function () { ...@@ -617,12 +617,12 @@ describe('UriTest', function () {
}) })
/** /**
* @tc.name: testNormalize001 * @tc.name: SUB_Runtime_JSAPI_SR000GGR34_036
* @tc.desc: Normalizes this URI's path. * @tc.desc: Normalizes this URI's path.
* @tc.require: AR000GFB2S * @tc.require: AR000GFB2S
* @tc.author: zhaoduwei * @tc.author: zhaoduwei
*/ */
it('testNormalize001', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR34_036', 0, function () {
let gaogao = new URI('http://gg:gaogao@[1:0:0:1:2:1:2:1]:99/path/66./../././mm/.././path1?query#fagment'); let gaogao = new URI('http://gg:gaogao@[1:0:0:1:2:1:2:1]:99/path/66./../././mm/.././path1?query#fagment');
let res = gaogao.normalize(); let res = gaogao.normalize();
expect(res.path).assertEqual("/path/path1"); expect(res.path).assertEqual("/path/path1");
...@@ -630,12 +630,12 @@ describe('UriTest', function () { ...@@ -630,12 +630,12 @@ describe('UriTest', function () {
}) })
/** /**
* @tc.name: testNormalize002 * @tc.name: SUB_Runtime_JSAPI_SR000GGR34_037
* @tc.desc: Normalizes this URI's path. * @tc.desc: Normalizes this URI's path.
* @tc.require: AR000GFB2S * @tc.require: AR000GFB2S
* @tc.author: zhaoduwei * @tc.author: zhaoduwei
*/ */
it('testNormalize002', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR34_037', 0, function () {
let gaogao = new URI('http://gg:gaogao@[1:0:0:1:2:1:2:1]:99/../../path?query#fagment'); let gaogao = new URI('http://gg:gaogao@[1:0:0:1:2:1:2:1]:99/../../path?query#fagment');
let res = gaogao.normalize(); let res = gaogao.normalize();
expect(res.path).assertEqual("/../../path"); expect(res.path).assertEqual("/../../path");
...@@ -656,12 +656,12 @@ describe('UriTest', function () { ...@@ -656,12 +656,12 @@ describe('UriTest', function () {
}) })
/** /**
* @tc.name: testNormalize004 * @tc.name: SUB_Runtime_JSAPI_SR000GGR34_038
* @tc.desc: Normalizes this URI's path. * @tc.desc: Normalizes this URI's path.
* @tc.require: AR000GFB2S * @tc.require: AR000GFB2S
* @tc.author: zhaoduwei * @tc.author: zhaoduwei
*/ */
it('testNormalize004', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR34_038', 0, function () {
let gaogao = new URI('http://gg:gaogao@[1:0:0:1:2:1:2:1]:99/../path/.././../aa/bb/cc?query'); let gaogao = new URI('http://gg:gaogao@[1:0:0:1:2:1:2:1]:99/../path/.././../aa/bb/cc?query');
let res = gaogao.normalize(); let res = gaogao.normalize();
expect(res.path).assertEqual("/../../aa/bb/cc"); expect(res.path).assertEqual("/../../aa/bb/cc");
...@@ -669,12 +669,12 @@ describe('UriTest', function () { ...@@ -669,12 +669,12 @@ describe('UriTest', function () {
}) })
/** /**
* @tc.name: testNormalize005 * @tc.name: SUB_Runtime_JSAPI_SR000GGR34_039
* @tc.desc: Normalizes this URI's path. * @tc.desc: Normalizes this URI's path.
* @tc.require: AR000GFB2S * @tc.require: AR000GFB2S
* @tc.author: zhaoduwei * @tc.author: zhaoduwei
*/ */
it('testNormalize005', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR34_039', 0, function () {
let gaogao = new URI('http://gg:gaogao@[1:0:0:1:2:1:2:1]:99/./path/./aa/bb/cc?query#fagment'); let gaogao = new URI('http://gg:gaogao@[1:0:0:1:2:1:2:1]:99/./path/./aa/bb/cc?query#fagment');
let res = gaogao.normalize(); let res = gaogao.normalize();
expect(res.path).assertEqual("/path/aa/bb/cc"); expect(res.path).assertEqual("/path/aa/bb/cc");
...@@ -682,12 +682,12 @@ describe('UriTest', function () { ...@@ -682,12 +682,12 @@ describe('UriTest', function () {
}) })
/** /**
* @tc.name: testToString001 * @tc.name: SUB_Runtime_JSAPI_SR000GGR34_042
* @tc.desc: Returns the content of this URI as a US-ASCII string. * @tc.desc: Returns the content of this URI as a US-ASCII string.
* @tc.require: AR000GFB2S * @tc.require: AR000GFB2S
* @tc.author: zhaoduwei * @tc.author: zhaoduwei
*/ */
it('testToString001', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR34_042', 0, function () {
let gaogao = new URI('http://gg:gaogao@[1:0:0:1:2:1:2:1]:99/../../path/.././../aa/bb/cc?query#fagment'); let gaogao = new URI('http://gg:gaogao@[1:0:0:1:2:1:2:1]:99/../../path/.././../aa/bb/cc?query#fagment');
let res = gaogao.toString(); let res = gaogao.toString();
expect(res).assertEqual('http://gg:gaogao@[1:0:0:1:2:1:2:1]:99/../../path/.././../aa/bb/cc?query#fagment'); expect(res).assertEqual('http://gg:gaogao@[1:0:0:1:2:1:2:1]:99/../../path/.././../aa/bb/cc?query#fagment');
...@@ -718,12 +718,12 @@ describe('UriTest', function () { ...@@ -718,12 +718,12 @@ describe('UriTest', function () {
}) })
/** /**
* @tc.name: testToString004 * @tc.name: SUB_Runtime_JSAPI_SR000GGR34_043
* @tc.desc: Returns the content of this URI as a US-ASCII string. * @tc.desc: Returns the content of this URI as a US-ASCII string.
* @tc.require: AR000GFB2S * @tc.require: AR000GFB2S
* @tc.author: zhaoduwei * @tc.author: zhaoduwei
*/ */
it('testToString004', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR34_043', 0, function () {
let gaogao = new URI('http://gg:gao你好gao@199.98.55.44:99/path/p你好ath?qu你好ery#fag你好ment'); let gaogao = new URI('http://gg:gao你好gao@199.98.55.44:99/path/p你好ath?qu你好ery#fag你好ment');
let res = gaogao.toString(); let res = gaogao.toString();
expect(res).assertEqual('http://gg:gao%E4%BD%A0%E5%A5%BDgao@199.98.55.44:99/path/' + expect(res).assertEqual('http://gg:gao%E4%BD%A0%E5%A5%BDgao@199.98.55.44:99/path/' +
...@@ -743,24 +743,24 @@ describe('UriTest', function () { ...@@ -743,24 +743,24 @@ describe('UriTest', function () {
}) })
/** /**
* @tc.name: testCheckIsAbsolute001 * @tc.name: SUB_Runtime_JSAPI_SR000GGR34_041
* @tc.desc: Tells whether or not this URI is absolute. * @tc.desc: Tells whether or not this URI is absolute.
* @tc.require: AR000GFB2S * @tc.require: AR000GFB2S
* @tc.author: zhaoduwei * @tc.author: zhaoduwei
*/ */
it('testCheckIsAbsolute001', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR34_041', 0, function () {
let gaogao = new URI('f/tp://username:password@www.baidu.com:88/path?query#fagment'); let gaogao = new URI('f/tp://username:password@www.baidu.com:88/path?query#fagment');
let res = gaogao.checkIsAbsolute(); let res = gaogao.checkIsAbsolute();
expect(res).assertEqual(false); expect(res).assertEqual(false);
}) })
/** /**
* @tc.name: testCheckIsAbsolute002 * @tc.name: SUB_Runtime_JSAPI_SR000GGR34_040
* @tc.desc: Tells whether or not this URI is absolute. * @tc.desc: Tells whether or not this URI is absolute.
* @tc.require: AR000GFB2S * @tc.require: AR000GFB2S
* @tc.author: zhaoduwei * @tc.author: zhaoduwei
*/ */
it('testCheckIsAbsolute002', 0, function () { it('SUB_Runtime_JSAPI_SR000GGR34_040', 0, function () {
let gaogao = new URI('ftp://username:password@www.baidu.com:88/path?query#fagment'); let gaogao = new URI('ftp://username:password@www.baidu.com:88/path?query#fagment');
let res = gaogao.checkIsAbsolute(); let res = gaogao.checkIsAbsolute();
expect(res).assertEqual(true); expect(res).assertEqual(true);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册