File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -8,10 +8,20 @@ defmodule Mudbrick.ParseRoundtripTest do
8
8
alias Mudbrick.Parser
9
9
10
10
property "documents" do
11
- check all document_options <- list_of ( document_option ( ) ) , max_runs: 20 do
12
- input =
11
+ check all document_options <- document_options ( ) ,
12
+ pages_options <- list_of ( page_options ( ) ) ,
13
+ max_runs: 20 do
14
+ doc =
13
15
document_options
14
16
|> new ( )
17
+
18
+ pages_options
19
+ |> Enum . reduce ( doc , fn options , context ->
20
+ page ( context , options )
21
+ end )
22
+
23
+ input =
24
+ doc
15
25
|> render ( )
16
26
17
27
parsed =
Original file line number Diff line number Diff line change @@ -168,6 +168,13 @@ defmodule Mudbrick.TestHelper do
168
168
options |> Map . new ( ) |> Enum . into ( [ ] )
169
169
end
170
170
end
171
+
172
+ def page_options do
173
+ optional_map ( % {
174
+ size: { float ( ) , float ( ) }
175
+ } )
176
+ |> map ( & Map . to_list / 1 )
177
+ end
171
178
end
172
179
173
180
ExUnit . start ( )
You can’t perform that action at this time.
0 commit comments