Formatted
This commit is contained in:
parent
5fc01a9bec
commit
7635272fbd
150 changed files with 5055 additions and 4032 deletions
|
|
@ -6,8 +6,9 @@ defmodule OfpHelloTest do
|
|||
test "with OFP_HELLO packet" do
|
||||
{:ok, hello, ""} =
|
||||
"test/packet_data/ofp_hello.raw"
|
||||
|> File.read!
|
||||
|> Openflow.read
|
||||
|> File.read!()
|
||||
|> Openflow.read()
|
||||
|
||||
assert hello.version == 4
|
||||
assert hello.xid == 0
|
||||
assert hello.elements == [versionbitmap: [30, 10, 9, 3, 2, 1]]
|
||||
|
|
@ -17,9 +18,11 @@ defmodule OfpHelloTest do
|
|||
describe "Openflow.to_binary/1" do
|
||||
test "with %Openflow.Hello{}" do
|
||||
hello = Openflow.Hello.new([30, 10, 9, 3, 2, 1])
|
||||
|
||||
expect =
|
||||
"test/packet_data/ofp_hello.raw"
|
||||
|> File.read!
|
||||
|> File.read!()
|
||||
|
||||
assert Openflow.to_binary(hello) == expect
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue