tres: Removed unused modules

This commit is contained in:
Eishun Kondoh 2019-06-05 00:14:26 +09:00
parent 289a705fa3
commit 04fb4ffa52
4 changed files with 0 additions and 277 deletions

View file

@ -1,17 +0,0 @@
defmodule IPv4AddressTest do
use ExUnit.Case, async: false
describe "IPv4Address.parse/1" do
test "with host(/32) address string" do
expect = {{192, 168, 10, 1}, {255, 255, 255, 255}}
ipaddr = "192.168.10.1"
assert Tres.IPv4Address.parse(ipaddr) == expect
end
test "with network(/24) address string" do
expect = {{192, 168, 10, 0}, {255, 255, 255, 0}}
ipaddr = "192.168.10.0/24"
assert Tres.IPv4Address.parse(ipaddr) == expect
end
end
end

View file

@ -1,53 +0,0 @@
defmodule MacAddressTest do
use ExUnit.Case, async: false
describe "MacAddr.bin_to_str/1" do
test "with 48 bit binary" do
mac_bin = <<0x11, 0x22, 0x33, 0x44, 0x55, 0x66>>
assert Tres.MacAddress.bin_to_str(mac_bin) == "112233445566"
end
end
describe "MacAddr.to_a/1" do
test "with String" do
expect = [0x11, 0x22, 0x33, 0x44, 0x55, 0x66]
assert Tres.MacAddress.to_a("112233445566") == expect
end
end
describe "MacAddr.to_i/1" do
test "with String" do
expect = 0x112233445566
assert Tres.MacAddress.to_i("112233445566") == expect
end
end
describe "MacAddr.broadcast?/1" do
test "with unicast" do
mac = "0e2ecad87537"
refute Tres.MacAddress.is_broadcast?(mac)
end
test "with bcast" do
mac = "ffffffffffff"
assert Tres.MacAddress.is_broadcast?(mac)
end
end
describe "MacAddr.multicast?/1" do
test "with unicast" do
mac = "0e2ecad87537"
refute Tres.MacAddress.is_multicast?(mac)
end
test "with bcast" do
mac = "ffffffffffff"
assert Tres.MacAddress.is_multicast?(mac)
end
test "with mcast" do
mac = "ffffffffffff"
assert Tres.MacAddress.is_multicast?(mac)
end
end
end