Commit b18ee2cb authored by apvrille's avatar apvrille

Update on tests

parent 1ce35e93
......@@ -38,7 +38,7 @@
<property name="caretWidth" class="java.lang.Integer" />
</properties>
</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" />
</component>
</project>
\ No newline at end of file
......@@ -5,7 +5,7 @@ JAVADOC = javadoc
MAKE = make -s
TAR = tar
GZIP = gzip
GRADLE = $(shell which gradle) -q
GRADLE = $(shell which gradle)
GRADLE_VERSION_NEEDED = 3.3
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
public void build() {
// Swing look and feel
//try {
try {
UIManager.setLookAndFeel(
UIManager.getCrossPlatformLookAndFeelClassName());
} catch (Exception e) { ErrorGUI.exit(ErrorGUI.GUI);}
UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
} catch (ClassNotFoundException | InstantiationException | UnsupportedLookAndFeelException e) {
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
frame = new JFrame("TTool");
......
......@@ -2,7 +2,7 @@ package test;
public abstract class AbstractTest {
protected static String RESOURCES_DIR;
protected static String RESOURCES_DIR = "";
protected static String getBaseResourcesDir() {
final String systemPropResDir = System.getProperty( "resources_dir" );
......
......@@ -20,8 +20,7 @@ public class TestGTURTLEModeling extends AbstractUITest {
//private static final String RESOURCES_DIR = "resources/ui/generateccode/";
@BeforeClass
public static void setUpBeforeClass()
throws Exception {
public static void setUpBeforeClass() throws Exception {
RESOURCES_DIR = getBaseResourcesDir() + "ui/generateccode/";
}
......@@ -49,6 +48,11 @@ public class TestGTURTLEModeling extends AbstractUITest {
mainGui.gtm.generateCCode( codeDir );
/*try {
Thread.sleep(5000);
} catch (Exception ignored) {
}*/
try {
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