quality: Add test cases for openflow actions

This commit is contained in:
Eishun Kondoh 2019-04-22 20:47:52 +09:00
parent 84a827eea1
commit d2a6488f79
9 changed files with 112 additions and 22 deletions

View file

@ -18,7 +18,8 @@ defmodule Openflow.Action.NxMultipath do
alias __MODULE__
alias Openflow.Action.Experimenter
def new(options \\ []) do
@spec new(Keyword.t()) :: %NxMultipath{}
def new(options) do
dst_field = options[:dst_field] || raise "dst_field must be specified"
default_n_bits = Openflow.Match.Field.n_bits_of(dst_field)