Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 18 lines (15 sloc) 0.615 kB
8b613a6 @ates Add tests. Cosmetic changes.
ates authored
1 -module(pkt_tests).
2
3 -include("pkt.hrl").
4 -include("pkt_tests.hrl").
5 -include_lib("eunit/include/eunit.hrl").
6
7 sctp_test() ->
8 {SCTP, []} = pkt:sctp(?SCTP_PACKET),
a597e56 @ates Update tests
ates authored
9 {SCTP1, []} = pkt:sctp(?SCTP_PACKET_WITH_PADDING),
8b613a6 @ates Add tests. Cosmetic changes.
ates authored
10 Chunk = erlang:hd(SCTP#sctp.chunks),
a597e56 @ates Update tests
ates authored
11 Chunk1 = erlang:hd(SCTP1#sctp.chunks),
12 ?assertEqual(SCTP#sctp.sport, 7),
13 ?assertEqual(SCTP1#sctp.dport, 32837),
14 ?assertEqual(Chunk#sctp_chunk.type, 1),
15 ?assertEqual(byte_size(Chunk#sctp_chunk.payload), 28),
16 ?assertEqual(length(SCTP1#sctp.chunks), 1),
17 ?assertEqual(Chunk1#sctp_chunk.payload#sctp_chunk_data.tsn, 2860946939).
Something went wrong with that request. Please try again.