mirror of
https://github.com/fumiama/go-docx.git
synced 2026-06-05 07:40:24 +08:00
New way of marshalling
This commit is contained in:
@@ -19,7 +19,7 @@ func TestStructure(t *testing.T) {
|
||||
decoded_doc)
|
||||
}
|
||||
if len(doc.Body.Paragraphs) != NUM_PARAGRAPHS {
|
||||
t.Errorf("We expected %d paragraph, we got %d",
|
||||
t.Errorf("We expected %d paragraphs, we got %d",
|
||||
NUM_PARAGRAPHS, len(doc.Body.Paragraphs))
|
||||
}
|
||||
for _, p := range doc.Body.Paragraphs {
|
||||
@@ -27,5 +27,10 @@ func TestStructure(t *testing.T) {
|
||||
t.Errorf("We were not able to parse paragraph %v",
|
||||
p)
|
||||
}
|
||||
for _, child := range p.Children() {
|
||||
if child.Link == nil && child.Properties == nil && child.Run == nil {
|
||||
t.Errorf("There are children with all fields nil")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user