Skip to content

'Failed to compile test class CtAssignmentImplTest' on spoon-core-7.0.0 #1677

Closed
@tyuldashev

Description

@tyuldashev

Description
UTBot generates uncompilable tests for spoon CtAssignmentImplTest class.

To Reproduce

Steps to reproduce the behavior:

  1. Open utbot project
  2. Open org.utbot.contest.ContestEstimatorKt file
  3. Set filters on project and class:
        methodFilter = "spoon.support.reflect.code.CtAssignmentImpl.*"
        projectFilter = listOf("spoon-core-7.0.0")
  1. Increase timeout if tests are not generated (val timeLimit = 300)
  2. Run ContestEstimator

Expected behavior
Tests are generated without errors

Actual behavior
There are errors in console output

17:36:14.329 | INFO  | Started: Compiling class C:\Users\t00814305\IdeaProjects\UTBotJava\utbot-junit-contest\build\output\test_candidates\spoon-core-7.0.0\spoon\support\reflect\code\CtAssignmentImplTest.java
17:36:14.331 | DEBUG | Compile attempt 1
17:36:18.248 | ERROR | Compilation errors: C:\Users\t00814305\IdeaProjects\UTBotJava\utbot-junit-contest\build\output\test_candidates\spoon-core-7.0.0\spoon\support\reflect\code\CtAssignmentImplTest.java:2149: error: typeCasts is not public in CtExpressionImpl; cannot be accessed from outside package
        List actualTypeCasts = actual.typeCasts;
                                     ^
C:\Users\t00814305\IdeaProjects\UTBotJava\utbot-junit-contest\build\output\test_candidates\spoon-core-7.0.0\spoon\support\reflect\code\CtAssignmentImplTest.java:2192: error: typeCasts is not public in CtExpressionImpl; cannot be accessed from outside package
        List actualTypeCasts = actual.typeCasts;
                                     ^
Note: C:\Users\t00814305\IdeaProjects\UTBotJava\utbot-junit-contest\build\output\test_candidates\spoon-core-7.0.0\spoon\support\reflect\code\CtAssignmentImplTest.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
2 errors

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions