Skip to content

Commit

Permalink
test: use more messages from TestAllTypesProto3
Browse files Browse the repository at this point in the history
Also, remove more redundant tests
  • Loading branch information
ahamez committed Jan 9, 2025
1 parent c6d555c commit a4223fc
Show file tree
Hide file tree
Showing 7 changed files with 159 additions and 878 deletions.
8 changes: 4 additions & 4 deletions lib/protox/merge_message.ex
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ defmodule Protox.MergeMessage do
- both are `nil`: `nil` is returned
# Example
iex> r1 = %Protobuf2{a: 0, s: :ONE}
iex> r2 = %Protobuf2{a: nil, s: :TWO}
iex> r1 = %Protobuf2Message{a: 0, b: :ONE}
iex> r2 = %Protobuf2Message{a: nil, b: :TWO}
iex> Protox.MergeMessage.merge(r1, r2)
%Protobuf2{a: 0, s: :TWO}
%Protobuf2Message{a: 0, b: :TWO}
iex> Protox.MergeMessage.merge(r2, r1)
%Protobuf2{a: 0, s: :ONE}
%Protobuf2Message{a: 0, b: :ONE}
"""
@spec merge(struct() | nil, struct() | nil) :: struct() | nil
def merge(nil, from), do: from
Expand Down
Loading

0 comments on commit a4223fc

Please sign in to comment.