File tree Expand file tree Collapse file tree 3 files changed +4
-4
lines changed
examples/junit/src/test/java/com/example
src/main/java/com/code_intelligence/jazzer/junit Expand file tree Collapse file tree 3 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 2121import static java .util .Collections .unmodifiableList ;
2222
2323import com .code_intelligence .jazzer .junit .FuzzTest ;
24+ import com .code_intelligence .jazzer .junit .Lifecycle ;
2425import com .example .PerExecutionLifecycleFuzzTest .LifecycleCallbacks1 ;
2526import com .example .PerExecutionLifecycleFuzzTest .LifecycleCallbacks2 ;
2627import com .example .PerExecutionLifecycleFuzzTest .LifecycleCallbacks3 ;
@@ -79,7 +80,7 @@ void disabledFuzz(byte[] data) {
7980 throw new AssertionError ("This test should not be executed" );
8081 }
8182
82- @ FuzzTest (maxExecutions = RUNS )
83+ @ FuzzTest (maxExecutions = RUNS , lifecycle = Lifecycle . PER_EXECUTION )
8384 void lifecycleFuzz (byte [] data ) {
8485 events .add ("lifecycleFuzz" );
8586 assertThat (beforeEachCalledOnInstance ).isTrue ();
Original file line number Diff line number Diff line change 2121import static java .util .Collections .unmodifiableList ;
2222
2323import com .code_intelligence .jazzer .junit .FuzzTest ;
24- import com .code_intelligence .jazzer .junit .Lifecycle ;
2524import com .example .PerTestLifecycleFuzzTest .LifecycleCallbacks1 ;
2625import com .example .PerTestLifecycleFuzzTest .LifecycleCallbacks2 ;
2726import com .example .PerTestLifecycleFuzzTest .LifecycleCallbacks3 ;
@@ -80,7 +79,7 @@ void disabledFuzz(byte[] data) {
8079 throw new AssertionError ("This test should not be executed" );
8180 }
8281
83- @ FuzzTest (maxExecutions = RUNS , lifecycle = Lifecycle . PER_TEST )
82+ @ FuzzTest (maxExecutions = RUNS )
8483 void lifecycleFuzz (byte [] data ) {
8584 events .add ("lifecycleFuzz" );
8685 assertThat (beforeEachCalledOnInstance ).isTrue ();
Original file line number Diff line number Diff line change 131131 * <p>During regression testing, fuzz tests always go through the full JUnit lifecycle for every
132132 * execution regardless of the value of this option.
133133 */
134- Lifecycle lifecycle () default Lifecycle .PER_EXECUTION ;
134+ Lifecycle lifecycle () default Lifecycle .PER_TEST ;
135135}
136136
137137// Internal use only.
You can’t perform that action at this time.
0 commit comments