1+ package math
2+
3+ import examples.CustomJavaDocTagsEnabler
4+ import examples.SummaryTestCaseGeneratorTest
5+ import guava.examples.math.IntMath
6+ import org.junit.jupiter.api.Test
7+ import org.junit.jupiter.api.extension.ExtendWith
8+ import org.utbot.framework.plugin.api.MockStrategyApi
9+ import org.utbot.framework.plugin.api.UtClusterInfo
10+ import org.utbot.testing.DoNotCalculate
11+
12+ @ExtendWith(CustomJavaDocTagsEnabler ::class )
13+ class SummaryIntMathLogTest : SummaryTestCaseGeneratorTest (
14+ IntMath : :class,
15+ ) {
16+ @Test
17+ fun testLog2 () {
18+ val summary1 = " @utbot.classUnderTest {@link IntMath}\n " +
19+ " @utbot.methodUnderTest {@link guava.examples.math.IntMath#log2(int,java.math.RoundingMode)}\n "
20+ val summary2 = " @utbot.classUnderTest {@link IntMath}\n " +
21+ " @utbot.methodUnderTest {@link guava.examples.math.IntMath#log2(int,java.math.RoundingMode)}\n "
22+ val summary3 = " @utbot.classUnderTest {@link IntMath}\n " +
23+ " @utbot.methodUnderTest {@link guava.examples.math.IntMath#log2(int,java.math.RoundingMode)}\n "
24+ val summary4 = " @utbot.classUnderTest {@link IntMath}\n " +
25+ " @utbot.methodUnderTest {@link guava.examples.math.IntMath#log2(int,java.math.RoundingMode)}\n " +
26+ " @utbot.invokes {@link java.math.RoundingMode#ordinal()}\n " +
27+ " @utbot.throwsException {@link java.lang.NullPointerException} in: mode"
28+
29+ val methodName1 = " testLog2"
30+ val methodName2 = " testLog2_1"
31+ val methodName3 = " testLog2_2"
32+ val methodName4 = " testLog2_RoundingModeOrdinal"
33+
34+ val displayName1 = " "
35+ val displayName2 = " "
36+ val displayName3 = " "
37+ val displayName4 = " switch(mode) case: -> ThrowNullPointerException"
38+
39+ val summaryKeys = listOf (
40+ summary1,
41+ summary2,
42+ summary3,
43+ summary4
44+ )
45+
46+ val displayNames = listOf (
47+ displayName1,
48+ displayName2,
49+ displayName3,
50+ displayName4
51+ )
52+
53+ val methodNames = listOf (
54+ methodName1,
55+ methodName2,
56+ methodName3,
57+ methodName4
58+ )
59+
60+ val clusterInfo = listOf (
61+ Pair (UtClusterInfo (" SYMBOLIC EXECUTION: SUCCESSFUL EXECUTIONS for method log2(int, java.math.RoundingMode)" , null ), 3 ),
62+ Pair (UtClusterInfo (" SYMBOLIC EXECUTION: ERROR SUITE for method log2(int, java.math.RoundingMode)" , null ), 1 )
63+ )
64+
65+ val method = IntMath ::log2
66+ val mockStrategy = MockStrategyApi .NO_MOCKS
67+ val coverage = DoNotCalculate
68+
69+ summaryCheck(method, mockStrategy, coverage, summaryKeys, methodNames, displayNames, clusterInfo)
70+ }
71+ }
0 commit comments