Skip to content

Avoid incorrect warning about the Destination package #1977

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ private fun processInitialWarnings(report: TestsGenerationReport, params: Genera
}

private fun destinationWarningMessage(testPackageName: String?, classUnderTestPackageName: String): String? {
return if (classUnderTestPackageName != testPackageName) {
return if (!testPackageName.isNullOrEmpty() && classUnderTestPackageName != testPackageName) {
"""
Warning: Destination package $testPackageName does not match package of the class $classUnderTestPackageName.
This may cause unnecessary usage of reflection for protected or package-private fields and methods access.
Expand Down