]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.scl.ui/src/org/simantics/scl/ui/console/TestSCLConsole.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.scl.ui / src / org / simantics / scl / ui / console / TestSCLConsole.java
1 package org.simantics.scl.ui.console;\r
2 \r
3 import org.eclipse.swt.SWT;\r
4 import org.eclipse.swt.layout.FillLayout;\r
5 import org.eclipse.swt.widgets.Display;\r
6 import org.eclipse.swt.widgets.Shell;\r
7 import org.junit.Test;\r
8 \r
9 public class TestSCLConsole {\r
10 \r
11     @Test\r
12     public void testConsole() throws Exception {\r
13         Display display = new Display();\r
14         Shell shell = new Shell(display);\r
15         shell.setSize(640, 480);\r
16         \r
17         FillLayout layout = new FillLayout();\r
18         shell.setLayout(layout);\r
19         \r
20         // Test console\r
21         new SCLConsole(shell, SWT.NONE);\r
22                 \r
23         // Open shell\r
24         shell.open();\r
25         while (!shell.isDisposed()) {\r
26             if (!display.readAndDispatch()) \r
27                 display.sleep();\r
28         }\r
29         display.dispose();\r
30     }\r
31 }