Skip to content

Commit 4ecfd96

Browse files
yiming-tang-cskhatchad
authored andcommitted
Test implicit entry point feature (#158)
This passing test case has no explicit entry point.
1 parent f2b983f commit 4ecfd96

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package p;
2+
3+
import java.util.stream.IntStream;
4+
5+
public class A {
6+
public static void main(String[] args) {
7+
IntStream.of(1).count();
8+
}
9+
}

edu.cuny.hunter.streamrefactoring.tests/test cases/edu/cuny/hunter/streamrefactoring/ui/tests/ConvertStreamToParallelRefactoringTest.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -711,4 +711,11 @@ public void testField() throws Exception {
711711
false, EnumSet.of(TransformationAction.CONVERT_TO_PARALLEL), PreconditionSuccess.P1,
712712
Refactoring.CONVERT_SEQUENTIAL_STREAM_TO_PARALLEL, RefactoringStatus.OK, Collections.emptySet()));
713713
}
714+
715+
public void testImplicitEntryPoint() throws Exception {
716+
helper(new StreamAnalysisExpectedResult("IntStream.of(1)", EnumSet.of(ExecutionMode.SEQUENTIAL),
717+
EnumSet.of(Ordering.ORDERED), false, false, false, EnumSet.of(TransformationAction.CONVERT_TO_PARALLEL),
718+
PreconditionSuccess.P2, Refactoring.CONVERT_SEQUENTIAL_STREAM_TO_PARALLEL, RefactoringStatus.OK,
719+
Collections.emptySet()));
720+
}
714721
}

0 commit comments

Comments
 (0)