]> gitweb.factorcode.org Git - factor.git/blob - extra/bittorrent/bittorrent-tests.factor
Reformat
[factor.git] / extra / bittorrent / bittorrent-tests.factor
1 USING: bittorrent sequences io.sockets tools.test ;
2
3
4 { { t f t t f t f t } } [
5     8 <iota> [ B{ 0b10110101 } check-bitfield ] map
6 ] unit-test
7
8 {
9     {
10         T{ inet4 { host "127.0.0.1" } { port 80 } }
11         T{ inet4 { host "1.1.1.1" } { port 443 } }
12     }
13 } [
14     B{ 127 0 0 1 0x00 0x50 1 1 1 1 0x01 0xbb } parse-peer4s
15 ] unit-test