mirror of
https://github.com/astaxie/beego.git
synced 2024-11-23 19:40:54 +00:00
调整CI警告
This commit is contained in:
parent
647e21b0c4
commit
0a852912b4
@ -2672,10 +2672,10 @@ func TestPSQueryBuilder(t *testing.T) {
|
|||||||
func TestCondition(t *testing.T) {
|
func TestCondition(t *testing.T) {
|
||||||
// test Condition whether to include yourself
|
// test Condition whether to include yourself
|
||||||
cond := NewCondition()
|
cond := NewCondition()
|
||||||
cond = cond.AndCond(cond.Or("id", 1))
|
cond = cond.AndCond(cond.Or("ID", 1))
|
||||||
cond = cond.AndCond(cond.Or("id", 2))
|
cond = cond.AndCond(cond.Or("ID", 2))
|
||||||
cond = cond.AndCond(cond.Or("id", 3))
|
cond = cond.AndCond(cond.Or("ID", 3))
|
||||||
cond = cond.AndCond(cond.Or("id", 4))
|
cond = cond.AndCond(cond.Or("ID", 4))
|
||||||
|
|
||||||
cycleFlag := false
|
cycleFlag := false
|
||||||
var hasCycle func(*Condition)
|
var hasCycle func(*Condition)
|
||||||
@ -2691,11 +2691,14 @@ func TestCondition(t *testing.T) {
|
|||||||
if condPointMap[adr] {
|
if condPointMap[adr] {
|
||||||
// self as sub cond was cycle
|
// self as sub cond was cycle
|
||||||
cycleFlag = true
|
cycleFlag = true
|
||||||
return
|
break
|
||||||
} else {
|
}
|
||||||
condPointMap[adr] = true
|
condPointMap[adr] = true
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if cycleFlag {
|
||||||
|
return
|
||||||
}
|
}
|
||||||
for _, p := range c.params {
|
for _, p := range c.params {
|
||||||
if p.isCond {
|
if p.isCond {
|
||||||
|
Loading…
Reference in New Issue
Block a user