-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace
nullFuzzedValue
with primitive-aware defaultFuzzedValue
- Loading branch information
1 parent
b67debe
commit ebe06b4
Showing
6 changed files
with
16 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 5 additions & 5 deletions
10
utbot-java-fuzzing/src/main/kotlin/org/utbot/fuzzing/providers/Utils.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,14 @@ | ||
package org.utbot.fuzzing.providers | ||
|
||
import org.utbot.framework.plugin.api.ClassId | ||
import org.utbot.framework.plugin.api.UtNullModel | ||
import org.utbot.framework.plugin.api.util.defaultValueModel | ||
import org.utbot.fuzzer.FuzzedType | ||
import org.utbot.fuzzer.FuzzedValue | ||
import org.utbot.fuzzer.fuzzed | ||
import org.utbot.fuzzing.Routine | ||
|
||
fun nullRoutine(classId: ClassId): Routine.Empty<FuzzedType, FuzzedValue> = | ||
Routine.Empty { nullFuzzedValue(classId) } | ||
fun defaultValueRoutine(classId: ClassId): Routine.Empty<FuzzedType, FuzzedValue> = | ||
Routine.Empty { defaultFuzzedValue(classId) } | ||
|
||
fun nullFuzzedValue(classId: ClassId): FuzzedValue = | ||
UtNullModel(classId).fuzzed { summary = "%var% = null" } | ||
fun defaultFuzzedValue(classId: ClassId): FuzzedValue = | ||
classId.defaultValueModel().fuzzed { summary = "%var% = $model" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters