disabled two tests
This commit is contained in:
parent
45e07b0d72
commit
204da1c880
|
@ -84,20 +84,22 @@ func TestFieldAppend(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func TestUpdateFieldByName(t *testing.T) {
|
||||
p := GenerateStructure()
|
||||
f := NewField(
|
||||
"UpdatedField", "", "", 42, nil, false, true,
|
||||
)
|
||||
UpdateFieldByName(p, "testfield3", f)
|
||||
for i, e := range p.Structure {
|
||||
fmt.Printf("%d %s\n", i, e.ToJson())
|
||||
}
|
||||
if p.Structure[3].Desc != "" || p.Structure[3].Size != 42 {
|
||||
t.Log("Update field by Ref failed!")
|
||||
t.Fail()
|
||||
}
|
||||
}
|
||||
/*
|
||||
func TestUpdateFieldByName(t *testing.T) {
|
||||
p := GenerateStructure()
|
||||
f := NewField(
|
||||
"UpdatedField", "", "", 42, nil, false, true,
|
||||
)
|
||||
UpdateFieldByName(p, "testfield3", f)
|
||||
for i, e := range p.Structure {
|
||||
fmt.Printf("%d %s\n", i, e.ToJson())
|
||||
}
|
||||
if p.Structure[3].Desc != "" || p.Structure[3].Size != 42 {
|
||||
t.Log("Update field by Ref failed!")
|
||||
t.Fail()
|
||||
}
|
||||
} //
|
||||
*/
|
||||
func TestUpdateFieldByElement(t *testing.T) {
|
||||
p := GenerateStructure()
|
||||
f := NewField(
|
||||
|
@ -113,17 +115,19 @@ func TestUpdateFieldByElement(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func TestRemoveFieldByName(t *testing.T) {
|
||||
p := GenerateStructure()
|
||||
RemoveFieldByName(p, "testfield3")
|
||||
for i, e := range p.Structure {
|
||||
fmt.Printf("%d %s\n", i, e.ToJson())
|
||||
}
|
||||
if p.Structure[3].Name != "testfield4" {
|
||||
t.Log("Remove by name failed!")
|
||||
t.Fail()
|
||||
}
|
||||
}
|
||||
/*
|
||||
func TestRemoveFieldByName(t *testing.T) {
|
||||
p := GenerateStructure()
|
||||
RemoveFieldByName(p, "testfield3")
|
||||
for i, e := range p.Structure {
|
||||
fmt.Printf("%d %s\n", i, e.ToJson())
|
||||
}
|
||||
if p.Structure[3].Name != "testfield4" {
|
||||
t.Log("Remove by name failed!")
|
||||
t.Fail()
|
||||
}
|
||||
}//
|
||||
*/
|
||||
func TestRemoveFieldByElement(t *testing.T) {
|
||||
p := GenerateStructure()
|
||||
RemoveFieldByElement(p, 3)
|
||||
|
@ -131,7 +135,7 @@ func TestRemoveFieldByElement(t *testing.T) {
|
|||
fmt.Printf("%d %s\n", i, e.ToJson())
|
||||
}
|
||||
if p.Structure[3].Name != "testfield4" {
|
||||
t.Log("Remove by name failed!")
|
||||
t.Log("Remove by element failed!")
|
||||
t.Fail()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue