Commit b18ee2cb authored by apvrille's avatar apvrille

Update on tests

parent 1ce35e93
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
<property name="caretWidth" class="java.lang.Integer" /> <property name="caretWidth" class="java.lang.Integer" />
</properties> </properties>
</component> </component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="false" project-jdk-name="1.8" project-jdk-type="JavaSDK"> <component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" default="false" project-jdk-name="1.7" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build" /> <output url="file://$PROJECT_DIR$/build" />
</component> </component>
</project> </project>
\ No newline at end of file
...@@ -5,7 +5,7 @@ JAVADOC = javadoc ...@@ -5,7 +5,7 @@ JAVADOC = javadoc
MAKE = make -s MAKE = make -s
TAR = tar TAR = tar
GZIP = gzip GZIP = gzip
GRADLE = $(shell which gradle) -q GRADLE = $(shell which gradle)
GRADLE_VERSION_NEEDED = 3.3 GRADLE_VERSION_NEEDED = 3.3
ERROR_MSG = printf "$(COLOR)\nBuild with gradle failed. Falling back to regular javac command...\n$(RESET)" ERROR_MSG = printf "$(COLOR)\nBuild with gradle failed. Falling back to regular javac command...\n$(RESET)"
......
...@@ -381,10 +381,17 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe ...@@ -381,10 +381,17 @@ public class MainGUI implements ActionListener, WindowListener, KeyListener, Pe
public void build() { public void build() {
// Swing look and feel // Swing look and feel
//try {
try { try {
UIManager.setLookAndFeel( UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
UIManager.getCrossPlatformLookAndFeelClassName()); } catch (ClassNotFoundException | InstantiationException | UnsupportedLookAndFeelException e) {
} catch (Exception e) { ErrorGUI.exit(ErrorGUI.GUI);} ErrorGUI.exit(ErrorGUI.GUI);
e.printStackTrace();
} catch (IllegalAccessException e) {
ErrorGUI.exit(ErrorGUI.GUI);
e.printStackTrace();
}
//} catch (Exception e) { ErrorGUI.exit(ErrorGUI.GUI);}
// Creating main container // Creating main container
frame = new JFrame("TTool"); frame = new JFrame("TTool");
......
...@@ -2,7 +2,7 @@ package test; ...@@ -2,7 +2,7 @@ package test;
public abstract class AbstractTest { public abstract class AbstractTest {
protected static String RESOURCES_DIR; protected static String RESOURCES_DIR = "";
protected static String getBaseResourcesDir() { protected static String getBaseResourcesDir() {
final String systemPropResDir = System.getProperty( "resources_dir" ); final String systemPropResDir = System.getProperty( "resources_dir" );
......
...@@ -20,8 +20,7 @@ public class TestGTURTLEModeling extends AbstractUITest { ...@@ -20,8 +20,7 @@ public class TestGTURTLEModeling extends AbstractUITest {
//private static final String RESOURCES_DIR = "resources/ui/generateccode/"; //private static final String RESOURCES_DIR = "resources/ui/generateccode/";
@BeforeClass @BeforeClass
public static void setUpBeforeClass() public static void setUpBeforeClass() throws Exception {
throws Exception {
RESOURCES_DIR = getBaseResourcesDir() + "ui/generateccode/"; RESOURCES_DIR = getBaseResourcesDir() + "ui/generateccode/";
} }
...@@ -49,6 +48,11 @@ public class TestGTURTLEModeling extends AbstractUITest { ...@@ -49,6 +48,11 @@ public class TestGTURTLEModeling extends AbstractUITest {
mainGui.gtm.generateCCode( codeDir ); mainGui.gtm.generateCCode( codeDir );
/*try {
Thread.sleep(5000);
} catch (Exception ignored) {
}*/
try { try {
final IComparisonReport difference = textComparator.compare( new File( codeDir ), new File( codeDirExpected ) ); final IComparisonReport difference = textComparator.compare( new File( codeDir ), new File( codeDirExpected ) );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment