mirror of https://github.com/oxen-io/lokinet
Less invasive fix for Addr
parent
d3b248e004
commit
42a7bcd434
@ -1,10 +1,13 @@
|
||||
#include <net/net_addr.hpp>
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
TEST_CASE("Addr from_char_array", "[addr]")
|
||||
TEST_CASE("Addr FromString", "[addr]")
|
||||
{
|
||||
llarp::Addr addr;
|
||||
bool success = false;
|
||||
CHECK_NOTHROW(success = addr.from_char_array("127.0.0.1:53"));
|
||||
CHECK_NOTHROW(success = addr.FromString("127.0.0.1:53"));
|
||||
CHECK(success == true);
|
||||
|
||||
CHECK(addr.port() == 53);
|
||||
CHECK(addr.ToString() == "127.0.0.1:53");
|
||||
}
|
||||
|
Loading…
Reference in New Issue