Package randoop.test
Class ExtendGenerator
java.lang.Object
randoop.test.TestCheckGenerator
randoop.test.ExtendGenerator
This
TestCheckGenerator
combines two generators, using the invalid and failure checks
from the first, and, if none of those, then returning the output of the second.-
Field Summary
-
Constructor Summary
ConstructorDescriptionExtendGenerator
(TestCheckGenerator firstGenerator, TestCheckGenerator secondGenerator) Creates a check generator that generatesTestChecks
forExecutableSequence
objects using the twoTestCheckGenerator
objects. -
Method Summary
Modifier and TypeMethodDescriptionTestChecks<?>
Generate aTestChecks
object for the executed sequenceeseq
based on the criteria of this generator.boolean
hasGenerator
(Class<? extends TestCheckGenerator> genClass) Returns true if this generator contains a generator of the given class.
-
Field Details
-
firstGenerator
-
secondGenerator
-
-
Constructor Details
-
ExtendGenerator
Creates a check generator that generatesTestChecks
forExecutableSequence
objects using the twoTestCheckGenerator
objects. Returns checks produced by the second, unless the first produces checks that either have error or invalid behavior.- Parameters:
firstGenerator
- the visitor to identify error and invalid behaviors in the sequencesecondGenerator
- the visitor to identify other checks for the sequence
-
-
Method Details
-
generateTestChecks
Generate aTestChecks
object for the executed sequenceeseq
based on the criteria of this generator.Returns checks generated by the two
TestCheckGenerator
objects.- Specified by:
generateTestChecks
in classTestCheckGenerator
- Parameters:
eseq
- the sequence for which checks are generated- Returns:
- if the first generator generated invalid or error checks, return those; otherwise, return the checks object produced by the second generator
-
hasGenerator
Description copied from class:TestCheckGenerator
Returns true if this generator contains a generator of the given class.- Overrides:
hasGenerator
in classTestCheckGenerator
- Parameters:
genClass
- the generator class to search for in this- Returns:
- true iff this generator contains a generator of the given class
-