randoop
Class NoExceptionCheck

Object
  extended by NoExceptionCheck
All Implemented Interfaces:
Serializable, Check

public class NoExceptionCheck
extends Object
implements Check

Checks that no exception is thrown after a given statement in a sequence.

See Also:
Serialized Form

Constructor Summary
Constructor and Description
NoExceptionCheck(int statementIdx)
           
 
Method Summary
Modifier and Type Method and Description
 boolean equals(Object o)
           
 boolean evaluate(Execution execution)
          Evaluates this check on the given unfolding execution of a sequence, returning true if the check succeeded, and false otherwise.
 String get_id()
          Returns a unique string identifier for the check.
 int get_stmt_no()
          Returns the offset in the sequence of this check
 String get_value()
          Returns a short string that can be used to uniquely identify this check.
 int hashCode()
           
 String toCodeStringPostStatement()
          Returns the empty string: there is no code associated with this check (if an exception occurs, it will be reported by JUnit).
 String toCodeStringPreStatement()
          Returns a string of Java source code to be emitted before a statement containing this check.
 
Methods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NoExceptionCheck

public NoExceptionCheck(int statementIdx)
Method Detail

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

get_value

public String get_value()
Description copied from interface: Check
Returns a short string that can be used to uniquely identify this check.

Specified by:
get_value in interface Check

get_stmt_no

public int get_stmt_no()
Description copied from interface: Check
Returns the offset in the sequence of this check

Specified by:
get_stmt_no in interface Check

get_id

public String get_id()
Description copied from interface: Check
Returns a unique string identifier for the check. Two checks are the same if these identifers match. The value is NOT included. with. Used to match up checks between the same sequence run at different times. Note that because of changes in the environment (eg, static variables), two executions of the same sequence may have different checks (because the existence of some checks depends on the value of variables)

Specified by:
get_id in interface Check

toCodeStringPostStatement

public String toCodeStringPostStatement()
Returns the empty string: there is no code associated with this check (if an exception occurs, it will be reported by JUnit).

Specified by:
toCodeStringPostStatement in interface Check

toCodeStringPreStatement

public String toCodeStringPreStatement()
Description copied from interface: Check
Returns a string of Java source code to be emitted before a statement containing this check.

Specified by:
toCodeStringPreStatement in interface Check

evaluate

public boolean evaluate(Execution execution)
Description copied from interface: Check
Evaluates this check on the given unfolding execution of a sequence, returning true if the check succeeded, and false otherwise.

Specified by:
evaluate in interface Check