X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.scl.ui%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fui%2Fconsole%2FTestSCLConsole.java;fp=bundles%2Forg.simantics.scl.ui%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fui%2Fconsole%2FTestSCLConsole.java;h=3147d7b892611a342a67528786d4e3cb3c05b1ca;hb=969bd23cab98a79ca9101af33334000879fb60c5;hp=0000000000000000000000000000000000000000;hpb=866dba5cd5a3929bbeae85991796acb212338a08;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.scl.ui/src/org/simantics/scl/ui/console/TestSCLConsole.java b/bundles/org.simantics.scl.ui/src/org/simantics/scl/ui/console/TestSCLConsole.java new file mode 100755 index 000000000..3147d7b89 --- /dev/null +++ b/bundles/org.simantics.scl.ui/src/org/simantics/scl/ui/console/TestSCLConsole.java @@ -0,0 +1,31 @@ +package org.simantics.scl.ui.console; + +import org.eclipse.swt.SWT; +import org.eclipse.swt.layout.FillLayout; +import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.Shell; +import org.junit.Test; + +public class TestSCLConsole { + + @Test + public void testConsole() throws Exception { + Display display = new Display(); + Shell shell = new Shell(display); + shell.setSize(640, 480); + + FillLayout layout = new FillLayout(); + shell.setLayout(layout); + + // Test console + new SCLConsole(shell, SWT.NONE); + + // Open shell + shell.open(); + while (!shell.isDisposed()) { + if (!display.readAndDispatch()) + display.sleep(); + } + display.dispose(); + } +} \ No newline at end of file