org.hansel.probes
Class SelectProbe

java.lang.Object
  extended by org.hansel.Probe
      extended by org.hansel.probes.SelectProbe
All Implemented Interfaces:
junit.framework.Test

public class SelectProbe
extends Probe


Field Summary
 
Fields inherited from class org.hansel.Probe
HIT_CLASS
 
Constructor Summary
SelectProbe(ProbeData pd, int min, int max, org.objectweb.asm.Label dflt, org.objectweb.asm.Label[] labels)
           
SelectProbe(ProbeData pd, org.objectweb.asm.Label dflt, int[] keys, org.objectweb.asm.Label[] labels)
           
 
Method Summary
 boolean coverageFailure()
           
 boolean displayFailure()
          Return wether this probe failed to be covered.
 java.lang.String getFailureMessage()
          Return the filure message for this probe.
 void hit(int value)
           
 void insertProbeCode(org.objectweb.asm.MethodVisitor cv)
          Returns the code of the probe.
 
Methods inherited from class org.hansel.Probe
addResult, countTestCases, equals, getDescription, getID, getName, getProbeData, hashCode, run, run, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SelectProbe

public SelectProbe(ProbeData pd,
                   int min,
                   int max,
                   org.objectweb.asm.Label dflt,
                   org.objectweb.asm.Label[] labels)

SelectProbe

public SelectProbe(ProbeData pd,
                   org.objectweb.asm.Label dflt,
                   int[] keys,
                   org.objectweb.asm.Label[] labels)
Method Detail

getFailureMessage

public java.lang.String getFailureMessage()
Return the filure message for this probe.

Specified by:
getFailureMessage in class Probe
Returns:
Failure message.

displayFailure

public boolean displayFailure()
Return wether this probe failed to be covered. A probe for a conditional branch fails, if the branch is only taken, or only omitted. If both cases are encountered, the probe is fully covered. If the probe is not executed at all, this method still returns false, because in that case, another probe has to fail (otherwise this probe had been reached). Because the other failure is more important, the result of this probe is left out in this case.

Specified by:
displayFailure in class Probe
Returns:
true If covering this probe failed.

coverageFailure

public boolean coverageFailure()
Specified by:
coverageFailure in class Probe

hit

public void hit(int value)

insertProbeCode

public void insertProbeCode(org.objectweb.asm.MethodVisitor cv)
Description copied from class: Probe
Returns the code of the probe.

Specified by:
insertProbeCode in class Probe