You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
assertArrayEquals overload is not found, tests doesn't compile #135
Project: guava-26.0. Class: com.google.common.primitives.Booleans.
Compilation Error during compiling Test Class after test generation:
C:\Users\sWX1143086\work\UnitTestBot\UTBotJava\utbot-junit-contest\build\output\test_candidates\guava-26.0\com\google\common\primitives\BooleansTest.java:605: error: no suitable method found for assertArrayEquals(boolean[],boolean[])
assertArrayEquals(expected, actual);
^
method Assert.assertArrayEquals(long[],long[]) is not applicable
(argument mismatch; boolean[] cannot be converted to long[])
method Assert.assertArrayEquals(int[],int[]) is not applicable
(argument mismatch; boolean[] cannot be converted to int[])
method Assert.assertArrayEquals(short[],short[]) is not applicable
(argument mismatch; boolean[] cannot be converted to short[])
method Assert.assertArrayEquals(char[],char[]) is not applicable
(argument mismatch; boolean[] cannot be converted to char[])
method Assert.assertArrayEquals(byte[],byte[]) is not applicable
(argument mismatch; boolean[] cannot be converted to byte[])
method Assert.assertArrayEquals(Object[],Object[]) is not applicable
(argument mismatch; boolean[] cannot be converted to Object[])
The issue is that minor version of JUnit 4 have different API for arrays.
Namely Assert.assertArrayEquals(boolean[], boolean[]) method absents in versions up to 4.11 and appears in 4.12 only
Moreover, in JUnit 4.0 - 4.2 they use assertEquals method name for Object[] and assertArrayEquals since 4.3
Solution: our DependencyPatterns should limit requirements for JUnit 4 more strictly. 4.12 is the oldest supported version.
changed the title [-]Codegen: assertArrayEquals overload is not found, tests doesn't compile [/-][+]assertArrayEquals overload is not found, tests doesn't compile [/+]on Jun 8, 2022
Activity
Vassiliy-Kudryashov commentedon Jun 2, 2022
The issue is that minor version of JUnit 4 have different API for arrays.
Namely
Assert.assertArrayEquals(boolean[], boolean[])method absents in versions up to 4.11 and appears in 4.12 onlyMoreover, in JUnit 4.0 - 4.2 they use
assertEqualsmethod name forObject[]andassertArrayEqualssince 4.3Solution: our
DependencyPatternsshould limit requirements for JUnit 4 more strictly. 4.12 is the oldest supported version.[-]Codegen: assertArrayEquals overload is not found, tests doesn't compile [/-][+]assertArrayEquals overload is not found, tests doesn't compile [/+]assertArrayEquals overload is not found, tests doesn't compile #135
assertArrayEquals overload is not found, tests doesn't compile #135
assertArrayEquals overload is not found, tests doesn't compile #135
assertArrayEquals overload is not found, tests doesn't compile #135 (#…