mirror of
https://github.com/unidoc/unioffice.git
synced 2025-04-25 13:48:53 +08:00
29 lines
675 B
Go
29 lines
675 B
Go
package presentation
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/unidoc/unioffice/schema/soo/pml"
|
|
)
|
|
|
|
func TestRemoveChoicesWithPics(t *testing.T) {
|
|
var choices []*pml.CT_GroupShapeChoice
|
|
var pics []*pml.CT_Picture
|
|
pics = append(pics, &pml.CT_Picture{})
|
|
choices = append(choices, pml.NewCT_GroupShapeChoice())
|
|
choices = append(choices, &pml.CT_GroupShapeChoice{
|
|
Pic: pics,
|
|
})
|
|
choices = append(choices, &pml.CT_GroupShapeChoice{
|
|
Pic: pics,
|
|
})
|
|
choices = append(choices, pml.NewCT_GroupShapeChoice())
|
|
|
|
choices = removeChoicesWithPics(choices)
|
|
for _, choice := range choices {
|
|
if len(choice.Pic) > 0 {
|
|
t.Fatal("expected to have removed all choices with pics")
|
|
}
|
|
}
|
|
}
|