Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Python and JS support #1197#1199

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
tamarinvs19 merged 112 commits intomainfromtamarinvs19/UnitTestBot_Family_PR
Nov 9, 2022
Merged
Show file tree
Hide file tree
Changes from1 commit
Commits
Show all changes
112 commits
Select commitHold shift + click to select a range
9fcf5c0
UTBotFamily
denis-fokinOct 5, 2022
eee8f85
Add CodeGenLanguage.id
tamarinvs19Oct 5, 2022
08ccb65
Update Renderers
tamarinvs19Oct 5, 2022
301f2d5
Move codeGenLanguage to CgRenderContext
tamarinvs19Oct 5, 2022
ddc57d9
Add init to CodeLanguage
tamarinvs19Oct 5, 2022
8086a63
UTBotFamily
denis-fokinOct 5, 2022
0708155
Fix after merge bugs
tamarinvs19Oct 5, 2022
64ade72
Fix bug with variableConstructors and remove ExecutionStateAnalyzer from
tamarinvs19Oct 6, 2022
50c9a57
Update generated_tests__dicts
tamarinvs19Oct 6, 2022
6a6a337
Change targetCompatibility verstion
tamarinvs19Oct 6, 2022
9e9725c
Refactor js
tamarinvs19Oct 6, 2022
8a53d09
Fix PycharmUltimate code and uncomment js
tamarinvs19Oct 6, 2022
8abe0b7
Fix Windows symbols problem
tamarinvs19Oct 6, 2022
542aeae
Disable runIde tasks in modules where we need only Idea sdk dependencies
denis-fokinOct 6, 2022
ee45191
Merge actual UTBot Go, set up and fix its CLI
GlebSolovevOct 4, 2022
e44813d
Improve requirements description for UTBot Go
GlebSolovevOct 4, 2022
a3ad833
Merge UTBot Go IntelliJ plugin support
tamarinvs19Oct 7, 2022
a7b8d25
Fix Go
tamarinvs19Oct 7, 2022
8def007
New file chooser in Python plugin
tochilinakOct 7, 2022
0af38e8
Fixed bug in Python cli
tochilinakOct 7, 2022
14ff580
Refactored Slava's CodegenLanguage
zishkazOct 7, 2022
d8328e2
disable go runIde
MarkoutteOct 10, 2022
8a91164
Change "\\" to File.separator
tamarinvs19Oct 10, 2022
14ccaf6
Add relation sys.path support
tamarinvs19Oct 10, 2022
894707b
Change cli result output
tamarinvs19Oct 10, 2022
78e8f9d
[WIP] Linux cmd possible fix
rudolf101Oct 11, 2022
99c5d8b
[WIP] universal JsCmdExec implementation
zishkazOct 14, 2022
e6b0168
Moved OsProvider for a wider access scope
zishkazOct 14, 2022
299452d
Getting node and npm from IDEA settings
zishkazOct 14, 2022
ba23868
JsDynamicSettings added
zishkazOct 14, 2022
4b3fb14
[WIP] Added nyc path field to dialog window
rudolf101Oct 14, 2022
079e8d0
New js coverage algo implementation
zishkazOct 16, 2022
319bc54
Added nyc path field into dialog window
rudolf101Oct 17, 2022
54f079c
Update samples
tamarinvs19Oct 17, 2022
ff1b093
Added replace separator in Nyc validation
rudolf101Oct 18, 2022
9ed03f0
Added new options to js CLI and fixed exports managers
zishkazOct 18, 2022
074d0d1
Fix after rebase problems
tamarinvs19Oct 19, 2022
b11718f
Fixed js samples and help tips in js CLI
zishkazOct 19, 2022
18f514f
Fixed js exports managers regexes
zishkazOct 19, 2022
eae8efe
Move language-specific UtModels to utbo-<lang> and remove CodegenLang…
tamarinvs19Oct 20, 2022
d99deb9
Fix cli bug
tamarinvs19Oct 20, 2022
e74317f
Simle style fix
tamarinvs19Oct 20, 2022
3887c93
Moved test directory chooser to ui-commons and fixed graal error
zishkazOct 20, 2022
1247455
Removing go from pr branch
zishkazOct 24, 2022
037098f
Added gitignore file for js samples
zishkazOct 24, 2022
97f4d6a
Fix changes
tamarinvs19Oct 24, 2022
7688990
Fix testClassName bug
tamarinvs19Oct 25, 2022
29180b9
Rebase FileUtil.kt onto main
tamarinvs19Oct 26, 2022
3129d70
Rebase files onto main
tamarinvs19Oct 26, 2022
0152df5
Remove internal UtilMethodProvider
tamarinvs19Oct 26, 2022
84ec8fc
Rebase onto main
tamarinvs19Oct 26, 2022
b24caf9
Update language settings
tamarinvs19Oct 26, 2022
fc52711
Merge branch 'main' into tamarinvs19/UnitTestBot_Family_PR
tamarinvs19Oct 26, 2022
52085ec
Update gradle files
tamarinvs19Oct 26, 2022
eba7d57
Fix js npm path and nyc validator for linux
tamarinvs19Oct 26, 2022
be1adc7
Add conditions for ideType
tamarinvs19Oct 26, 2022
f997039
Merge branch 'main' into tamarinvs19/UnitTestBot_Family_PR
tamarinvs19Oct 26, 2022
9e0b25a
Update ide settings
tamarinvs19Oct 26, 2022
83a9dcd
Add docs page about IDE
tamarinvs19Oct 26, 2022
fcca3bf
Add docs link
tamarinvs19Oct 26, 2022
f21a1cb
Fix Coverage error
tamarinvs19Oct 26, 2022
2d7d817
Merge branch 'main' into tamarinvs19/UnitTestBot_Family_PR
tamarinvs19Oct 26, 2022
05af2c5
Rebase onto main
tamarinvs19Oct 26, 2022
68c5d7d
Merge branch 'main' into tamarinvs19/UnitTestBot_Family_PR
tamarinvs19Oct 26, 2022
92f6f72
Rebase onto main
tamarinvs19Oct 26, 2022
55c278b
Merge branch 'main' into tamarinvs19/UnitTestBot_Family_PR
tamarinvs19Oct 27, 2022
1f1b016
Rebase onto main
tamarinvs19Oct 27, 2022
1d5b379
Make GgGetClass sealed
tamarinvs19Oct 27, 2022
3d98f82
Fix deprecated showYesNoDialog and ProjectFileIndex.SERVICE
tamarinvs19Oct 27, 2022
dc242fe
Change IU to IC
tamarinvs19Oct 27, 2022
bdd4442
Remove open from ClassId.elementClassId
tamarinvs19Oct 27, 2022
c7b69a1
Code style refactoring
tamarinvs19Oct 27, 2022
4432359
Add file with changes description
tamarinvs19Oct 27, 2022
284928b
Update gitignores
tamarinvs19Oct 27, 2022
7ee92d1
Remove com.jetbrains.intellij.idea:ideaIC dependency
tamarinvs19Oct 27, 2022
67b9fe0
Change IU to IC
tamarinvs19Oct 27, 2022
6d9522a
Added coverage mode buttons | JS
rudolf101Oct 27, 2022
54faab1
Update CLI docs
rudolf101Oct 28, 2022
5a50a55
Fixed JS basic coverage service algo
zishkazOct 28, 2022
60e96e9
Fixes JsConstantsModelProvider after master merge
zishkazOct 28, 2022
972607e
Removed unnecessary check for Mocha framework that failed in built pl…
zishkazOct 28, 2022
05d7b4e
Removed lateinit modifier
zishkazOct 28, 2022
f578890
Removed export statements from js samples
zishkazOct 28, 2022
f8f064a
Merge branch 'tamarinvs19/UnitTestBot_Family_PR' of https://github.co…
zishkazOct 28, 2022
aa4c1a8
Fix in Python CLI
tochilinakOct 28, 2022
3409678
JS cli naming fix
zishkazOct 31, 2022
289b6b9
Rename python cli class
tamarinvs19Oct 31, 2022
5f205e3
Move comment line in CodeGeneratorResult
tamarinvs19Oct 31, 2022
ec8f1dd
Remove jClass from python/js branch
tamarinvs19Oct 31, 2022
d66c1ba
Merge branch 'main' into tamarinvs19/UnitTestBot_Family_PR
tamarinvs19Oct 31, 2022
6295f85
Reworked text annotations in Mocha object
zishkazOct 31, 2022
1781fa8
Merge remote-tracking branch 'origin/tamarinvs19/UnitTestBot_Family_P…
zishkazOct 31, 2022
d53325b
Remove soot dependency from utbot-python and implement new CgRender m…
tamarinvs19Oct 31, 2022
18acd32
Merge remote-tracking branch 'origin/tamarinvs19/UnitTestBot_Family_P…
tamarinvs19Oct 31, 2022
2385dc6
Used withUtContext in JsTestGenerator and reworked Mocha TestFramewor…
zishkazOct 31, 2022
20e416a
Locally fixed explicit File.separator replacements
zishkazOct 31, 2022
6dff767
Removed unnecessary catch
rudolf101Nov 1, 2022
766616c
Fix weak comments
rudolf101Nov 1, 2022
58415b3
Removed unnecessary try catch
rudolf101Nov 1, 2022
f73d3fd
Merge branch 'main' into tamarinvs19/UnitTestBot_Family_PR
tamarinvs19Nov 2, 2022
5c9e7fb
Fix CgRenderer bugs after merge
tamarinvs19Nov 2, 2022
a8d4d92
Merge branch 'main' into tamarinvs19/UnitTestBot_Family_PR
tamarinvs19Nov 2, 2022
0b66cab
Add README.md to utbot-python-cli
tamarinvs19Nov 2, 2022
7a8893c
Merge branch 'main' into tamarinvs19/UnitTestBot_Family_PR
tamarinvs19Nov 3, 2022
98ac84a
JS code refactoring
zishkazNov 3, 2022
d0815c8
Merge remote-tracking branch 'origin/tamarinvs19/UnitTestBot_Family_P…
zishkazNov 3, 2022
7e16b66
Removed unnecessary JS file parsing
zishkazNov 7, 2022
dcfa7eb
Refactor utbot-intellij-python
tamarinvs19Nov 7, 2022
a781aa9
Refactor utbot-python
tamarinvs19Nov 7, 2022
9074ed2
Fix "Language <> is disabled" problem from Issue #1329
tamarinvs19Nov 9, 2022
f9698b3
Merge branch 'main' into tamarinvs19/UnitTestBot_Family_PR
tamarinvs19Nov 9, 2022
37c9564
Change GenerateTestsModel to BaseTestsModel
tamarinvs19Nov 9, 2022
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
PrevPrevious commit
NextNext commit
UTBotFamily
  • Loading branch information
@denis-fokin@tamarinvs19
denis-fokin authored andtamarinvs19 committedOct 19, 2022
commit8086a6317886115051ce4f1a939b54ae6e2b56fe
2 changes: 1 addition & 1 deletion.gitignore
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,5 +7,5 @@ target/
.idea/
.gradle/
*.log
*.rdgen
__pycache__/
*.rdgen
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -96,37 +96,12 @@ class JsMethodId(
override val returnType: JsClassId
get() = lazyReturnType?.value ?: returnTypeNotLazy

override val isPrivate: Boolean
get() = throw UnsupportedOperationException("JavaScript does not support private methods.")

override val isProtected: Boolean
get() = throw UnsupportedOperationException("JavaScript does not support protected methods.")

override val isPublic: Boolean
get() = true

override val isStatic: Boolean
get() = staticModifier

}

class JsConstructorId(
override var classId: JsClassId,
override val parameters: List<JsClassId>,
) : ConstructorId(classId, parameters) {

override val returnType: JsClassId
get() = classId

override val isPrivate: Boolean
get() = throw UnsupportedOperationException("JavaScript does not support private constructors.")

override val isProtected: Boolean
get() = throw UnsupportedOperationException("JavaScript does not support protected constructors.")

override val isPublic: Boolean
get() = true
}
) : ConstructorId(classId, parameters)

class JsMultipleClassId(private val jsJoinedName: String) : JsClassId(jsJoinedName) {

Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -30,7 +30,7 @@ private val kotlinModifierKeywords = setOf(
"private", "protected", "public", "reified", "sealed", "suspend", "tailrec", "vararg"
)

// For now we check only hard keywords because others can be used as methods and variables identifiers
// For now, we check only hard keywords because others can be used as methods and variables identifiers
private val kotlinKeywords = kotlinHardKeywords

fun isLanguageKeyword(word: String, codegenLanguage: CodeGenLanguage): Boolean =
Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -79,8 +79,8 @@ open class CodeGenerator(
val testClassFile = CgTestClassConstructor(context).construct(testClassModel)
CodeGeneratorResult(
generatedCode = renderClassFile(testClassFile),
utilClassKind =UtilClassKind.fromCgContextOrNull(context),
testsGenerationReport =testClassFile.testsGenerationReport
testsGenerationReport =testClassFile.testsGenerationReport,
utilClassKind =UtilClassKind.fromCgContextOrNull(context)
)
}
}
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -417,7 +417,7 @@ interface CgContextOwner {
*/
data class CgContext(
override val classUnderTest: ClassId,
val generateUtilClassFile: Boolean,
val generateUtilClassFile: Boolean = false,
override var currentExecutable: ExecutableId? = null,
override val collectedExceptions: MutableSet<ClassId> = mutableSetOf(),
override val collectedMethodAnnotations: MutableSet<CgAnnotation> = mutableSetOf(),
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -1655,6 +1655,7 @@ open class CgMethodConstructor(val context: CgContext) : CgContextOwner by conte
testSet.executions.any { it.result is UtExecutionFailure }


protected final fun testMethod(
/**
* Determines [CgTestMethodType] for current execution according to its success or failure.
*/
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -326,6 +326,7 @@ open class CgTestClassConstructor(val context: CgContext) :
is Junit4 -> testFrameworkManagers.getOrPut(context) { Junit4Manager(context) }
is Junit5 -> testFrameworkManagers.getOrPut(context) { Junit5Manager(context) }
is TestNg -> testFrameworkManagers.getOrPut(context) { TestNgManager(context) }
else -> throw UnsupportedOperationException()
}

fun getMockFrameworkManagerBy(context: CgContext) = mockFrameworkManagers.getOrPut(context) { MockFrameworkManager(context) }
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -303,6 +303,7 @@ open class CgVariableConstructor(val context: CgContext) :

return null
}
else -> throw UnsupportedOperationException()
}
}

Expand Down
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -125,7 +125,7 @@ private fun getEnumConstantByName(visibility: Visibility, language: CodegenLangu
}
"""
}
else ->""
else ->throw UnsupportedOperationException()
}.trimIndent()

private fun getStaticFieldValue(visibility: Visibility, language: CodegenLanguage): String =
Expand DownExpand Up@@ -176,7 +176,7 @@ private fun getStaticFieldValue(visibility: Visibility, language: CodegenLanguag
}
"""
}
else ->""
else ->throw UnsupportedOperationException()
}.trimIndent()

private fun getFieldValue(visibility: Visibility, language: CodegenLanguage): String =
Expand DownExpand Up@@ -211,7 +211,7 @@ private fun getFieldValue(visibility: Visibility, language: CodegenLanguage): St
}
"""
}
else ->""
else ->throw UnsupportedOperationException()
}.trimIndent()

private fun setStaticField(visibility: Visibility, language: CodegenLanguage): String =
Expand DownExpand Up@@ -263,7 +263,7 @@ private fun setStaticField(visibility: Visibility, language: CodegenLanguage): S
}
"""
}
else ->""
else ->throw UnsupportedOperationException()
}.trimIndent()

private fun setField(visibility: Visibility, language: CodegenLanguage): String =
Expand DownExpand Up@@ -298,7 +298,7 @@ private fun setField(visibility: Visibility, language: CodegenLanguage): String
}
"""
}
else ->""
else ->throw UnsupportedOperationException()
}.trimIndent()

private fun createArray(visibility: Visibility, language: CodegenLanguage): String =
Expand DownExpand Up@@ -333,7 +333,7 @@ private fun createArray(visibility: Visibility, language: CodegenLanguage): Stri
}
"""
}
else ->""
else ->throw UnsupportedOperationException()
}.trimIndent()

private fun createInstance(visibility: Visibility, language: CodegenLanguage): String =
Expand All@@ -356,7 +356,7 @@ private fun createInstance(visibility: Visibility, language: CodegenLanguage): S
}
"""
}
else ->""
else ->throw UnsupportedOperationException()
}.trimIndent()

private fun getUnsafeInstance(visibility: Visibility, language: CodegenLanguage): String =
Expand All@@ -379,7 +379,7 @@ private fun getUnsafeInstance(visibility: Visibility, language: CodegenLanguage)
}
"""
}
else ->""
else ->throw UnsupportedOperationException()
}.trimIndent()

/**
Expand DownExpand Up@@ -600,7 +600,7 @@ private fun deepEquals(
}
""".trimIndent()
}
else ->""
else ->throw UnsupportedOperationException()
}

private fun arraysDeepEquals(visibility: Visibility, language: CodegenLanguage): String =
Expand DownExpand Up@@ -643,7 +643,7 @@ private fun arraysDeepEquals(visibility: Visibility, language: CodegenLanguage):
}
""".trimIndent()
}
else ->""
else ->throw UnsupportedOperationException()
}

private fun iterablesDeepEquals(visibility: Visibility, language: CodegenLanguage): String =
Expand DownExpand Up@@ -684,7 +684,7 @@ private fun iterablesDeepEquals(visibility: Visibility, language: CodegenLanguag
}
""".trimIndent()
}
else ->""
else ->throw UnsupportedOperationException()
}

private fun streamsDeepEquals(visibility: Visibility, language: CodegenLanguage): String =
Expand DownExpand Up@@ -729,7 +729,7 @@ private fun streamsDeepEquals(visibility: Visibility, language: CodegenLanguage)
}
""".trimIndent()
}
else ->""
else ->throw UnsupportedOperationException()
}

private fun mapsDeepEquals(visibility: Visibility, language: CodegenLanguage): String =
Expand DownExpand Up@@ -786,7 +786,7 @@ private fun mapsDeepEquals(visibility: Visibility, language: CodegenLanguage): S
}
""".trimIndent()
}
else ->""
else ->throw UnsupportedOperationException()
}

private fun hasCustomEquals(visibility: Visibility, language: CodegenLanguage): String =
Expand DownExpand Up@@ -825,7 +825,7 @@ private fun hasCustomEquals(visibility: Visibility, language: CodegenLanguage):
}
""".trimIndent()
}
else ->""
else ->throw UnsupportedOperationException()
}

private fun getArrayLength(visibility: Visibility, language: CodegenLanguage) =
Expand All@@ -840,7 +840,7 @@ private fun getArrayLength(visibility: Visibility, language: CodegenLanguage) =
"""
${visibility by language}fun getArrayLength(arr: kotlin.Any?): Int = java.lang.reflect.Array.getLength(arr)
""".trimIndent()
else ->""
else ->throw UnsupportedOperationException()
}

private fun buildStaticLambda(visibility: Visibility, language: CodegenLanguage) =
Expand DownExpand Up@@ -951,6 +951,7 @@ private fun buildStaticLambda(visibility: Visibility, language: CodegenLanguage)
return handle.invokeWithArguments(*capturedValues)
}
""".trimIndent()
else -> throw UnsupportedOperationException()
}

private fun buildLambda(visibility: Visibility, language: CodegenLanguage) =
Expand DownExpand Up@@ -1085,6 +1086,7 @@ private fun buildLambda(visibility: Visibility, language: CodegenLanguage) =
return handle.invokeWithArguments(*capturedValues)
}
""".trimIndent()
else -> throw UnsupportedOperationException()
}

private fun getLookupIn(language: CodegenLanguage) =
Expand DownExpand Up@@ -1127,6 +1129,7 @@ private fun getLookupIn(language: CodegenLanguage) =
return lookup
}
""".trimIndent()
else -> throw UnsupportedOperationException()
}

private fun getLambdaCapturedArgumentTypes(language: CodegenLanguage) =
Expand DownExpand Up@@ -1169,6 +1172,7 @@ private fun getLambdaCapturedArgumentTypes(language: CodegenLanguage) =
.toTypedArray()
}
""".trimIndent()
else -> throw UnsupportedOperationException()
}

private fun getLambdaCapturedArgumentValues(language: CodegenLanguage) =
Expand All@@ -1195,6 +1199,7 @@ private fun getLambdaCapturedArgumentValues(language: CodegenLanguage) =
.toTypedArray()
}
""".trimIndent()
else -> throw UnsupportedOperationException()
}

private fun getInstantiatedMethodType(language: CodegenLanguage) =
Expand DownExpand Up@@ -1242,6 +1247,7 @@ private fun getInstantiatedMethodType(language: CodegenLanguage) =
return java.lang.invoke.MethodType.methodType(lambdaMethod.returnType, instantiatedMethodParamTypes)
}
""".trimIndent()
else -> throw UnsupportedOperationException()
}

private fun getLambdaMethod(language: CodegenLanguage) =
Expand DownExpand Up@@ -1272,6 +1278,7 @@ private fun getLambdaMethod(language: CodegenLanguage) =
?: throw IllegalArgumentException("No lambda method named ${'$'}lambdaName was found in class: ${'$'}{declaringClass.canonicalName}")
}
""".trimIndent()
else -> throw UnsupportedOperationException()
}

private fun getSingleAbstractMethod(language: CodegenLanguage) =
Expand DownExpand Up@@ -1306,6 +1313,7 @@ private fun getSingleAbstractMethod(language: CodegenLanguage) =
return abstractMethods[0]
}
""".trimIndent()
else -> throw UnsupportedOperationException()
}

private fun capturedArgumentClass(language: CodegenLanguage) =
Expand DownExpand Up@@ -1337,6 +1345,7 @@ private fun capturedArgumentClass(language: CodegenLanguage) =
data class CapturedArgument(val type: Class<*>, val value: Any?)
""".trimIndent()
}
else -> throw UnsupportedOperationException()
}

internal fun CgContextOwner.importUtilMethodDependencies(id: MethodId) {
Expand DownExpand Up@@ -1377,27 +1386,27 @@ private fun TestClassUtilMethodProvider.regularImportsByUtilMethod(
Arrays::class.id
)
CodegenLanguage.KOTLIN -> listOf(fieldClassId, Arrays::class.id)
else ->emptyList()
else ->throw UnsupportedOperationException()
}
arraysDeepEqualsMethodId -> when (codegenLanguage) {
CodegenLanguage.JAVA -> listOf(java.lang.reflect.Array::class.id, Set::class.id)
CodegenLanguage.KOTLIN -> listOf(java.lang.reflect.Array::class.id)
else ->emptyList()
else ->throw UnsupportedOperationException()
}
iterablesDeepEqualsMethodId -> when (codegenLanguage) {
CodegenLanguage.JAVA -> listOf(Iterable::class.id, Iterator::class.id, Set::class.id)
CodegenLanguage.KOTLIN -> emptyList()
else ->emptyList()
else ->throw UnsupportedOperationException()
}
streamsDeepEqualsMethodId -> when (codegenLanguage) {
CodegenLanguage.JAVA -> listOf(java.util.stream.BaseStream::class.id, Set::class.id)
CodegenLanguage.KOTLIN -> emptyList()
else ->emptyList()
else ->throw UnsupportedOperationException()
}
mapsDeepEqualsMethodId -> when (codegenLanguage) {
CodegenLanguage.JAVA -> listOf(Map::class.id, Iterator::class.id, Set::class.id)
CodegenLanguage.KOTLIN -> emptyList()
else ->emptyList()
else ->throw UnsupportedOperationException()
}
hasCustomEqualsMethodId -> emptyList()
getArrayLengthMethodId -> listOf(java.lang.reflect.Array::class.id)
Expand All@@ -1407,36 +1416,43 @@ private fun TestClassUtilMethodProvider.regularImportsByUtilMethod(
MethodHandle::class.id, CallSite::class.id, LambdaMetafactory::class.id
)
CodegenLanguage.KOTLIN -> listOf(MethodType::class.id, LambdaMetafactory::class.id)
else -> throw UnsupportedOperationException()
}
buildLambdaMethodId -> when (codegenLanguage) {
CodegenLanguage.JAVA -> listOf(
MethodHandles::class.id, Method::class.id, MethodType::class.id,
MethodHandle::class.id, CallSite::class.id, LambdaMetafactory::class.id
)
CodegenLanguage.KOTLIN -> listOf(MethodType::class.id, LambdaMetafactory::class.id)
else -> throw UnsupportedOperationException()
}
getLookupInMethodId -> when (codegenLanguage) {
CodegenLanguage.JAVA -> listOf(MethodHandles::class.id, Field::class.id, Modifier::class.id)
CodegenLanguage.KOTLIN -> listOf(MethodHandles::class.id, Modifier::class.id)
else -> throw UnsupportedOperationException()
}
getLambdaCapturedArgumentTypesMethodId -> when (codegenLanguage) {
CodegenLanguage.JAVA -> listOf(LambdaMetafactory::class.id)
CodegenLanguage.KOTLIN -> listOf(LambdaMetafactory::class.id)
else -> throw UnsupportedOperationException()
}
getLambdaCapturedArgumentValuesMethodId -> when (codegenLanguage) {
CodegenLanguage.JAVA -> listOf(Arrays::class.id)
CodegenLanguage.KOTLIN -> emptyList()
else -> throw UnsupportedOperationException()
}
getInstantiatedMethodTypeMethodId -> when (codegenLanguage) {
CodegenLanguage.JAVA -> listOf(
Method::class.id, MethodType::class.id, LambdaMetafactory::class.id,
java.util.List::class.id, Arrays::class.id, Collectors::class.id
)
CodegenLanguage.KOTLIN -> listOf(Method::class.id, MethodType::class.id, LambdaMetafactory::class.id)
else -> throw UnsupportedOperationException()
}
getLambdaMethodMethodId -> when (codegenLanguage) {
CodegenLanguage.JAVA -> listOf(Method::class.id, Arrays::class.id)
CodegenLanguage.KOTLIN -> listOf(Method::class.id)
else -> throw UnsupportedOperationException()
}
getSingleAbstractMethodMethodId -> listOf(
Method::class.id, java.util.List::class.id, Arrays::class.id,
Expand Down
Original file line numberDiff line numberDiff line change
Expand Up@@ -136,9 +136,7 @@ class MockValueConstructor(
is UtAssembleModel -> UtConcreteValue(constructFromAssembleModel(model), model.classId.jClass)
is UtLambdaModel -> UtConcreteValue(constructFromLambdaModel(model))
is UtVoidModel -> UtConcreteValue(Unit)
is PythonModel -> TODO()
is GoUtModel -> TODO()
is JsUtModel -> TODO()
// PythonModel, GoUtModel, JsUtModel may be here
else -> UtConcreteValue(null, model.classId.jClass)
}
}
Expand Down
Loading

[8]ページ先頭

©2009-2025 Movatter.jp