add tests

This commit is contained in:
Guillaume Tassery 2020-02-12 12:08:14 +01:00
parent b9954f6785
commit 46bffd0564
2 changed files with 47 additions and 0 deletions

View File

@ -0,0 +1,40 @@
2001:db8:85a3::
2001:db8:85a3::
2001:db8:85a3::
2001:db8:85a3::
2001:db8:85a3::
2001:db8:85a3::
2001:db8:85a3::
2001:db8:85a3::
2001:db8:85a3::
2001:db8:85a3::
2001:db8:85a3::
2001:db8:85a3::
2001:db8:85a3::
2001:db8:85a3::
2001:db8:85a3::
2001:db8:85a3::
2001:db8:85a3::
2001:db8:85a3::
2001:db8:85a3::
2001:db8:85a3::
2001:db8:85a3::
2001:db8:85a3::
2001:db8:85a3::
2001:db8:85a3::
2001:db8:85a3::
2001:db8:85a3::
2001:db8:85a3::
2001:db8:85a3::
2001:db8:85a3::
2001:db8:85a3::
2001:db8:85a3::
2001:db8:85a3::
2001:db8:85a3::
2001:db8:85a3::
2001:db8:85a3::
2001:db8:85a3::
2001:db8:85a3::
2001:db8:85a3::
2001:db8:85a3::
2001:db8:85a3::

View File

@ -0,0 +1,7 @@
SELECT IPv6NumToString(bitAnd(IPv6StringToNum('2001:0db8:85a3:8d3a:b2da:8a2e:0370:7334'), IPv6StringToNum('ffff:ffff:ffff:0000:0000:0000:0000:0000'))) FROM system.numbers LIMIT 10;
SELECT IPv6NumToString(bitAnd(materialize(IPv6StringToNum('2001:0db8:85a3:8d3a:b2da:8a2e:0370:7334')), IPv6StringToNum('ffff:ffff:ffff:0000:0000:0000:0000:0000'))) FROM system.numbers LIMIT 10;
SELECT IPv6NumToString(bitAnd(IPv6StringToNum('2001:0db8:85a3:8d3a:b2da:8a2e:0370:7334'), materialize(IPv6StringToNum('ffff:ffff:ffff:0000:0000:0000:0000:0000')))) FROM system.numbers LIMIT 10;
SELECT IPv6NumToString(bitAnd(IPv6StringToNum('2001:0db8:85a3:8d3a:b2da:8a2e:0370:7334'), materialize(IPv6StringToNum('ffff:ffff:ffff:0000:0000:0000:0000:0000')))) FROM system.numbers LIMIT 10;