File tree Expand file tree Collapse file tree
test/langtools/jdk/jshell Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -57,13 +57,15 @@ public void testExit() {
5757 assertEquals (1 , shutdownCount );
5858 }
5959
60+ @ Test
6061 public void testCloseCallback () {
6162 shutdownCount = 0 ;
6263 getState ().onShutdown (this ::shutdownCounter );
6364 getState ().close ();
6465 assertEquals (1 , shutdownCount );
6566 }
6667
68+ @ Test
6769 public void testCloseUnsubscribe () {
6870 shutdownCount = 0 ;
6971 Subscription token = getState ().onShutdown (this ::shutdownCounter );
@@ -72,6 +74,7 @@ public void testCloseUnsubscribe() {
7274 assertEquals (0 , shutdownCount );
7375 }
7476
77+ @ Test
7578 public void testTwoShutdownListeners () {
7679 ShutdownListener listener1 = new ShutdownListener ();
7780 ShutdownListener listener2 = new ShutdownListener ();
Original file line number Diff line number Diff line change 4343import jdk .internal .jshell .tool .StopDetectingInputStream .State ;
4444import jdk .jshell .JShell ;
4545import static org .junit .jupiter .api .Assertions .assertEquals ;
46+ import static org .junit .jupiter .api .Assertions .fail ;
4647import org .junit .jupiter .api .Disabled ;
4748import org .junit .jupiter .api .Test ;
4849
You can’t perform that action at this time.
0 commit comments