quality: Add test cases for get_async messages

This commit is contained in:
Eishun Kondoh 2019-04-28 14:00:44 +09:00
parent 42dd435b63
commit c592d9f7c5
8 changed files with 458 additions and 33 deletions

View file

@ -10,17 +10,22 @@ defmodule Openflow.GetAsync.Request do
alias __MODULE__
@type t :: %Request{
version: 4,
xid: 0..0xFFFFFFFF,
datapath_id: String.t() | nil,
aux_id: 0..0xF | nil
}
@spec ofp_type() :: 26
def ofp_type, do: 26
def new(xid \\ 0) do
%Request{xid: xid}
end
@spec new(xid :: 0..0xFFFFFFFF) :: t()
def new(xid \\ 0), do: %Request{xid: xid}
def read(_) do
%Request{}
end
@spec read(any()) :: t()
def read(_), do: %Request{}
def to_binary(%Request{}) do
<<>>
end
@spec to_binary(t()) :: <<>>
def to_binary(%Request{}), do: <<>>
end