Include/test2.pl untested

filter: Statementstmt 0.0% 0 / 21 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod n/a totaltotal 0.0% 0 / 25 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 use C::Include qw/test.h -cache/;
2 use hiew;
3 use vars qw/$node $buffer/;
4 use strict;
5  
6 # Make struct instance
7 $node = INC->make_struct('Node');
8  
9 # Fill struct fields
10 $$node{name} = 'Albert Michauer';
11 $$node{addr}{zone} = 2;
12 $$node{addr}{net} = 5049;
13 $$node{addr}{node} = 80;
14 $$node{flags}{passive} = 1;
15 $$node{flags}{umlautnet} = 1;
16  
17 # Pack struct to buffer
18 $buffer = $node->pack();
19  
20 # Print buffer to STDOUT
21 hiew( $buffer );