EMMA Coverage Report (generated Tue Dec 18 20:38:46 CET 2007)
[all classes][cz.vutbr.feec.packets.rsi]

COVERAGE SUMMARY FOR SOURCE FILE [StatisticsBlockTest.java]

nameclass, %method, %block, %line, %
StatisticsBlockTest.java100% (1/1)100% (3/3)95%  (90/95)98%  (17,6/18)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class StatisticsBlockTest100% (1/1)100% (3/3)95%  (90/95)98%  (17,6/18)
test1 (int, StatisticsBlock, StatisticsBlock): void 100% (1/1)93%  (64/69)97%  (10,6/11)
StatisticsBlockTest (): void 100% (1/1)100% (7/7)100% (2/2)
testAll (): void 100% (1/1)100% (19/19)100% (5/5)

1package cz.vutbr.feec.packets.rsi;
2 
3import junit.framework.Assert;
4 
5import org.junit.Test;
6 
7import cz.vutbr.feec.packets.PacketException;
8 
9public class StatisticsBlockTest extends SubReportBlock {
10        byte[] buf = new byte[100];
11        
12        public void test1(int offset, StatisticsBlock g, StatisticsBlock r) throws PacketException {
13                
14                g.setMedianFractionLost(1 << 7);
15                g.setHighestCummulativeLost(1l << 23);
16                g.setMedianJitter(1l << 31);
17                
18                int pktLength = g.generate(buf, offset);
19                r.parse(buf, offset, pktLength);
20                
21                Assert.assertTrue(g.getHighestCummulativeLost() == r.getHighestCummulativeLost());
22                Assert.assertTrue(g.getLength() == r.getLength());
23                Assert.assertTrue(g.getLength() == 4*3);
24                Assert.assertTrue(g.getMedianFractionLost() == r.getMedianFractionLost());
25                Assert.assertTrue(g.getMedianJitter() == r.getMedianJitter());
26        }
27 
28        @Test
29        public void testAll() throws PacketException {
30                StatisticsBlock g = new StatisticsBlock();
31                StatisticsBlock r = new StatisticsBlock();
32                
33                test1(0, g, r);
34                test1(5, g, r);
35        }
36}

[all classes][cz.vutbr.feec.packets.rsi]
EMMA 2.0.5312 EclEmma Fix 1 (C) Vladimir Roubtsov