diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2018-07-19 22:13:19 +0200 |
---|---|---|
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2018-07-20 14:02:21 +0000 |
commit | 59f4caf4efcbd76478cdd2a1d800c0978144c5ba (patch) | |
tree | 626d8264eb9c36ebcca261c2d9ff7b99b4abbd8b /tests/utils/utils_test.ok | |
parent | 1504211fdcceb86bb76c19564e8b0b72a7cc2f6f (diff) |
add osmo_sockaddr_to_str_and_uint()
This came from osmo-bsc refactoring patch I82e3f918295daa83274a4cf803f046979f284366
https://gerrit.osmocom.org/#/c/osmo-bsc/+/9671/6/src/osmo-bsc/gsm_data.c@1708
Add regression test in utils_test.c.
Change-Id: I1f2918418c38918c5ac70acaa51a47adfca12b5e
Diffstat (limited to 'tests/utils/utils_test.ok')
-rw-r--r-- | tests/utils/utils_test.ok | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/utils/utils_test.ok b/tests/utils/utils_test.ok index ea9216f0..b158bf7b 100644 --- a/tests/utils/utils_test.ok +++ b/tests/utils/utils_test.ok @@ -139,3 +139,13 @@ NOT passed through. '"printable"' 'NULL' Testing integer square-root + +osmo_sockaddr_to_str_and_uint_test +[0] 0.0.0.0:0 addr_len=20 --> 0.0.0.0:0 rc=7 +[1] 255.255.255.255:65535 addr_len=20 --> 255.255.255.255:65535 rc=15 +[2] 234.23.42.123:1234 addr_len=20 --> 234.23.42.123:1234 rc=13 +[3] 234.23.42.123:1234 addr_len=10 --> 234.23.42:1234 rc=13 +[4] 234.23.42.123:1234 (omit port) addr_len=20 --> 234.23.42.123:0 rc=13 +[5] 234.23.42.123:1234 (omit addr) addr_len=0 --> :1234 rc=0 +[6] 234.23.42.123:1234 addr_len=0 --> :1234 rc=13 +[7] 234.23.42.123:1234 (omit addr) (omit port) addr_len=0 --> :0 rc=0 |