diff --git a/tests/java/assert/.idea/compiler.xml b/tests/java/assert/.idea/compiler.xml new file mode 100644 index 0000000000000000000000000000000000000000..217af471a9e60576e8c36373fa22c50a63a00b2c --- /dev/null +++ b/tests/java/assert/.idea/compiler.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="CompilerConfiguration"> + <option name="DEFAULT_COMPILER" value="Javac" /> + <resourceExtensions /> + <wildcardResourcePatterns> + <entry name="!?*.java" /> + <entry name="!?*.form" /> + <entry name="!?*.class" /> + <entry name="!?*.groovy" /> + <entry name="!?*.scala" /> + <entry name="!?*.flex" /> + <entry name="!?*.kt" /> + <entry name="!?*.clj" /> + </wildcardResourcePatterns> + <annotationProcessing> + <profile default="true" name="Default" enabled="false"> + <processorPath useClasspath="true" /> + </profile> + </annotationProcessing> + </component> +</project> + diff --git a/tests/java/assert/.idea/description.html b/tests/java/assert/.idea/description.html new file mode 100644 index 0000000000000000000000000000000000000000..db5f12955691506605c7b50297b402dd1489554d --- /dev/null +++ b/tests/java/assert/.idea/description.html @@ -0,0 +1 @@ +<html>Simple <b>Java</b> application that includes a class with <code>main()</code> method</html> \ No newline at end of file diff --git a/tests/java/assert/.idea/encodings.xml b/tests/java/assert/.idea/encodings.xml new file mode 100644 index 0000000000000000000000000000000000000000..97626ba45445dc9f3afa66e6a149914dc39e3df6 --- /dev/null +++ b/tests/java/assert/.idea/encodings.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="Encoding"> + <file url="PROJECT" charset="UTF-8" /> + </component> +</project> \ No newline at end of file diff --git a/tests/java/assert/.idea/misc.xml b/tests/java/assert/.idea/misc.xml new file mode 100644 index 0000000000000000000000000000000000000000..6989bdc32a8a4f9ef91ff120a7abbdecc4500d29 --- /dev/null +++ b/tests/java/assert/.idea/misc.xml @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="ProjectKey"> + <option name="state" value="project://63537948-39a4-48a0-9c97-34259a0fa913" /> + </component> + <component name="ProjectRootManager" version="2" languageLevel="JDK_12" default="true" project-jdk-name="12" project-jdk-type="JavaSDK"> + <output url="file://$PROJECT_DIR$/out" /> + </component> +</project> \ No newline at end of file diff --git a/tests/java/assert/.idea/modules.xml b/tests/java/assert/.idea/modules.xml new file mode 100644 index 0000000000000000000000000000000000000000..0b2a50514831b271bd7ef929bcbee7f2baee7b07 --- /dev/null +++ b/tests/java/assert/.idea/modules.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="ProjectModuleManager"> + <modules> + <module fileurl="file://$PROJECT_DIR$/te.iml" filepath="$PROJECT_DIR$/te.iml" /> + </modules> + </component> +</project> \ No newline at end of file diff --git a/tests/java/assert/.idea/uiDesigner.xml b/tests/java/assert/.idea/uiDesigner.xml new file mode 100644 index 0000000000000000000000000000000000000000..e96534fb27b68192f27f985d3879e173ec77adb8 --- /dev/null +++ b/tests/java/assert/.idea/uiDesigner.xml @@ -0,0 +1,124 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="Palette2"> + <group name="Swing"> + <item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.png" removable="false" auto-create-binding="false" can-attach-label="false"> + <default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" /> + </item> + <item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.png" removable="false" auto-create-binding="false" can-attach-label="false"> + <default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" /> + </item> + <item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.png" removable="false" auto-create-binding="false" can-attach-label="false"> + <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" /> + </item> + <item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.png" removable="false" auto-create-binding="false" can-attach-label="true"> + <default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" /> + </item> + <item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.png" removable="false" auto-create-binding="true" can-attach-label="false"> + <default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" /> + <initial-values> + <property name="text" value="Button" /> + </initial-values> + </item> + <item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.png" removable="false" auto-create-binding="true" can-attach-label="false"> + <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" /> + <initial-values> + <property name="text" value="RadioButton" /> + </initial-values> + </item> + <item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.png" removable="false" auto-create-binding="true" can-attach-label="false"> + <default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" /> + <initial-values> + <property name="text" value="CheckBox" /> + </initial-values> + </item> + <item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.png" removable="false" auto-create-binding="false" can-attach-label="false"> + <default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" /> + <initial-values> + <property name="text" value="Label" /> + </initial-values> + </item> + <item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.png" removable="false" auto-create-binding="true" can-attach-label="true"> + <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1"> + <preferred-size width="150" height="-1" /> + </default-constraints> + </item> + <item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.png" removable="false" auto-create-binding="true" can-attach-label="true"> + <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1"> + <preferred-size width="150" height="-1" /> + </default-constraints> + </item> + <item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.png" removable="false" auto-create-binding="true" can-attach-label="true"> + <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1"> + <preferred-size width="150" height="-1" /> + </default-constraints> + </item> + <item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.png" removable="false" auto-create-binding="true" can-attach-label="true"> + <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> + <preferred-size width="150" height="50" /> + </default-constraints> + </item> + <item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.png" removable="false" auto-create-binding="true" can-attach-label="true"> + <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> + <preferred-size width="150" height="50" /> + </default-constraints> + </item> + <item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.png" removable="false" auto-create-binding="true" can-attach-label="true"> + <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> + <preferred-size width="150" height="50" /> + </default-constraints> + </item> + <item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.png" removable="false" auto-create-binding="true" can-attach-label="true"> + <default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" /> + </item> + <item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.png" removable="false" auto-create-binding="true" can-attach-label="false"> + <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> + <preferred-size width="150" height="50" /> + </default-constraints> + </item> + <item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.png" removable="false" auto-create-binding="true" can-attach-label="false"> + <default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3"> + <preferred-size width="150" height="50" /> + </default-constraints> + </item> + <item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.png" removable="false" auto-create-binding="true" can-attach-label="false"> + <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3"> + <preferred-size width="150" height="50" /> + </default-constraints> + </item> + <item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.png" removable="false" auto-create-binding="true" can-attach-label="false"> + <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3"> + <preferred-size width="200" height="200" /> + </default-constraints> + </item> + <item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.png" removable="false" auto-create-binding="false" can-attach-label="false"> + <default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3"> + <preferred-size width="200" height="200" /> + </default-constraints> + </item> + <item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.png" removable="false" auto-create-binding="true" can-attach-label="true"> + <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" /> + </item> + <item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.png" removable="false" auto-create-binding="true" can-attach-label="false"> + <default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" /> + </item> + <item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.png" removable="false" auto-create-binding="false" can-attach-label="false"> + <default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" /> + </item> + <item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.png" removable="false" auto-create-binding="true" can-attach-label="false"> + <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" /> + </item> + <item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.png" removable="false" auto-create-binding="false" can-attach-label="false"> + <default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1"> + <preferred-size width="-1" height="20" /> + </default-constraints> + </item> + <item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.png" removable="false" auto-create-binding="false" can-attach-label="false"> + <default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" /> + </item> + <item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.png" removable="false" auto-create-binding="true" can-attach-label="false"> + <default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" /> + </item> + </group> + </component> +</project> \ No newline at end of file diff --git a/tests/java/assert/.idea/vcs.xml b/tests/java/assert/.idea/vcs.xml new file mode 100644 index 0000000000000000000000000000000000000000..def6a6a18457989c7d18825c7c1bbfeefc8b261d --- /dev/null +++ b/tests/java/assert/.idea/vcs.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="VcsDirectoryMappings"> + <mapping directory="" vcs="" /> + </component> +</project> + diff --git a/tests/java/assert/.idea/workspace.xml b/tests/java/assert/.idea/workspace.xml new file mode 100644 index 0000000000000000000000000000000000000000..bfbac9d1f0f840c67119ac931fd71e2d41ed8ad5 --- /dev/null +++ b/tests/java/assert/.idea/workspace.xml @@ -0,0 +1,234 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project version="4"> + <component name="ChangeListManager"> + <list default="true" id="6eb92187-73ee-4991-b5c2-d3d985b6042a" name="Default Changelist" comment="" /> + <ignored path="$PROJECT_DIR$/out/" /> + <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" /> + <option name="SHOW_DIALOG" value="false" /> + <option name="HIGHLIGHT_CONFLICTS" value="true" /> + <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" /> + <option name="LAST_RESOLUTION" value="IGNORE" /> + </component> + <component name="DefaultGradleProjectSettings"> + <option name="testRunner" value="GRADLE" /> + <option name="delegatedBuild" value="true" /> + </component> + <component name="FileEditorManager"> + <leaf SIDE_TABS_SIZE_LIMIT_KEY="300"> + <file pinned="false" current-in-tab="false"> + <entry file="file://$PROJECT_DIR$/src/Main.java"> + <provider selected="true" editor-type-id="text-editor"> + <state> + <caret selection-end-line="8" selection-end-column="1" /> + </state> + </provider> + </entry> + </file> + <file pinned="false" current-in-tab="true"> + <entry file="file://$PROJECT_DIR$/src/kata.java"> + <provider selected="true" editor-type-id="text-editor"> + <state> + <caret selection-end-line="11" /> + </state> + </provider> + </entry> + </file> + </leaf> + </component> + <component name="FileTemplateManagerImpl"> + <option name="RECENT_TEMPLATES"> + <list> + <option value="Class" /> + <option value="JUnit3 Test Class" /> + </list> + </option> + </component> + <component name="IdeDocumentHistory"> + <option name="CHANGED_PATHS"> + <list> + <option value="$PROJECT_DIR$/src/MainTest.java" /> + <option value="$PROJECT_DIR$/src/cassert.java" /> + <option value="$PROJECT_DIR$/src/s.java" /> + <option value="$PROJECT_DIR$/src/bytwo.java" /> + <option value="$PROJECT_DIR$/src/kata.java" /> + <option value="$PROJECT_DIR$/src/Main.java" /> + </list> + </option> + </component> + <component name="ProjectFrameBounds"> + <option name="x" value="239" /> + <option name="y" value="152" /> + <option name="width" value="1080" /> + <option name="height" value="676" /> + </component> + <component name="ProjectView"> + <navigator proportions="" version="1"> + <foldersAlwaysOnTop value="true" /> + </navigator> + <panes> + <pane id="ProjectPane"> + <subPane> + <expand> + <path> + <item name="te" type="b2602c69:ProjectViewProjectNode" /> + <item name="te" type="462c0819:PsiDirectoryNode" /> + </path> + <path> + <item name="te" type="b2602c69:ProjectViewProjectNode" /> + <item name="te" type="462c0819:PsiDirectoryNode" /> + <item name="src" type="462c0819:PsiDirectoryNode" /> + </path> + </expand> + <select /> + </subPane> + </pane> + <pane id="PackagesPane" /> + <pane id="Scope" /> + </panes> + </component> + <component name="PropertiesComponent"> + <property name="Downloaded.Files.Path.Enabled" value="false" /> + <property name="Repository.Attach.Annotations" value="false" /> + <property name="Repository.Attach.JavaDocs" value="false" /> + <property name="Repository.Attach.Sources" value="false" /> + <property name="WebServerToolWindowFactoryState" value="false" /> + <property name="aspect.path.notification.shown" value="true" /> + <property name="com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrary" value="JUnit3" /> + <property name="com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrarySuperClass.JUnit3" value="junit.framework.TestCase" /> + <property name="create.test.in.the.same.root" value="true" /> + </component> + <component name="RecentsManager"> + <key name="CreateTestDialog.RecentsKey"> + <recent name="" /> + </key> + <key name="CreateTestDialog.Recents.Supers"> + <recent name="junit.framework.TestCase" /> + </key> + </component> + <component name="RunDashboard"> + <option name="ruleStates"> + <list> + <RuleState> + <option name="name" value="ConfigurationTypeDashboardGroupingRule" /> + </RuleState> + <RuleState> + <option name="name" value="StatusDashboardGroupingRule" /> + </RuleState> + </list> + </option> + </component> + <component name="RunManager"> + <configuration name="Main" type="Application" factoryName="Application" temporary="true"> + <option name="MAIN_CLASS_NAME" value="Main" /> + <module name="te" /> + <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" /> + <RunnerSettings RunnerId="Run" /> + <ConfigurationWrapper RunnerId="Run" /> + <method v="2"> + <option name="Make" enabled="true" /> + </method> + </configuration> + <recent_temporary> + <list> + <item itemvalue="Application.Main" /> + </list> + </recent_temporary> + </component> + <component name="SvnConfiguration"> + <configuration /> + </component> + <component name="TaskManager"> + <task active="true" id="Default" summary="Default task"> + <changelist id="6eb92187-73ee-4991-b5c2-d3d985b6042a" name="Default Changelist" comment="" /> + <created>1556823388959</created> + <option name="number" value="Default" /> + <option name="presentableId" value="Default" /> + <updated>1556823388959</updated> + <workItem from="1556823390967" duration="1949000" /> + </task> + <servers /> + </component> + <component name="TimeTrackingManager"> + <option name="totallyTimeSpent" value="1949000" /> + </component> + <component name="ToolWindowManager"> + <frame x="239" y="152" width="1080" height="676" extended-state="0" /> + <editor active="true" /> + <layout> + <window_info id="Image Layers" /> + <window_info id="Designer" /> + <window_info id="UI Designer" /> + <window_info id="Capture Tool" /> + <window_info id="Favorites" side_tool="true" /> + <window_info active="true" content_ui="combo" id="Project" order="0" visible="true" weight="0.2495183" /> + <window_info id="Structure" order="1" side_tool="true" weight="0.25" /> + <window_info anchor="bottom" id="Messages" visible="true" weight="0.32876712" /> + <window_info anchor="bottom" id="Docker" show_stripe_button="false" /> + <window_info anchor="bottom" id="Database Changes" /> + <window_info anchor="bottom" id="Version Control" /> + <window_info anchor="bottom" id="Terminal" /> + <window_info anchor="bottom" id="Event Log" side_tool="true" /> + <window_info anchor="bottom" id="Message" order="0" /> + <window_info anchor="bottom" id="Find" order="1" /> + <window_info anchor="bottom" id="Run" order="2" weight="0.32876712" /> + <window_info anchor="bottom" id="Debug" order="3" weight="0.3989726" /> + <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" /> + <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" /> + <window_info anchor="bottom" id="TODO" order="6" /> + <window_info anchor="right" id="Palette" /> + <window_info anchor="right" id="Theme Preview" /> + <window_info anchor="right" id="Maven" /> + <window_info anchor="right" id="Capture Analysis" /> + <window_info anchor="right" id="Palette	" /> + <window_info anchor="right" id="Database" /> + <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" /> + <window_info anchor="right" id="Ant Build" order="1" weight="0.25" /> + <window_info anchor="right" content_ui="combo" id="Hierarchy" order="2" weight="0.25" /> + </layout> + </component> + <component name="TypeScriptGeneratedFilesManager"> + <option name="version" value="1" /> + </component> + <component name="XDebuggerManager"> + <watches-manager> + <configuration name="Application"> + <watch expression="c.easyline(new int[]{2}).toString()" language="JAVA" /> + </configuration> + </watches-manager> + </component> + <component name="debuggerHistoryManager"> + <expressions id="watch"> + <expression> + <expression-string>c.easyline(new int[]{2}).toString()</expression-string> + <language-id>JAVA</language-id> + <evaluation-mode>EXPRESSION</evaluation-mode> + </expression> + </expressions> + </component> + <component name="editorHistoryManager"> + <entry file="file://$PROJECT_DIR$/te.iml"> + <provider selected="true" editor-type-id="text-editor" /> + </entry> + <entry file="file://$PROJECT_DIR$/src/MainTest.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="60"> + <caret line="4" column="1" lean-forward="true" selection-start-line="4" selection-start-column="1" selection-end-line="4" selection-end-column="1" /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/Main.java"> + <provider selected="true" editor-type-id="text-editor"> + <state> + <caret selection-end-line="8" selection-end-column="1" /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/src/kata.java"> + <provider selected="true" editor-type-id="text-editor"> + <state> + <caret selection-end-line="11" /> + </state> + </provider> + </entry> + </component> +</project> \ No newline at end of file diff --git a/tests/java/assert/out/production/te/META-INF/te.kotlin_module b/tests/java/assert/out/production/te/META-INF/te.kotlin_module new file mode 100644 index 0000000000000000000000000000000000000000..8fb60192d378759239a3ecbf60eac8c8de446e9c Binary files /dev/null and b/tests/java/assert/out/production/te/META-INF/te.kotlin_module differ diff --git a/tests/java/assert/out/production/te/MainTest.class b/tests/java/assert/out/production/te/MainTest.class new file mode 100644 index 0000000000000000000000000000000000000000..5702dc2c1085b86cd32754c311331118e984f8a6 Binary files /dev/null and b/tests/java/assert/out/production/te/MainTest.class differ diff --git a/tests/java/assert/src/Main.java b/tests/java/assert/src/Main.java new file mode 100644 index 0000000000000000000000000000000000000000..2d46be991f73be511efff95972101c3de17223ed --- /dev/null +++ b/tests/java/assert/src/Main.java @@ -0,0 +1,9 @@ +import static org.junit.Assert.*; + +public class Main { + + public static void main(String[] args) { + assertArrayEquals(kata.bytwo(new int[]{2, 3, 5}), new int[]{4, 6, 10}); + assertArrayEquals(kata.bytwo(new int[]{12, 34, 52}), new int[]{24, 68, 104}); + } +} diff --git a/tests/java/assert/src/MainTest.java b/tests/java/assert/src/MainTest.java new file mode 100644 index 0000000000000000000000000000000000000000..bbd3a915fe1383db65292a3dd9ae10661de87687 --- /dev/null +++ b/tests/java/assert/src/MainTest.java @@ -0,0 +1,5 @@ +import junit.framework.TestCase; + +public class MainTest extends TestCase { + +} \ No newline at end of file diff --git a/tests/java/assert/src/kata.java b/tests/java/assert/src/kata.java new file mode 100644 index 0000000000000000000000000000000000000000..2b3c2120b1e05172eb0f55abd45a7e7c7123e416 --- /dev/null +++ b/tests/java/assert/src/kata.java @@ -0,0 +1,11 @@ +public class kata { + + public static int[] bytwo(int[] input) { + int[] output = new int[input.length]; + + for (int i = 0; i < input.length; i++) + output[i] = input[i] * 2; + return output; + } + +} diff --git a/tests/java/assert/te.iml b/tests/java/assert/te.iml new file mode 100644 index 0000000000000000000000000000000000000000..bb6b39c472ed6421b188b9690bbe2935856fd05b --- /dev/null +++ b/tests/java/assert/te.iml @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<module type="JAVA_MODULE" version="4"> + <component name="NewModuleRootManager" inherit-compiler-output="true"> + <exclude-output /> + <content url="file://$MODULE_DIR$"> + <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" /> + </content> + <orderEntry type="inheritedJdk" /> + <orderEntry type="sourceFolder" forTests="false" /> + <orderEntry type="module-library"> + <library name="JUnit4"> + <CLASSES> + <root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.12/junit-4.12.jar!/" /> + <root url="jar://$MAVEN_REPOSITORY$/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> + </component> +</module> \ No newline at end of file diff --git a/tests/serveur_compilation/front-end-compilation/package-lock.json b/tests/serveur_compilation/front-end-compilation/package-lock.json index 9a55f937d977985ea2d2c7c114ec258d443ea1d2..7e1cd19f97c3541e466549aecdb8f175c2607fca 100644 --- a/tests/serveur_compilation/front-end-compilation/package-lock.json +++ b/tests/serveur_compilation/front-end-compilation/package-lock.json @@ -925,6 +925,11 @@ "negotiator": "0.6.1" } }, + "ace-builds": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/ace-builds/-/ace-builds-1.4.4.tgz", + "integrity": "sha512-EQArUYup9c3lBv8meKBjisff/qhhQmU/6LnLhVDfxe+Bnjr0Lz7qhL4Mp8HpwNQzmCqLunjdPFuBtCELVVG6zw==" + }, "acorn": { "version": "6.1.1", "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.1.1.tgz", @@ -1595,6 +1600,11 @@ "multicast-dns-service-types": "^1.1.0" } }, + "brace": { + "version": "0.11.1", + "resolved": "https://registry.npmjs.org/brace/-/brace-0.11.1.tgz", + "integrity": "sha1-SJb8ydVE7vRfS7dmDbMg07N5/lg=" + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -4424,11 +4434,6 @@ "minimalistic-assert": "^1.0.1" } }, - "highlight.js": { - "version": "9.15.6", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-9.15.6.tgz", - "integrity": "sha512-zozTAWM1D6sozHo8kqhfYgsac+B+q0PmsjXeyDrYIHHcBN0zTVT66+s2GW1GZv7DbyaROdLXKdabwS/WqPyIdQ==" - }, "hmac-drbg": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", @@ -6377,12 +6382,13 @@ "integrity": "sha512-MFh0d/Wa7vkKO3Y3LlacqAEeHK0mckVqzDieUKTT+KGxi+zIpeVsFxymkIiRpbpDziHc290Xr9A1O4Om7otoRA==", "dev": true }, - "ngx-highlightjs": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/ngx-highlightjs/-/ngx-highlightjs-3.0.3.tgz", - "integrity": "sha512-/Eh+uJL9CiePWXzyT7VpLaQoWQyyNEUQaHhJ4faUBQZLBpachCBY55iDX0mi50zG9dapTiiapH5Vz/sL2GDxlg==", + "ng2-ace-editor": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/ng2-ace-editor/-/ng2-ace-editor-0.3.9.tgz", + "integrity": "sha512-e8Q4YCirlL/OEiekewmzupG+zV3prYsiYmQnRzQzd0wNgsPjOLOdb0it7cCbzFfIXKGyIIHKTW5584WxPr2LnQ==", "requires": { - "tslib": "^1.9.0" + "ace-builds": "^1.4.2", + "brace": "^0.11.1" } }, "nice-try": { diff --git a/tests/serveur_compilation/front-end-compilation/package.json b/tests/serveur_compilation/front-end-compilation/package.json index 6adeeb07fe1bdcb5d8fc4ef1ad55433cf0e963ee..e8e343424fc048cea21b2e7e79b8596caa59b756 100644 --- a/tests/serveur_compilation/front-end-compilation/package.json +++ b/tests/serveur_compilation/front-end-compilation/package.json @@ -19,10 +19,10 @@ "@angular/platform-browser": "~7.2.0", "@angular/platform-browser-dynamic": "~7.2.0", "@angular/router": "~7.2.0", + "brace": "^0.11.1", "core-js": "^2.5.4", - "highlight.js": "^9.15.6", "jquery": "^3.4.0", - "ngx-highlightjs": "^3.0.3", + "ng2-ace-editor": "^0.3.9", "rxjs": "~6.3.3", "tslib": "^1.9.0", "zone.js": "~0.8.26" diff --git a/tests/serveur_compilation/front-end-compilation/src/app/ace-assert/ace-assert.component.css b/tests/serveur_compilation/front-end-compilation/src/app/ace-assert/ace-assert.component.css new file mode 100644 index 0000000000000000000000000000000000000000..d5dfe132196fcd0b123088e772ab42f53d3e97e1 --- /dev/null +++ b/tests/serveur_compilation/front-end-compilation/src/app/ace-assert/ace-assert.component.css @@ -0,0 +1,8 @@ +ace-editor{ + width:500px; + height: 300px; + border-radius: 12px; + border: 2px solid rgba(44, 62, 80, 1.0); + margin:20px; + padding: 10px; +} diff --git a/tests/serveur_compilation/front-end-compilation/src/app/ace-assert/ace-assert.component.html b/tests/serveur_compilation/front-end-compilation/src/app/ace-assert/ace-assert.component.html new file mode 100644 index 0000000000000000000000000000000000000000..860def6b6d98e1e2a0d068659ca54cf40d22edf0 --- /dev/null +++ b/tests/serveur_compilation/front-end-compilation/src/app/ace-assert/ace-assert.component.html @@ -0,0 +1 @@ +<ace-editor [readOnly]="true" [mode]="type" [(text)]="code" #editor></ace-editor> diff --git a/tests/serveur_compilation/front-end-compilation/src/app/ace-assert/ace-assert.component.spec.ts b/tests/serveur_compilation/front-end-compilation/src/app/ace-assert/ace-assert.component.spec.ts new file mode 100644 index 0000000000000000000000000000000000000000..5222bc3d3c2150c311a0d108862440df45aeb179 --- /dev/null +++ b/tests/serveur_compilation/front-end-compilation/src/app/ace-assert/ace-assert.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { AceAssertComponent } from './ace-assert.component'; + +describe('AceAssertComponent', () => { + let component: AceAssertComponent; + let fixture: ComponentFixture<AceAssertComponent>; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ AceAssertComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(AceAssertComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/tests/serveur_compilation/front-end-compilation/src/app/ace-assert/ace-assert.component.ts b/tests/serveur_compilation/front-end-compilation/src/app/ace-assert/ace-assert.component.ts new file mode 100644 index 0000000000000000000000000000000000000000..de0e383469b13d4228c44ed1ae2ba0b8b8cb8339 --- /dev/null +++ b/tests/serveur_compilation/front-end-compilation/src/app/ace-assert/ace-assert.component.ts @@ -0,0 +1,33 @@ + +import {AfterViewInit, Component, Input, ViewChild} from '@angular/core'; +import 'brace/index'; +import 'brace/theme/dracula'; +import 'brace/mode/python'; +import 'brace/mode/plain_text'; + +@Component({ + selector: 'app-ace-assert', + templateUrl: './ace-assert.component.html', + styleUrls: ['./ace-assert.component.css'] +}) +export class AceAssertComponent implements AfterViewInit { + @ViewChild('editor') editor; + @Input() code: string; + @Input() type: string; + + ngAfterViewInit() { + this.editor.setTheme('dracula'); + this.editor.getEditor().setOptions({ + enableBasicAutocompletion: true + }); + + this.editor.getEditor().commands.addCommand({ + name: 'showOtherCompletions', + bindKey: 'Ctrl-.', + exec(editor) { + + } + }); + } + +} diff --git a/tests/serveur_compilation/front-end-compilation/src/app/ace/ace.component.css b/tests/serveur_compilation/front-end-compilation/src/app/ace/ace.component.css new file mode 100644 index 0000000000000000000000000000000000000000..483f5225f6cd4ccf0e3424f0858d6b6c3e968a4e --- /dev/null +++ b/tests/serveur_compilation/front-end-compilation/src/app/ace/ace.component.css @@ -0,0 +1,8 @@ +ace-editor{ + width:500px; + height: 300px; + border-radius: 12px; + border: 2px solid rgba(44, 62, 80, 1.0); + margin: 20px; + padding: 10px; +} diff --git a/tests/serveur_compilation/front-end-compilation/src/app/ace/ace.component.html b/tests/serveur_compilation/front-end-compilation/src/app/ace/ace.component.html new file mode 100644 index 0000000000000000000000000000000000000000..f860115080de1ccb0fa851e88b0ca7a5266c61a0 --- /dev/null +++ b/tests/serveur_compilation/front-end-compilation/src/app/ace/ace.component.html @@ -0,0 +1 @@ +<ace-editor [readOnly]="false" [mode]="type" (textChanged)="onChange($event)" [autoUpdateContent]="true" [(text)]="code" [durationBeforeCallback]="1000" #editor></ace-editor> diff --git a/tests/serveur_compilation/front-end-compilation/src/app/ace/ace.component.spec.ts b/tests/serveur_compilation/front-end-compilation/src/app/ace/ace.component.spec.ts new file mode 100644 index 0000000000000000000000000000000000000000..8576af8dbc673c45385b7b0d690cd2155c368b23 --- /dev/null +++ b/tests/serveur_compilation/front-end-compilation/src/app/ace/ace.component.spec.ts @@ -0,0 +1,25 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; + +import { AceComponent } from './ace.component'; + +describe('AceComponent', () => { + let component: AceComponent; + let fixture: ComponentFixture<AceComponent>; + + beforeEach(async(() => { + TestBed.configureTestingModule({ + declarations: [ AceComponent ] + }) + .compileComponents(); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(AceComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/tests/serveur_compilation/front-end-compilation/src/app/ace/ace.component.ts b/tests/serveur_compilation/front-end-compilation/src/app/ace/ace.component.ts new file mode 100644 index 0000000000000000000000000000000000000000..fd5548f64050717a5d9d8b06f4e6e4f0cb38ffa6 --- /dev/null +++ b/tests/serveur_compilation/front-end-compilation/src/app/ace/ace.component.ts @@ -0,0 +1,41 @@ +import {AfterViewInit, Component, EventEmitter, Input, Output, ViewChild} from '@angular/core'; +import 'brace/index'; +import 'brace/theme/dracula'; +import 'brace/mode/python'; +import 'brace/mode/plain_text'; + +@Component({ + selector: 'app-ace', + templateUrl: './ace.component.html', + styleUrls: ['./ace.component.css'] +}) +export class AceComponent implements AfterViewInit { + + @ViewChild('editor') editor; + @Input() code: string; + @Input() type: string; + @Output() new = new EventEmitter<string>(); + + onChange(code) { + this.new.emit(code); + this.code = code; + } + + ngAfterViewInit() { + this.editor.setTheme('dracula'); + + this.editor.getEditor().setOptions({ + enableBasicAutocompletion: true + }); + +/* + this.editor.getEditor().commands.addCommand({ + name: 'showOtherCompletions', + bindKey: 'Ctrl-.', + exec(editor) { +alert(""); + } + });*/ + } + +} diff --git a/tests/serveur_compilation/front-end-compilation/src/app/app.component.css b/tests/serveur_compilation/front-end-compilation/src/app/app.component.css index 5dc97c44a9e534747dcc54e8b01bc0a0292551c2..5100d7a8ee6a3aaf924ec88382bc608af7c52083 100644 --- a/tests/serveur_compilation/front-end-compilation/src/app/app.component.css +++ b/tests/serveur_compilation/front-end-compilation/src/app/app.component.css @@ -3,3 +3,4 @@ h1{ font-family: Arial; margin-left:20px; } + diff --git a/tests/serveur_compilation/front-end-compilation/src/app/app.module.ts b/tests/serveur_compilation/front-end-compilation/src/app/app.module.ts index 41e3b88047bd8f247c926f1e7dd451d683e3385a..4ac6481d6e271420e96e221934ab4d29b59ab257 100644 --- a/tests/serveur_compilation/front-end-compilation/src/app/app.module.ts +++ b/tests/serveur_compilation/front-end-compilation/src/app/app.module.ts @@ -1,27 +1,23 @@ import { BrowserModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; -import { HighlightModule } from 'ngx-highlightjs'; import { AppComponent } from './app.component'; import { CompilateurComponent } from './compilateur/compilateur.component'; import {FormsModule} from '@angular/forms'; - -import python from 'highlight.js/lib/languages/python'; - -export function hljsLanguages() { - return [ - {name: 'python', func: python} - ]; -} +import { AceEditorModule } from 'ng2-ace-editor'; +import { AceComponent } from './ace/ace.component'; +import { AceAssertComponent } from './ace-assert/ace-assert.component'; @NgModule({ declarations: [ AppComponent, - CompilateurComponent + CompilateurComponent, + AceComponent, + AceAssertComponent ], imports: [ BrowserModule, FormsModule, - HighlightModule.forRoot({ languages: hljsLanguages }) + AceEditorModule ], providers: [], bootstrap: [AppComponent] diff --git a/tests/serveur_compilation/front-end-compilation/src/app/compilateur/compilateur.component.css b/tests/serveur_compilation/front-end-compilation/src/app/compilateur/compilateur.component.css index 9ea716f7b112483f870de7ade502de473aa23b3c..40b7beda6863c01401c551995e7b80d73f6c2750 100644 --- a/tests/serveur_compilation/front-end-compilation/src/app/compilateur/compilateur.component.css +++ b/tests/serveur_compilation/front-end-compilation/src/app/compilateur/compilateur.component.css @@ -7,6 +7,13 @@ textarea { padding: 10px; resize: none; outline: none; + height: 300px; + width: 500px; +} + +* { + font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace; + display: inline-block } button { diff --git a/tests/serveur_compilation/front-end-compilation/src/app/compilateur/compilateur.component.html b/tests/serveur_compilation/front-end-compilation/src/app/compilateur/compilateur.component.html index fd143f19f1fdba1bb30087cddac840df1f11d7cd..07e3fb5812b981c803c82c6fe280b467c990d1f8 100644 --- a/tests/serveur_compilation/front-end-compilation/src/app/compilateur/compilateur.component.html +++ b/tests/serveur_compilation/front-end-compilation/src/app/compilateur/compilateur.component.html @@ -1,25 +1,21 @@ <select (change)="update($event)"> - <option value="help">?</option> + <option value="plain_text">?</option> <option value="python">Python 3</option> <option value="java">Java</option> </select> <br/> <br/> -<textarea disabled rows="20" cols="100" [(ngModel)]="help"> -</textarea> + <textarea disabled [(ngModel)]="help"></textarea> + <app-ace [code]="code" [type]="type" (new)="OnNewEvent($event)"></app-ace><br> + <app-ace-assert [code]="assert" [type]="type"></app-ace-assert> + <textarea [ngClass]="{'success':status === 0,'error':status === 1,'':status === 2}" style="white-space: pre-wrap" disabled [(ngModel)]="result"></textarea> + + + -<pre><code [highlight]="code"></code></pre> -<!--<textarea rows="20" cols="100" [(ngModel)]="placeholer"> -</textarea>--> -<br/> -<textarea disabled rows="20" cols="100" [(ngModel)]="assert"> -</textarea> -<textarea [ngClass]="{'success':status === 0,'error':status === 1,'':status === 2}" style="white-space: pre-wrap" disabled rows="20" cols="100" - [(ngModel)]="result"> -</textarea> <br/> -<button *ngIf="display_button" (click)="compile(placeholer,assert)" class="code">compile</button> +<button *ngIf="display_button" (click)="compile(code,assert)" class="code">compile</button> diff --git a/tests/serveur_compilation/front-end-compilation/src/app/compilateur/compilateur.component.ts b/tests/serveur_compilation/front-end-compilation/src/app/compilateur/compilateur.component.ts index 273697a3afb50fb8b93b8529c317dca25ff22468..09ece7a4fc0b5400f5c7c40f41cf7d3862d5edfb 100644 --- a/tests/serveur_compilation/front-end-compilation/src/app/compilateur/compilateur.component.ts +++ b/tests/serveur_compilation/front-end-compilation/src/app/compilateur/compilateur.component.ts @@ -1,7 +1,7 @@ import {Component, OnInit} from '@angular/core'; import {CompilationService} from '../compilation.service'; import * as $ from 'jquery'; -import {HighlightResult} from 'ngx-highlightjs'; + @Component({ selector: 'app-compilateur', @@ -17,11 +17,11 @@ export class CompilateurComponent implements OnInit { type = 'help'; - assert = 'Assert that will be tested with the chosen language'; + assert = ''; display_button = false; - help = ''; + help = 'plain_text'; status = 2; @@ -41,21 +41,37 @@ export class CompilateurComponent implements OnInit { 'assert_that(m.easyline([45,53,12])).is_equal_to([90,106,24])\n' + 'assert_that(m.easyline([3])).is_equal_to([6])'; } else if (this.type === 'java') { - this.code = 'public class HelloWorld {\n' + + this.code = 'public class kata {\n' + '\n' + - ' public static void main(String[] args) {\n' + - ' // Prints "Hello, World" to the terminal window.\n' + - ' System.out.println("Hello, World");\n' + + ' public static int[] bytwo(int[] input) {\n' + + ' int[] output = new int[input.length];\n' + + '\n' + + ' for (int i = 0; i < input.length; i++)\n' + + ' output[i] = input[i] * 2;\n' + + ' return output;\n' + ' }\n' + '\n' + + '}\n'; + this.help = 'Le but ici est de jouer avec les tableaux en java. dans cet exercice, il faut multiplier tous les éléments d\'un tableau par 2.\nbytwo([2,4]) donnera par exemple [4,8]'; + this.assert = 'import static org.junit.Assert.*;\n' + + '\n' + + 'public class Main {\n' + + '\n' + + ' public static void main(String[] args) {\n' + + ' assertArrayEquals(kata.bytwo(new int[]{2, 3, 5}), new int[]{4, 6, 10});\n' + + ' assertArrayEquals(kata.bytwo(new int[]{12, 34, 52}), new int[]{24, 68, 104});\n' + + ' }\n' + '}'; } else { this.display_button = false; } } - compile(stream: string, assert: string): void { + OnNewEvent(event: any): void { + this.code = event.toString(); + } + compile(stream: string, assert: string): void { const response = $.parseJSON(this.compilation.compile(this.type, stream, assert)); if (response.exit === 0) { diff --git a/tests/serveur_compilation/server_rest/.idea/workspace.xml b/tests/serveur_compilation/server_rest/.idea/workspace.xml index 3ad70236512bb843fe6009315a69791baa7ec431..d70dceb00d833bb7628ea8595a12e2d52aa5c12d 100644 --- a/tests/serveur_compilation/server_rest/.idea/workspace.xml +++ b/tests/serveur_compilation/server_rest/.idea/workspace.xml @@ -2,22 +2,20 @@ <project version="4"> <component name="ChangeListManager"> <list default="true" id="e6a1f2e5-4f60-4227-82bb-83eb10fa94a5" name="Default Changelist" comment=""> - <change afterPath="$PROJECT_DIR$/../../JWT/.idea/compiler.xml" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/../../JWT/.idea/vcs.xml" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/../../JWT/src/main/java/MockUser.java" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/../../JWT/src/main/java/app.java" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/../../angular/routing-test/src/app/nav/nav.component.css" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/../../angular/routing-test/src/app/nav/nav.component.html" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/../../angular/routing-test/src/app/nav/nav.component.spec.ts" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/../../angular/routing-test/src/app/nav/nav.component.ts" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/../front-end-compilation/angular.json" beforeDir="false" afterPath="$PROJECT_DIR$/../front-end-compilation/angular.json" afterDir="false" /> + <change afterPath="$PROJECT_DIR$/../front-end-compilation/src/app/ace/ace.component.html" afterDir="false" /> <change beforePath="$PROJECT_DIR$/../front-end-compilation/package-lock.json" beforeDir="false" afterPath="$PROJECT_DIR$/../front-end-compilation/package-lock.json" afterDir="false" /> <change beforePath="$PROJECT_DIR$/../front-end-compilation/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/../front-end-compilation/package.json" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/../front-end-compilation/src/app/app.component.css" beforeDir="false" afterPath="$PROJECT_DIR$/../front-end-compilation/src/app/app.component.css" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/../front-end-compilation/src/app/app.module.ts" beforeDir="false" afterPath="$PROJECT_DIR$/../front-end-compilation/src/app/app.module.ts" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/../front-end-compilation/src/app/compilateur/compilateur.component.css" beforeDir="false" afterPath="$PROJECT_DIR$/../front-end-compilation/src/app/compilateur/compilateur.component.css" afterDir="false" /> <change beforePath="$PROJECT_DIR$/../front-end-compilation/src/app/compilateur/compilateur.component.html" beforeDir="false" afterPath="$PROJECT_DIR$/../front-end-compilation/src/app/compilateur/compilateur.component.html" afterDir="false" /> <change beforePath="$PROJECT_DIR$/../front-end-compilation/src/app/compilateur/compilateur.component.ts" beforeDir="false" afterPath="$PROJECT_DIR$/../front-end-compilation/src/app/compilateur/compilateur.component.ts" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/.idea/compiler.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/compiler.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/../serveur_compilation/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../serveur_compilation/.idea/workspace.xml" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/../serveur_compilation/docker/dockerfile" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../serveur_compilation/share_docker_file/test.txt" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/../serveur_compilation/src/main/java/compilation.java" beforeDir="false" afterPath="$PROJECT_DIR$/../serveur_compilation/src/main/java/compilation.java" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/../serveur_compilation/target/classes/compilation.class" beforeDir="false" afterPath="$PROJECT_DIR$/../serveur_compilation/target/classes/compilation.class" afterDir="false" /> </list> <ignored path="$PROJECT_DIR$/out/" /> <ignored path="$PROJECT_DIR$/target/" /> @@ -35,8 +33,8 @@ <file pinned="false" current-in-tab="true"> <entry file="file://$PROJECT_DIR$/pom.xml"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="450"> - <caret line="30" column="37" selection-start-line="30" selection-start-column="37" selection-end-line="30" selection-end-column="37" /> + <state relative-caret-position="300"> + <caret line="20" column="12" lean-forward="true" selection-start-line="20" selection-start-column="12" selection-end-line="20" selection-end-column="12" /> </state> </provider> </entry> @@ -77,10 +75,11 @@ </list> </option> </component> - <component name="ProjectFrameBounds" fullScreen="true"> - <option name="x" value="1920" /> - <option name="width" value="954" /> - <option name="height" value="1200" /> + <component name="ProjectFrameBounds" extendedState="6" fullScreen="true"> + <option name="x" value="180" /> + <option name="y" value="112" /> + <option name="width" value="1080" /> + <option name="height" value="676" /> </component> <component name="ProjectLevelVcsManager" settingsEditedManually="true"> <ConfirmationsSetting value="1" id="Add" /> @@ -162,16 +161,19 @@ <workItem from="1556726276244" duration="564000" /> <workItem from="1556780852399" duration="717000" /> <workItem from="1556782481100" duration="1657000" /> - <workItem from="1556798510990" duration="385000" /> + <workItem from="1556798510990" duration="913000" /> + <workItem from="1556825781920" duration="452000" /> + <workItem from="1556827416534" duration="171000" /> + <workItem from="1556827744217" duration="333000" /> + <workItem from="1556829690737" duration="985000" /> </task> <servers /> </component> <component name="TimeTrackingManager"> - <option name="totallyTimeSpent" value="5054000" /> + <option name="totallyTimeSpent" value="7523000" /> </component> <component name="ToolWindowManager"> - <frame x="1920" y="0" width="1920" height="1200" extended-state="0" /> - <editor active="true" /> + <frame x="0" y="0" width="1440" height="900" extended-state="6" /> <layout> <window_info content_ui="combo" id="Project" order="0" weight="0.2603834" /> <window_info id="Structure" order="1" side_tool="true" weight="0.25" /> @@ -182,7 +184,7 @@ <window_info id="Favorites" order="6" side_tool="true" /> <window_info anchor="bottom" id="Message" order="0" /> <window_info anchor="bottom" id="Find" order="1" /> - <window_info active="true" anchor="bottom" id="Run" order="2" visible="true" weight="0.3" /> + <window_info anchor="bottom" id="Run" order="2" weight="0.3" /> <window_info anchor="bottom" id="Debug" order="3" weight="0.4" /> <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" /> <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" /> @@ -190,7 +192,7 @@ <window_info anchor="bottom" id="Docker" order="7" show_stripe_button="false" /> <window_info anchor="bottom" id="Version Control" order="8" /> <window_info anchor="bottom" id="Database Changes" order="9" /> - <window_info anchor="bottom" id="Terminal" order="10" /> + <window_info active="true" anchor="bottom" id="Terminal" order="10" visible="true" weight="0.32891566" /> <window_info anchor="bottom" id="Event Log" order="11" side_tool="true" /> <window_info anchor="bottom" id="Messages" order="12" /> <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" /> @@ -210,8 +212,8 @@ <component name="editorHistoryManager"> <entry file="file://$PROJECT_DIR$/pom.xml"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="450"> - <caret line="30" column="37" selection-start-line="30" selection-start-column="37" selection-end-line="30" selection-end-column="37" /> + <state relative-caret-position="300"> + <caret line="20" column="12" lean-forward="true" selection-start-line="20" selection-start-column="12" selection-end-line="20" selection-end-column="12" /> </state> </provider> </entry> diff --git a/tests/serveur_compilation/serveur_compilation/.idea/workspace.xml b/tests/serveur_compilation/serveur_compilation/.idea/workspace.xml index 540d75c83f04826a71a6525939c86bb721b01235..0d1cdeccd32fd7bad76eb3302b0967c1ee6efc2a 100644 --- a/tests/serveur_compilation/serveur_compilation/.idea/workspace.xml +++ b/tests/serveur_compilation/serveur_compilation/.idea/workspace.xml @@ -2,22 +2,20 @@ <project version="4"> <component name="ChangeListManager"> <list default="true" id="8d8fb2c1-8426-4933-8193-ee68625cf8de" name="Default Changelist" comment=""> - <change afterPath="$PROJECT_DIR$/../../JWT/.idea/compiler.xml" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/../../JWT/.idea/vcs.xml" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/../../JWT/src/main/java/MockUser.java" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/../../JWT/src/main/java/app.java" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/../../angular/routing-test/src/app/nav/nav.component.css" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/../../angular/routing-test/src/app/nav/nav.component.html" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/../../angular/routing-test/src/app/nav/nav.component.spec.ts" afterDir="false" /> - <change afterPath="$PROJECT_DIR$/../../angular/routing-test/src/app/nav/nav.component.ts" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/../front-end-compilation/angular.json" beforeDir="false" afterPath="$PROJECT_DIR$/../front-end-compilation/angular.json" afterDir="false" /> + <change afterPath="$PROJECT_DIR$/../front-end-compilation/src/app/ace/ace.component.html" afterDir="false" /> <change beforePath="$PROJECT_DIR$/../front-end-compilation/package-lock.json" beforeDir="false" afterPath="$PROJECT_DIR$/../front-end-compilation/package-lock.json" afterDir="false" /> <change beforePath="$PROJECT_DIR$/../front-end-compilation/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/../front-end-compilation/package.json" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/../front-end-compilation/src/app/app.component.css" beforeDir="false" afterPath="$PROJECT_DIR$/../front-end-compilation/src/app/app.component.css" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/../front-end-compilation/src/app/app.module.ts" beforeDir="false" afterPath="$PROJECT_DIR$/../front-end-compilation/src/app/app.module.ts" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/../front-end-compilation/src/app/compilateur/compilateur.component.css" beforeDir="false" afterPath="$PROJECT_DIR$/../front-end-compilation/src/app/compilateur/compilateur.component.css" afterDir="false" /> <change beforePath="$PROJECT_DIR$/../front-end-compilation/src/app/compilateur/compilateur.component.html" beforeDir="false" afterPath="$PROJECT_DIR$/../front-end-compilation/src/app/compilateur/compilateur.component.html" afterDir="false" /> <change beforePath="$PROJECT_DIR$/../front-end-compilation/src/app/compilateur/compilateur.component.ts" beforeDir="false" afterPath="$PROJECT_DIR$/../front-end-compilation/src/app/compilateur/compilateur.component.ts" afterDir="false" /> - <change beforePath="$PROJECT_DIR$/../server_rest/.idea/compiler.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../server_rest/.idea/compiler.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/../server_rest/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/../server_rest/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/docker/dockerfile" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/share_docker_file/test.txt" beforeDir="false" /> + <change beforePath="$PROJECT_DIR$/src/main/java/compilation.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/main/java/compilation.java" afterDir="false" /> + <change beforePath="$PROJECT_DIR$/target/classes/compilation.class" beforeDir="false" afterPath="$PROJECT_DIR$/target/classes/compilation.class" afterDir="false" /> </list> <ignored path="$PROJECT_DIR$/out/" /> <ignored path="$PROJECT_DIR$/target/" /> @@ -44,8 +42,8 @@ <file pinned="false" current-in-tab="true"> <entry file="file://$PROJECT_DIR$/src/main/java/compilation.java"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="360"> - <caret line="24" column="60" lean-forward="true" selection-start-line="24" selection-start-column="60" selection-end-line="24" selection-end-column="60" /> + <state relative-caret-position="315"> + <caret line="21" column="179" selection-start-line="21" selection-start-column="179" selection-end-line="21" selection-end-column="287" /> <folding> <element signature="imports" expanded="true" /> </folding> @@ -56,8 +54,8 @@ <file pinned="false" current-in-tab="false"> <entry file="file://$PROJECT_DIR$/src/main/java/app.java"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="75"> - <caret line="6" column="15" selection-start-line="6" selection-start-column="15" selection-end-line="6" selection-end-column="15" /> + <state relative-caret-position="165"> + <caret line="12" column="5" selection-start-line="12" selection-start-column="5" selection-end-line="12" selection-end-column="5" /> </state> </provider> </entry> @@ -71,6 +69,7 @@ <option name="CHANGED_PATHS"> <list> <option value="$PROJECT_DIR$/pom.xml" /> + <option value="$PROJECT_DIR$/share_docker_file/Main.java" /> <option value="$PROJECT_DIR$/src/main/java/compilation.java" /> </list> </option> @@ -83,22 +82,47 @@ </option> </component> <component name="ProjectFrameBounds" fullScreen="true"> - <option name="x" value="1920" /> - <option name="width" value="954" /> - <option name="height" value="1200" /> + <option name="x" value="180" /> + <option name="y" value="112" /> + <option name="width" value="1080" /> + <option name="height" value="676" /> </component> <component name="ProjectLevelVcsManager" settingsEditedManually="true" /> <component name="ProjectView"> <navigator proportions="" version="1"> <foldersAlwaysOnTop value="true" /> </navigator> - <panes /> + <panes> + <pane id="PackagesPane" /> + <pane id="Scope" /> + <pane id="ProjectPane"> + <subPane> + <expand> + <path> + <item name="serveur_compilation" type="b2602c69:ProjectViewProjectNode" /> + <item name="serveur_compilation" type="462c0819:PsiDirectoryNode" /> + </path> + <path> + <item name="serveur_compilation" type="b2602c69:ProjectViewProjectNode" /> + <item name="serveur_compilation" type="462c0819:PsiDirectoryNode" /> + <item name="docker" type="462c0819:PsiDirectoryNode" /> + </path> + <path> + <item name="serveur_compilation" type="b2602c69:ProjectViewProjectNode" /> + <item name="serveur_compilation" type="462c0819:PsiDirectoryNode" /> + <item name="share_docker_file" type="462c0819:PsiDirectoryNode" /> + </path> + </expand> + <select /> + </subPane> + </pane> + </panes> </component> <component name="PropertiesComponent"> <property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" /> <property name="WebServerToolWindowFactoryState" value="false" /> <property name="aspect.path.notification.shown" value="true" /> - <property name="last_opened_file_path" value="$PROJECT_DIR$" /> + <property name="last_opened_file_path" value="$PROJECT_DIR$/share_docker_file" /> <property name="node.js.detected.package.eslint" value="true" /> <property name="node.js.path.for.package.eslint" value="project" /> <property name="node.js.selected.package.eslint" value="(autodetect)" /> @@ -111,6 +135,7 @@ </component> <component name="RecentsManager"> <key name="CopyFile.RECENT_KEYS"> + <recent name="$PROJECT_DIR$/share_docker_file" /> <recent name="$PROJECT_DIR$/src/main/java" /> </key> </component> @@ -163,18 +188,31 @@ <workItem from="1556724368190" duration="1020000" /> <workItem from="1556780851092" duration="1114000" /> <workItem from="1556782478266" duration="80000" /> - <workItem from="1556798541427" duration="358000" /> + <workItem from="1556798541427" duration="1170000" /> + <workItem from="1556825709873" duration="971000" /> + <workItem from="1556827413018" duration="173000" /> + <workItem from="1556827741611" duration="619000" /> + <workItem from="1556829689470" duration="1450000" /> </task> <servers /> </component> <component name="TimeTrackingManager"> - <option name="totallyTimeSpent" value="5210000" /> + <option name="totallyTimeSpent" value="9235000" /> + </component> + <component name="TodoView"> + <todo-panel id="selected-file"> + <is-autoscroll-to-source value="true" /> + </todo-panel> + <todo-panel id="all"> + <are-packages-shown value="true" /> + <is-autoscroll-to-source value="true" /> + </todo-panel> </component> <component name="ToolWindowManager"> - <frame x="1920" y="0" width="1920" height="1200" extended-state="0" /> + <frame x="0" y="0" width="1440" height="900" extended-state="0" /> <editor active="true" /> <layout> - <window_info content_ui="combo" id="Project" order="0" weight="0.25772098" /> + <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.26824033" /> <window_info id="Structure" order="1" side_tool="true" weight="0.25" /> <window_info id="Image Layers" order="2" /> <window_info id="Designer" order="3" /> @@ -182,16 +220,16 @@ <window_info id="Capture Tool" order="5" /> <window_info id="Favorites" order="6" side_tool="true" /> <window_info anchor="bottom" id="Message" order="0" /> - <window_info anchor="bottom" id="Find" order="1" /> - <window_info active="true" anchor="bottom" id="Run" order="2" visible="true" weight="0.32920355" /> + <window_info anchor="bottom" id="Find" order="1" weight="0.32891566" /> + <window_info anchor="bottom" id="Run" order="2" weight="0.32891566" /> <window_info anchor="bottom" id="Debug" order="3" weight="0.4" /> <window_info anchor="bottom" id="Cvs" order="4" weight="0.25" /> <window_info anchor="bottom" id="Inspection" order="5" weight="0.4" /> - <window_info anchor="bottom" id="TODO" order="6" /> + <window_info anchor="bottom" id="TODO" order="6" weight="0.32891566" /> <window_info anchor="bottom" id="Docker" order="7" show_stripe_button="false" /> - <window_info anchor="bottom" id="Version Control" order="8" /> + <window_info anchor="bottom" id="Version Control" order="8" weight="0.32891566" /> <window_info anchor="bottom" id="Database Changes" order="9" /> - <window_info anchor="bottom" id="Terminal" order="10" weight="0.32920355" /> + <window_info anchor="bottom" id="Terminal" order="10" weight="0.32891566" /> <window_info anchor="bottom" id="Event Log" order="11" side_tool="true" /> <window_info anchor="bottom" id="Messages" order="12" /> <window_info anchor="right" id="Commander" internal_type="SLIDING" order="0" type="SLIDING" weight="0.4" /> @@ -208,7 +246,20 @@ <component name="TypeScriptGeneratedFilesManager"> <option name="version" value="1" /> </component> + <component name="XDebuggerManager"> + <breakpoint-manager> + <breakpoints> + <line-breakpoint enabled="true" type="java-line"> + <url>file://$PROJECT_DIR$/src/main/java/compilation.java</url> + <line>47</line> + <properties /> + <option name="timeStamp" value="1" /> + </line-breakpoint> + </breakpoints> + </breakpoint-manager> + </component> <component name="editorHistoryManager"> + <entry file="file://$PROJECT_DIR$/share_docker_file/test.txt" /> <entry file="file://$PROJECT_DIR$/pom.xml"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="705"> @@ -217,16 +268,23 @@ </provider> </entry> <entry file="file://$PROJECT_DIR$/src/main/java/app.java"> + <provider selected="true" editor-type-id="text-editor"> + <state relative-caret-position="165"> + <caret line="12" column="5" selection-start-line="12" selection-start-column="5" selection-end-line="12" selection-end-column="5" /> + </state> + </provider> + </entry> + <entry file="file://$PROJECT_DIR$/share_docker_file/Main.java"> <provider selected="true" editor-type-id="text-editor"> <state relative-caret-position="75"> - <caret line="6" column="15" selection-start-line="6" selection-start-column="15" selection-end-line="6" selection-end-column="15" /> + <caret line="5" column="48" selection-start-line="5" selection-start-column="48" selection-end-line="5" selection-end-column="48" /> </state> </provider> </entry> <entry file="file://$PROJECT_DIR$/src/main/java/compilation.java"> <provider selected="true" editor-type-id="text-editor"> - <state relative-caret-position="360"> - <caret line="24" column="60" lean-forward="true" selection-start-line="24" selection-start-column="60" selection-end-line="24" selection-end-column="60" /> + <state relative-caret-position="315"> + <caret line="21" column="179" selection-start-line="21" selection-start-column="179" selection-end-line="21" selection-end-column="287" /> <folding> <element signature="imports" expanded="true" /> </folding> diff --git a/tests/serveur_compilation/serveur_compilation/docker/java/dockerfile b/tests/serveur_compilation/serveur_compilation/docker/java/dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..5466d536df6ca59041eb1c53711520f39740398f --- /dev/null +++ b/tests/serveur_compilation/serveur_compilation/docker/java/dockerfile @@ -0,0 +1,13 @@ +FROM ubuntu:14.04 + +ENV DEBIAN_FRONTEND noninteractive + +RUN apt-get update && apt-get -y upgrade +RUN apt-get install -y default-jdk + + +RUN mkdir /env/ + +WORKDIR /env/ + +ENTRYPOINT ["export","CLASSPATH=$CLASSPATH:junit-4.10.jar"] \ No newline at end of file diff --git a/tests/serveur_compilation/serveur_compilation/docker/dockerfile b/tests/serveur_compilation/serveur_compilation/docker/python/dockerfile similarity index 100% rename from tests/serveur_compilation/serveur_compilation/docker/dockerfile rename to tests/serveur_compilation/serveur_compilation/docker/python/dockerfile diff --git a/tests/serveur_compilation/serveur_compilation/share_docker_file/Main.class b/tests/serveur_compilation/serveur_compilation/share_docker_file/Main.class new file mode 100644 index 0000000000000000000000000000000000000000..9d35e3f215771b81d68aa746f1598c6380db061d Binary files /dev/null and b/tests/serveur_compilation/serveur_compilation/share_docker_file/Main.class differ diff --git a/tests/serveur_compilation/serveur_compilation/share_docker_file/__pycache__/sample.cpython-34.pyc b/tests/serveur_compilation/serveur_compilation/share_docker_file/__pycache__/sample.cpython-34.pyc deleted file mode 100644 index 19d1dfa8560bc8fe29bb5c019ce9d644cb681fcd..0000000000000000000000000000000000000000 Binary files a/tests/serveur_compilation/serveur_compilation/share_docker_file/__pycache__/sample.cpython-34.pyc and /dev/null differ diff --git a/tests/serveur_compilation/serveur_compilation/share_docker_file/junit-4.10.jar b/tests/serveur_compilation/serveur_compilation/share_docker_file/junit-4.10.jar new file mode 100644 index 0000000000000000000000000000000000000000..954851e67d7424440592e8176c4aa034cc46aa85 Binary files /dev/null and b/tests/serveur_compilation/serveur_compilation/share_docker_file/junit-4.10.jar differ diff --git a/tests/serveur_compilation/serveur_compilation/share_docker_file/kata.class b/tests/serveur_compilation/serveur_compilation/share_docker_file/kata.class new file mode 100644 index 0000000000000000000000000000000000000000..4f88cc83b4794d26f2a1d98c67e2a59a1e1e4a43 Binary files /dev/null and b/tests/serveur_compilation/serveur_compilation/share_docker_file/kata.class differ diff --git a/tests/serveur_compilation/serveur_compilation/share_docker_file/test.txt b/tests/serveur_compilation/serveur_compilation/share_docker_file/test.txt deleted file mode 100644 index da5f074ad245b443296ec6447381efc1ba1fbc2b..0000000000000000000000000000000000000000 --- a/tests/serveur_compilation/serveur_compilation/share_docker_file/test.txt +++ /dev/null @@ -1 +0,0 @@ -blablabal \ No newline at end of file diff --git a/tests/serveur_compilation/serveur_compilation/src/main/java/compilation.java b/tests/serveur_compilation/serveur_compilation/src/main/java/compilation.java index 50756d80d8e47f5542343aa3b80bb43a60bf4109..6706bfe8a346197afb6824214fa436eedca48779 100644 --- a/tests/serveur_compilation/serveur_compilation/src/main/java/compilation.java +++ b/tests/serveur_compilation/serveur_compilation/src/main/java/compilation.java @@ -17,8 +17,10 @@ public class compilation { cmd = "docker run --rm --mount type=bind,source=/Users/freak/Desktop/dojo-hepia/tests/serveur_compilation/serveur_compilation/share_docker_file,dst=/env/ hey:1.1 python3 assert.py"; break; case "java": - filename = "app.java"; - cmd = "java " + filename; + filename = "share_docker_file/kata.java"; + filename_test = "share_docker_file/Main.java"; + cmd = "docker run --rm --mount type=bind,source=/Users/freak/Desktop/dojo-hepia/tests/serveur_compilation/serveur_compilation/share_docker_file,dst=/env/ java:1.2 export CLASSPATH=$CLASSPATH:junit-4.10.jar && javac -classpath ${CLASSPATH} Main.java kata.java && java Main"; + //cmd = "java " + filename_test; break; } @@ -89,6 +91,15 @@ public class compilation { file = new File(filename_test); file.delete(); + switch (input.get("language").toString()){ + case "java": + file = new File("Main.class"); + file.delete(); + file = new File("kata.class"); + file.delete(); + break; + } + return json; } } diff --git a/tests/serveur_compilation/serveur_compilation/target/classes/compilation.class b/tests/serveur_compilation/serveur_compilation/target/classes/compilation.class index ec8f215b9a581c2ea23d3af24924b37dd63b9fb1..fb47885edf724fb107321d56c42e0a163ac90b5c 100644 Binary files a/tests/serveur_compilation/serveur_compilation/target/classes/compilation.class and b/tests/serveur_compilation/serveur_compilation/target/classes/compilation.class differ