blob: e5c68bf402c2994ce0b1dd59ddf8b7ac25add526 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#include <library/cpp/testing/unittest/registar.h>
#include "netaddr.h"
#include "test_utils.h"
using namespace NBus;
Y_UNIT_TEST_SUITE(TNetAddr) {
Y_UNIT_TEST(ResolveIpv4) {
ASSUME_IP_V4_ENABLED;
UNIT_ASSERT(TNetAddr("ns1.yandex.ru", 80, EIP_VERSION_4).IsIpv4());
}
Y_UNIT_TEST(ResolveIpv6) {
UNIT_ASSERT(TNetAddr("ns1.yandex.ru", 80, EIP_VERSION_6).IsIpv6());
}
Y_UNIT_TEST(ResolveAny) {
TNetAddr("ns1.yandex.ru", 80, EIP_VERSION_ANY);
}
}
|