Skip to content

Commit

Permalink
RandomInit: generation of repeated strings and bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
ahamez committed Jun 17, 2020
1 parent 34cc0f6 commit e1bcd48
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/random_init.exs
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,9 @@ defmodule Protox.RandomInit do
list(oneof(e.constants() |> Map.new() |> Map.values()))
end

defp get_gen(:unpacked, :string), do: list(utf8())
defp get_gen(:unpacked, :bytes), do: list(binary())

defp get_gen(:unpacked, {:message, sub_msg}) do
list(generate_fields(sub_msg))
end
Expand Down

0 comments on commit e1bcd48

Please sign in to comment.