## Make a dispatcher, and some mocked up listeners.
#
my ($d) = Net::Analysis::Dispatcher->new();
isnt ($d, undef, "new dispatcher");
my ($mock_listener_pkt) = mock_listener(qw(_internal_tcp_packet))
events our mocked object received
#
my ($el) = Net::Analysis::EventLoop->new (dispatcher => $d);
isnt ($el, undef, "EventLoop->new()");
$el->loop_file (filename => 't/t1_google.tcp');
my (@calls, $
her->new();
isnt ($d, undef, "new dispatcher");
#### Create a base listener, check that the dispatcher registers it
#
my ($l) = Net::Analysis::Listener::Base->new(dispatcher => $d);
isnt ($l, undef,
nalysis::Time') };
# Simple construction
my $t1 = Net::Analysis::Time->new (1100257189, 123456);
isnt ($t1, undef, 'create obj');
# getting the bits back
is_deeply (scalar($t1->numbers()), [11002571
A__
# ok ($this eq $that, $test_name);
# is ($this, $that, $test_name);
# isnt ($this, $that, $test_name);
# diag ("blah blah");
# like ($this, qr/that/,
C] = 1097432695;
$data->[PKT_SLOT_TV_USEC] = 123456;
my $pkt = [@$data];
$pkt = pkt_init($pkt);
isnt ($pkt, undef, "created packet");
like ($pkt->[PKT_SLOT_SOCKETPAIR_KEY], qr/$data->[PKT_SLOT_FROM
=> 2;
#########################
BEGIN { use_ok('Net::Analysis::Constants') };
# This is a bit pathetic, really.
use Net::Analysis::Constants qw(:all);
isnt (URG, undef, "URG is defined");
__END__
with them.
# Check the constructor constructs ...
my $mono = Net::Analysis::TCPMonologue->new();
isnt ($mono, undef, "TCPSession->new()");
is ("$mono", '[Mono undefined]', 'initial mono');
# Add the
st_event) = 'test_event';
#### Create a dispatcher
#
my ($d) = Net::Analysis::Dispatcher->new();
isnt ($d, undef, "new");
#### Add a mocked up listener, and check it gets added to the list
#
my ($m
on')
};
#### Check the constructor constructs ...
#
my $sesh = Net::Analysis::TCPSession->new();
isnt ($sesh, undef, "TCPSession->new()");
#### Validate our helper function reads in packets OK (red