File tree Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Expand file tree Collapse file tree 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -107,6 +107,40 @@ final class TagBuilderTests: XCTestCase {
107107 """ )
108108 }
109109
110+ func testSingleGroupBuilder( ) {
111+ let doc = Document {
112+ Branch {
113+ [
114+ Leaf ( " Lorem ipsum " )
115+ ]
116+ }
117+ }
118+
119+ XCTAssertEqual ( DocumentRenderer ( ) . render ( doc) , """
120+ <branch>
121+ <leaf>Lorem ipsum</leaf>
122+ </branch>
123+ """ )
124+ }
125+
126+ func testMultiGroupBuilder( ) {
127+ let doc = Document {
128+ Branch {
129+ [
130+ Leaf ( " Lorem ipsum " ) ,
131+ Leaf ( " Dolor sit amet " ) ,
132+ ]
133+ }
134+ }
135+
136+ XCTAssertEqual ( DocumentRenderer ( ) . render ( doc) , """
137+ <branch>
138+ <leaf>Lorem ipsum</leaf>
139+ <leaf>Dolor sit amet</leaf>
140+ </branch>
141+ """ )
142+ }
143+
110144 func testGroupTagBuilderAndRenderer( ) {
111145 let doc = Document {
112146 Branch {
You can’t perform that action at this time.
0 commit comments