Package net.sourceforge.cobertura.coveragedata

Examples of net.sourceforge.cobertura.coveragedata.JumpData


                                            .getNumberOfValidBranches() - 1; j++) {
                                        result.add(sd.getHits(j));
                                    }
                                    result.add(sd.getDefaultHits());
                                } else {
                                    JumpData jd = (JumpData) xcd;
                                    result.add(jd.getTrueHits());
                                    result.add(jd.getFalseHits());
                                }
                            }
                        }
                        return result;
                    }
View Full Code Here


                        + lld.getLineNumber() + " of " + larger.getName());
            }
            for (int i = 0; i < lld.getConditionSize(); i++) {
                Object cd = lld.getConditionData(i);
                if (cd instanceof JumpData) {
                    JumpData ljd = (JumpData) cd;
                    result.addLineJump(lld.getLineNumber(), i);
                    long prevTrue = 0;
                    long prevFalse = 0;
                    if (smaller != null) {
                        LineData sld = smaller.getLineCoverage(lld
                                .getLineNumber());
                        if (sld != null) {
                            JumpData sjd = (JumpData) sld.getConditionData(i);
                            if (sjd != null) {
                                prevTrue = sjd.getTrueHits();
                                prevFalse = sjd.getFalseHits();
                            } else {
                                errors.add("Somehow, JumpData null at condition "
                                        + i + " on line " + lld.getLineNumber());
                            }
                        }
View Full Code Here

        for (int i = 0; i < 2; i++) {
            LineData x = foo.getLineCoverage(i);
            assertEquals(x.getHits(), 1);
            assertEquals(x.hasBranch(), i == 1);
            if (x.hasBranch()) {
                JumpData jd = (JumpData) x.getConditionData(0);
                assertEquals(jd.getTrueHits(), 1);
                assertEquals(jd.getFalseHits(), 1);
            }
        }
        assertEquals(foo.getLineCoverage(2).getHits(), 0);
        ClassData bar = diff.getClassData("bar");
        assertEquals(3, bar.getLines().size());
View Full Code Here

TOP

Related Classes of net.sourceforge.cobertura.coveragedata.JumpData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.