提交 2de192ee 编写于 作者: O openharmony_ci 提交者: Gitee

!736 modify process xts codecheck

Merge pull request !736 from clearme777/OpenHarmony-3.0-LTS
...@@ -136,8 +136,7 @@ describe('ChildProcessTest', function () { ...@@ -136,8 +136,7 @@ describe('ChildProcessTest', function () {
var child = process.runCmd('ls; sleep 5;') var child = process.runCmd('ls; sleep 5;')
child.wait() child.wait()
var pid_ = child.pid var pid_ = child.pid
const boolean = new Boolean(true) expect(pid_ > 0).assertEqual(true)
expect(pid_ > 0).assertEqual(boolean)
}) })
// childprocess ppid test // childprocess ppid test
...@@ -145,8 +144,7 @@ describe('ChildProcessTest', function () { ...@@ -145,8 +144,7 @@ describe('ChildProcessTest', function () {
var child = process.runCmd('ls; sleep 5;') var child = process.runCmd('ls; sleep 5;')
var status = child.wait() var status = child.wait()
var ppid_ = child.ppid var ppid_ = child.ppid
const boolean = new Boolean(true) expect(ppid_ > 0).assertEqual(true)
expect(ppid_ > 0).assertEqual(boolean)
}) })
// childprocess kill test // childprocess kill test
...@@ -232,7 +230,7 @@ describe('ChildProcessTest', function () { ...@@ -232,7 +230,7 @@ describe('ChildProcessTest', function () {
var that = new process.Process() var that = new process.Process()
var result = that.getUid var result = that.getUid
if(result > 0) { if(result > 0) {
var flag = new Boolean(true) var flag = true
} }
expect(flag).assertEqual(true) expect(flag).assertEqual(true)
}) })
...@@ -243,7 +241,7 @@ describe('ChildProcessTest', function () { ...@@ -243,7 +241,7 @@ describe('ChildProcessTest', function () {
var result = that.getUid var result = that.getUid
if(result != null) { if(result != null) {
if(result > 0) { if(result > 0) {
var flag = new Boolean(true) var flag = true
} }
expect(flag).assertEqual(true) expect(flag).assertEqual(true)
} }
...@@ -255,7 +253,7 @@ describe('ChildProcessTest', function () { ...@@ -255,7 +253,7 @@ describe('ChildProcessTest', function () {
var that = new process.Process() var that = new process.Process()
var result = that.getGid var result = that.getGid
if(result > 0) { if(result > 0) {
var flag = new Boolean(true) var flag = true
} }
expect(flag).assertEqual(true) expect(flag).assertEqual(true)
}) })
...@@ -266,7 +264,7 @@ describe('ChildProcessTest', function () { ...@@ -266,7 +264,7 @@ describe('ChildProcessTest', function () {
var result = that.getGid var result = that.getGid
if(result != null) { if(result != null) {
if(result > 0) { if(result > 0) {
var flag = new Boolean(true) var flag = true
} }
expect(flag).assertEqual(true) expect(flag).assertEqual(true)
} }
...@@ -278,7 +276,7 @@ describe('ChildProcessTest', function () { ...@@ -278,7 +276,7 @@ describe('ChildProcessTest', function () {
var that = new process.Process() var that = new process.Process()
var result = that.getEuid var result = that.getEuid
if(result > 0) { if(result > 0) {
var flag = new Boolean(true) var flag = true
} }
expect(flag).assertEqual(true) expect(flag).assertEqual(true)
}) })
...@@ -289,7 +287,7 @@ describe('ChildProcessTest', function () { ...@@ -289,7 +287,7 @@ describe('ChildProcessTest', function () {
var result = that.getEuid var result = that.getEuid
if(result != null) { if(result != null) {
if(result > 0) { if(result > 0) {
var flag = new Boolean(true) var flag = true
} }
expect(flag).assertEqual(true) expect(flag).assertEqual(true)
} }
...@@ -301,7 +299,7 @@ describe('ChildProcessTest', function () { ...@@ -301,7 +299,7 @@ describe('ChildProcessTest', function () {
var that = new process.Process() var that = new process.Process()
var result = that.getEgid var result = that.getEgid
if(result > 0) { if(result > 0) {
var flag = new Boolean(true) var flag = true
} }
expect(flag).assertEqual(true) expect(flag).assertEqual(true)
}) })
...@@ -312,7 +310,7 @@ describe('ChildProcessTest', function () { ...@@ -312,7 +310,7 @@ describe('ChildProcessTest', function () {
var result = that.getEgid var result = that.getEgid
if(result != null) { if(result != null) {
if(result > 0) { if(result > 0) {
var flag = new Boolean(true) var flag = true
} }
expect(flag).assertEqual(true) expect(flag).assertEqual(true)
} }
...@@ -325,7 +323,7 @@ describe('ChildProcessTest', function () { ...@@ -325,7 +323,7 @@ describe('ChildProcessTest', function () {
var result = that.getGroups var result = that.getGroups
var len = result.length var len = result.length
if(len > 0) { if(len > 0) {
var flag = new Boolean(true) var flag = true
} }
expect(flag).assertEqual(true) expect(flag).assertEqual(true)
}) })
...@@ -337,7 +335,7 @@ describe('ChildProcessTest', function () { ...@@ -337,7 +335,7 @@ describe('ChildProcessTest', function () {
if(result != null) { if(result != null) {
var len = result.length var len = result.length
if(len > 0) { if(len > 0) {
var flag = new Boolean(true) var flag = true
} }
expect(flag).assertEqual(true) expect(flag).assertEqual(true)
} }
...@@ -433,7 +431,7 @@ describe('ChildProcessTest', function () { ...@@ -433,7 +431,7 @@ describe('ChildProcessTest', function () {
var that = new process.Process() var that = new process.Process()
var result = that.getPid var result = that.getPid
if(result > 0) { if(result > 0) {
var flag = new Boolean(true) var flag = true
} }
expect(flag).assertEqual(true) expect(flag).assertEqual(true)
}) })
...@@ -444,7 +442,7 @@ describe('ChildProcessTest', function () { ...@@ -444,7 +442,7 @@ describe('ChildProcessTest', function () {
{ {
var result = that.getPid var result = that.getPid
if(result > 0) { if(result > 0) {
var flag = new Boolean(true) var flag = true
} }
expect(flag).assertEqual(true) expect(flag).assertEqual(true)
} }
...@@ -455,7 +453,7 @@ describe('ChildProcessTest', function () { ...@@ -455,7 +453,7 @@ describe('ChildProcessTest', function () {
var that = new process.Process() var that = new process.Process()
var result = that.getPpid var result = that.getPpid
if(result > 0) { if(result > 0) {
var flag = new Boolean(true) var flag = true
} }
expect(flag).assertEqual(true) expect(flag).assertEqual(true)
}) })
...@@ -466,7 +464,7 @@ describe('ChildProcessTest', function () { ...@@ -466,7 +464,7 @@ describe('ChildProcessTest', function () {
{ {
var result = that.getPpid var result = that.getPpid
if(result > 0) { if(result > 0) {
var flag = new Boolean(true) var flag = true
} }
expect(flag).assertEqual(true) expect(flag).assertEqual(true)
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册