UnitTestBot / UnitTestBot/usvm
NullPointerException is expected as a result of the correct test
Open
@Damtev is already working on this.
Since Nov 15, 2023.
bug
- Dominant language
- Kotlin
- Stars
- 33
- Forks
- 27
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 15
Description
Generate tests in the following configuration:
timeLimit=60
methodFilter = "org.usvm.samples.primitives.IntExamples.*"
projectFilter = listOf("samples")
There are two tests for the function isInteger. They have the same input. One of them is incorrect.
///region Test suites for executable org.usvm.samples.primitives.IntExamples.isInteger
/**
* @utbot.classUnderTest {@link org.usvm.samples.primitives.IntExamples}
* @utbot.methodUnderTest {@link org.usvm.samples.primitives.IntExamples#isInteger(java.lang.String)}
*/
@Test
public void testIsIntegerReturnsFalse() {
boolean actual = IntExamples.isInteger(null);
assertFalse(actual);
}
/**
* @utbot.classUnderTest {@link org.usvm.samples.primitives.IntExamples}
* @utbot.methodUnderTest {@link org.usvm.samples.primitives.IntExamples#isInteger(java.lang.String)}
*/
@Test(expected = NullPointerException.class)
public void testIsIntegerThrowsNPE() {
IntExamples.isInteger(null);
}
///endregion
It seems that erronous NPE comes from the JcState
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.