Skip to content

Commit daa8aaa

Browse files
authored
No true branch test is generated for code with String.split(";\\s") #885 (#914)
1 parent 463a152 commit daa8aaa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

utbot-fuzzers/src/main/kotlin/org/utbot/fuzzer/providers/RegexModelProvider.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,10 @@ object RegexModelProvider : ModelProvider {
5656

5757
private fun FuzzedContext.isPatterMatchingContext(): Boolean {
5858
if (this !is FuzzedContext.Call) return false
59+
val stringMethodWithRegexArguments = setOf("matches", "split")
5960
return when {
6061
method.classId == Pattern::class.java.id -> true
61-
method.classId == String::class.java.id && method.name == "matches" -> true
62+
method.classId == String::class.java.id && stringMethodWithRegexArguments.contains(method.name) -> true
6263
else -> false
6364
}
6465
}

0 commit comments

Comments
 (0)