Seth 6 lat temu
rodzic
commit
aac969f38d

+ 1
- 1
.idea/ArraysGoneWild.iml Wyświetl plik

1
 <?xml version="1.0" encoding="UTF-8"?>
1
 <?xml version="1.0" encoding="UTF-8"?>
2
 <module type="JAVA_MODULE" version="4">
2
 <module type="JAVA_MODULE" version="4">
3
-  <component name="NewModuleRootManager" inherit-compiler-output="true">
3
+  <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8" inherit-compiler-output="true">
4
     <exclude-output />
4
     <exclude-output />
5
     <content url="file://$MODULE_DIR$" />
5
     <content url="file://$MODULE_DIR$" />
6
     <orderEntry type="inheritedJdk" />
6
     <orderEntry type="inheritedJdk" />

+ 1
- 1
.idea/compiler.xml Wyświetl plik

10
       </profile>
10
       </profile>
11
     </annotationProcessing>
11
     </annotationProcessing>
12
     <bytecodeTargetLevel>
12
     <bytecodeTargetLevel>
13
-      <module name="arraz" target="1.5" />
13
+      <module name="arraz" target="8" />
14
     </bytecodeTargetLevel>
14
     </bytecodeTargetLevel>
15
   </component>
15
   </component>
16
 </project>
16
 </project>

+ 1
- 0
.idea/misc.xml Wyświetl plik

7
       </list>
7
       </list>
8
     </option>
8
     </option>
9
   </component>
9
   </component>
10
+  <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="false" project-jdk-name="1.8" project-jdk-type="JavaSDK" />
10
 </project>
11
 </project>

+ 52
- 54
.idea/workspace.xml Wyświetl plik

2
 <project version="4">
2
 <project version="4">
3
   <component name="ChangeListManager">
3
   <component name="ChangeListManager">
4
     <list default="true" id="3455511b-a100-4bbd-b07c-68f009bc8dbc" name="Default" comment="">
4
     <list default="true" id="3455511b-a100-4bbd-b07c-68f009bc8dbc" name="Default" comment="">
5
+      <change beforePath="$PROJECT_DIR$/.idea/ArraysGoneWild.iml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/ArraysGoneWild.iml" afterDir="false" />
6
+      <change beforePath="$PROJECT_DIR$/.idea/compiler.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/compiler.xml" afterDir="false" />
7
+      <change beforePath="$PROJECT_DIR$/.idea/misc.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/misc.xml" afterDir="false" />
5
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
8
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
6
       <change beforePath="$PROJECT_DIR$/arraz/src/main/java/Arraz.java" beforeDir="false" afterPath="$PROJECT_DIR$/arraz/src/main/java/Arraz.java" afterDir="false" />
9
       <change beforePath="$PROJECT_DIR$/arraz/src/main/java/Arraz.java" beforeDir="false" afterPath="$PROJECT_DIR$/arraz/src/main/java/Arraz.java" afterDir="false" />
7
       <change beforePath="$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java" afterDir="false" />
10
       <change beforePath="$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java" beforeDir="false" afterPath="$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java" afterDir="false" />
23
       </usages-collector>
26
       </usages-collector>
24
       <usages-collector id="statistics.file.types.edit">
27
       <usages-collector id="statistics.file.types.edit">
25
         <counts>
28
         <counts>
26
-          <entry key="JAVA" value="4128" />
29
+          <entry key="JAVA" value="5174" />
27
           <entry key="XML" value="3" />
30
           <entry key="XML" value="3" />
28
         </counts>
31
         </counts>
29
       </usages-collector>
32
       </usages-collector>
30
       <usages-collector id="statistics.file.types.open">
33
       <usages-collector id="statistics.file.types.open">
31
         <counts>
34
         <counts>
32
-          <entry key="JAVA" value="1" />
35
+          <entry key="JAVA" value="2" />
33
           <entry key="XML" value="1" />
36
           <entry key="XML" value="1" />
34
         </counts>
37
         </counts>
35
       </usages-collector>
38
       </usages-collector>
38
   <component name="FileEditorManager">
41
   <component name="FileEditorManager">
39
     <leaf SIDE_TABS_SIZE_LIMIT_KEY="375">
42
     <leaf SIDE_TABS_SIZE_LIMIT_KEY="375">
40
       <file pinned="false" current-in-tab="false">
43
       <file pinned="false" current-in-tab="false">
41
-        <entry file="file://$PROJECT_DIR$/arraz/src/main/java/Arraz.java">
44
+        <entry file="file://$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java">
42
           <provider selected="true" editor-type-id="text-editor">
45
           <provider selected="true" editor-type-id="text-editor">
43
-            <state relative-caret-position="285">
44
-              <caret line="79" column="24" selection-start-line="79" selection-start-column="24" selection-end-line="79" selection-end-column="24" />
46
+            <state relative-caret-position="-902">
47
+              <caret line="109" column="50" selection-start-line="109" selection-start-column="50" selection-end-line="109" selection-end-column="50" />
45
               <folding>
48
               <folding>
46
                 <element signature="imports" expanded="true" />
49
                 <element signature="imports" expanded="true" />
47
-                <element signature="e#399#400#0" expanded="true" />
48
-                <element signature="e#451#452#0" expanded="true" />
49
-                <element signature="e#515#516#0" expanded="true" />
50
-                <element signature="e#556#557#0" expanded="true" />
50
+                <element signature="e#4388#4389#0" expanded="true" />
51
+                <element signature="e#4411#4412#0" expanded="true" />
51
               </folding>
52
               </folding>
52
             </state>
53
             </state>
53
           </provider>
54
           </provider>
54
         </entry>
55
         </entry>
55
       </file>
56
       </file>
56
       <file pinned="false" current-in-tab="true">
57
       <file pinned="false" current-in-tab="true">
57
-        <entry file="file://$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java">
58
+        <entry file="file://$PROJECT_DIR$/arraz/src/main/java/Arraz.java">
58
           <provider selected="true" editor-type-id="text-editor">
59
           <provider selected="true" editor-type-id="text-editor">
59
-            <state relative-caret-position="313">
60
-              <caret line="161" column="49" selection-start-line="161" selection-start-column="49" selection-end-line="161" selection-end-column="49" />
60
+            <state relative-caret-position="343">
61
+              <caret line="103" lean-forward="true" selection-start-line="103" selection-end-line="103" />
61
               <folding>
62
               <folding>
62
                 <element signature="imports" expanded="true" />
63
                 <element signature="imports" expanded="true" />
63
               </folding>
64
               </folding>
81
         <entry file="file://$PROJECT_DIR$/arraz/src/main/java/OddEven.java">
82
         <entry file="file://$PROJECT_DIR$/arraz/src/main/java/OddEven.java">
82
           <provider selected="true" editor-type-id="text-editor">
83
           <provider selected="true" editor-type-id="text-editor">
83
             <state>
84
             <state>
84
-              <caret column="22" lean-forward="true" selection-start-column="22" selection-end-column="22" />
85
+              <caret column="22" selection-start-column="22" selection-end-column="22" />
85
               <folding>
86
               <folding>
86
                 <element signature="e#189#190#0" expanded="true" />
87
                 <element signature="e#189#190#0" expanded="true" />
87
                 <element signature="e#215#216#0" expanded="true" />
88
                 <element signature="e#215#216#0" expanded="true" />
208
     <property name="GO_FMT" value="false" />
209
     <property name="GO_FMT" value="false" />
209
     <property name="WebServerToolWindowFactoryState" value="false" />
210
     <property name="WebServerToolWindowFactoryState" value="false" />
210
     <property name="aspect.path.notification.shown" value="true" />
211
     <property name="aspect.path.notification.shown" value="true" />
211
-    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1544103261992" />
212
+    <property name="com.android.tools.idea.instantapp.provision.ProvisionBeforeRunTaskProvider.myTimeStamp" value="1544126310211" />
212
     <property name="com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrary" value="JUnit4" />
213
     <property name="com.intellij.testIntegration.createTest.CreateTestDialog.defaultLibrary" value="JUnit4" />
213
     <property name="jdk.selected.JAVA_MODULE" value="1.8" />
214
     <property name="jdk.selected.JAVA_MODULE" value="1.8" />
214
     <property name="last_opened_file_path" value="$PROJECT_DIR$" />
215
     <property name="last_opened_file_path" value="$PROJECT_DIR$" />
215
     <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
216
     <property name="nodejs_interpreter_path.stuck_in_default_project" value="undefined stuck path" />
216
-    <property name="project.structure.last.edited" value="Modules" />
217
-    <property name="project.structure.proportion" value="0.0" />
218
-    <property name="project.structure.side.proportion" value="0.0" />
219
-    <property name="settings.editor.selected.configurable" value="configurable.group.appearance" />
217
+    <property name="project.structure.last.edited" value="Project" />
218
+    <property name="project.structure.proportion" value="0.15" />
219
+    <property name="project.structure.side.proportion" value="0.2" />
220
+    <property name="settings.editor.selected.configurable" value="reference.projectsettings.compiler.javacompiler" />
220
   </component>
221
   </component>
221
   <component name="RecentsManager">
222
   <component name="RecentsManager">
222
     <key name="CreateTestDialog.RecentsKey">
223
     <key name="CreateTestDialog.RecentsKey">
238
       </list>
239
       </list>
239
     </option>
240
     </option>
240
   </component>
241
   </component>
241
-  <component name="RunManager" selected="JUnit.ArrazTest.testCopyArrayByIterator2">
242
+  <component name="RunManager" selected="JUnit.ArrazTest.testRemoveElementFromArray1">
242
     <configuration default="true" type="Applet" factoryName="Applet">
243
     <configuration default="true" type="Applet" factoryName="Applet">
243
       <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
244
       <option name="POLICY_FILE" value="$APPLICATION_HOME_DIR$/bin/appletviewer.policy" />
244
       <method v="2">
245
       <method v="2">
282
         <option name="Make" enabled="true" />
283
         <option name="Make" enabled="true" />
283
       </method>
284
       </method>
284
     </configuration>
285
     </configuration>
285
-    <configuration name="ArrazTest.testOddEvens2" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
286
+    <configuration name="ArrazTest.testRemoveElementFromArray1" type="JUnit" factoryName="JUnit" temporary="true" nameIsGenerated="true">
286
       <module name="arraz" />
287
       <module name="arraz" />
287
       <option name="PACKAGE_NAME" value="" />
288
       <option name="PACKAGE_NAME" value="" />
288
       <option name="MAIN_CLASS_NAME" value="ArrazTest" />
289
       <option name="MAIN_CLASS_NAME" value="ArrazTest" />
289
-      <option name="METHOD_NAME" value="testOddEvens2" />
290
+      <option name="METHOD_NAME" value="testRemoveElementFromArray1" />
290
       <option name="TEST_OBJECT" value="method" />
291
       <option name="TEST_OBJECT" value="method" />
291
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
292
       <option name="WORKING_DIRECTORY" value="%MODULE_WORKING_DIR%" />
292
       <method v="2">
293
       <method v="2">
330
     <list>
331
     <list>
331
       <item itemvalue="JUnit.ArrazTest" />
332
       <item itemvalue="JUnit.ArrazTest" />
332
       <item itemvalue="JUnit.ArrazTest.testReverseArray1" />
333
       <item itemvalue="JUnit.ArrazTest.testReverseArray1" />
333
-      <item itemvalue="JUnit.ArrazTest.testOddEvens2" />
334
       <item itemvalue="JUnit.ArrazTest.testCopyArrayByIterator1" />
334
       <item itemvalue="JUnit.ArrazTest.testCopyArrayByIterator1" />
335
       <item itemvalue="JUnit.ArrazTest.testCopyArrayByIterator2" />
335
       <item itemvalue="JUnit.ArrazTest.testCopyArrayByIterator2" />
336
+      <item itemvalue="JUnit.ArrazTest.testRemoveElementFromArray1" />
336
     </list>
337
     </list>
337
     <recent_temporary>
338
     <recent_temporary>
338
       <list>
339
       <list>
339
-        <item itemvalue="JUnit.ArrazTest.testCopyArrayByIterator2" />
340
-        <item itemvalue="JUnit.ArrazTest.testCopyArrayByIterator1" />
340
+        <item itemvalue="JUnit.ArrazTest.testRemoveElementFromArray1" />
341
         <item itemvalue="JUnit.ArrazTest" />
341
         <item itemvalue="JUnit.ArrazTest" />
342
         <item itemvalue="JUnit.ArrazTest.testReverseArray1" />
342
         <item itemvalue="JUnit.ArrazTest.testReverseArray1" />
343
-        <item itemvalue="JUnit.ArrazTest.testOddEvens2" />
343
+        <item itemvalue="JUnit.ArrazTest.testCopyArrayByIterator2" />
344
+        <item itemvalue="JUnit.ArrazTest.testCopyArrayByIterator1" />
344
       </list>
345
       </list>
345
     </recent_temporary>
346
     </recent_temporary>
346
   </component>
347
   </component>
357
       <workItem from="1543955862749" duration="2347000" />
358
       <workItem from="1543955862749" duration="2347000" />
358
       <workItem from="1543958998826" duration="113000" />
359
       <workItem from="1543958998826" duration="113000" />
359
       <workItem from="1544020724645" duration="762000" />
360
       <workItem from="1544020724645" duration="762000" />
360
-      <workItem from="1544046933389" duration="9103000" />
361
+      <workItem from="1544046933389" duration="12355000" />
361
     </task>
362
     </task>
362
     <task id="LOCAL-00001" summary="readme and docs">
363
     <task id="LOCAL-00001" summary="readme and docs">
363
       <created>1544021313039</created>
364
       <created>1544021313039</created>
370
     <servers />
371
     <servers />
371
   </component>
372
   </component>
372
   <component name="TestHistory">
373
   <component name="TestHistory">
373
-    <history-entry file="ArrazTest_testReverseArray1 - 2018.12.05 at 19h 49m 37s.xml">
374
-      <configuration name="ArrazTest.testReverseArray1" configurationId="JUnit" />
375
-    </history-entry>
376
-    <history-entry file="ArrazTest_testReverseArray1 - 2018.12.05 at 19h 51m 09s.xml">
377
-      <configuration name="ArrazTest.testReverseArray1" configurationId="JUnit" />
378
-    </history-entry>
379
-    <history-entry file="ArrazTest - 2018.12.05 at 20h 13m 00s.xml">
380
-      <configuration name="ArrazTest" configurationId="JUnit" />
381
-    </history-entry>
382
-    <history-entry file="ArrazTest_testOddEvens1 - 2018.12.05 at 20h 13m 40s.xml">
383
-      <configuration name="ArrazTest.testOddEvens1" configurationId="JUnit" />
384
-    </history-entry>
385
-    <history-entry file="ArrazTest_testOddEvens2 - 2018.12.05 at 20h 14m 01s.xml">
386
-      <configuration name="ArrazTest.testOddEvens2" configurationId="JUnit" />
387
-    </history-entry>
388
     <history-entry file="ArrazTest - 2018.12.05 at 20h 14m 10s.xml">
374
     <history-entry file="ArrazTest - 2018.12.05 at 20h 14m 10s.xml">
389
       <configuration name="ArrazTest" configurationId="JUnit" />
375
       <configuration name="ArrazTest" configurationId="JUnit" />
390
     </history-entry>
376
     </history-entry>
400
     <history-entry file="ArrazTest - 2018.12.06 at 08h 17m 38s.xml">
386
     <history-entry file="ArrazTest - 2018.12.06 at 08h 17m 38s.xml">
401
       <configuration name="ArrazTest" configurationId="JUnit" />
387
       <configuration name="ArrazTest" configurationId="JUnit" />
402
     </history-entry>
388
     </history-entry>
389
+    <history-entry file="ArrazTest_testCopyArrayByIterator1 - 2018.12.06 at 08h 34m 19s.xml">
390
+      <configuration name="ArrazTest.testCopyArrayByIterator1" configurationId="JUnit" />
391
+    </history-entry>
392
+    <history-entry file="ArrazTest_testCopyArrayByIterator2 - 2018.12.06 at 08h 34m 23s.xml">
393
+      <configuration name="ArrazTest.testCopyArrayByIterator2" configurationId="JUnit" />
394
+    </history-entry>
395
+    <history-entry file="ArrazTest - 2018.12.06 at 13h 17m 56s.xml">
396
+      <configuration name="ArrazTest" configurationId="JUnit" />
397
+    </history-entry>
398
+    <history-entry file="ArrazTest_testReverseArray1 - 2018.12.06 at 14h 52m 25s.xml">
399
+      <configuration name="ArrazTest.testReverseArray1" configurationId="JUnit" />
400
+    </history-entry>
401
+    <history-entry file="ArrazTest - 2018.12.06 at 14h 53m 48s.xml">
402
+      <configuration name="ArrazTest" configurationId="JUnit" />
403
+    </history-entry>
403
   </component>
404
   </component>
404
   <component name="TimeTrackingManager">
405
   <component name="TimeTrackingManager">
405
-    <option name="totallyTimeSpent" value="12325000" />
406
+    <option name="totallyTimeSpent" value="15577000" />
406
   </component>
407
   </component>
407
   <component name="ToolWindowManager">
408
   <component name="ToolWindowManager">
408
     <frame x="0" y="23" width="1440" height="807" extended-state="6" />
409
     <frame x="0" y="23" width="1440" height="807" extended-state="6" />
409
-    <editor active="true" />
410
     <layout>
410
     <layout>
411
       <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.26108727" />
411
       <window_info content_ui="combo" id="Project" order="0" visible="true" weight="0.26108727" />
412
       <window_info id="Structure" order="1" weight="0.25" />
412
       <window_info id="Structure" order="1" weight="0.25" />
459
     <entry file="file://$PROJECT_DIR$/arraz/src/main/java/OddEven.java">
459
     <entry file="file://$PROJECT_DIR$/arraz/src/main/java/OddEven.java">
460
       <provider selected="true" editor-type-id="text-editor">
460
       <provider selected="true" editor-type-id="text-editor">
461
         <state>
461
         <state>
462
-          <caret column="22" lean-forward="true" selection-start-column="22" selection-end-column="22" />
462
+          <caret column="22" selection-start-column="22" selection-end-column="22" />
463
           <folding>
463
           <folding>
464
             <element signature="e#189#190#0" expanded="true" />
464
             <element signature="e#189#190#0" expanded="true" />
465
             <element signature="e#215#216#0" expanded="true" />
465
             <element signature="e#215#216#0" expanded="true" />
479
         </state>
479
         </state>
480
       </provider>
480
       </provider>
481
     </entry>
481
     </entry>
482
-    <entry file="file://$PROJECT_DIR$/arraz/src/main/java/Arraz.java">
482
+    <entry file="file://$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java">
483
       <provider selected="true" editor-type-id="text-editor">
483
       <provider selected="true" editor-type-id="text-editor">
484
-        <state relative-caret-position="285">
485
-          <caret line="79" column="24" selection-start-line="79" selection-start-column="24" selection-end-line="79" selection-end-column="24" />
484
+        <state relative-caret-position="-902">
485
+          <caret line="109" column="50" selection-start-line="109" selection-start-column="50" selection-end-line="109" selection-end-column="50" />
486
           <folding>
486
           <folding>
487
             <element signature="imports" expanded="true" />
487
             <element signature="imports" expanded="true" />
488
-            <element signature="e#399#400#0" expanded="true" />
489
-            <element signature="e#451#452#0" expanded="true" />
490
-            <element signature="e#515#516#0" expanded="true" />
491
-            <element signature="e#556#557#0" expanded="true" />
488
+            <element signature="e#4388#4389#0" expanded="true" />
489
+            <element signature="e#4411#4412#0" expanded="true" />
492
           </folding>
490
           </folding>
493
         </state>
491
         </state>
494
       </provider>
492
       </provider>
495
     </entry>
493
     </entry>
496
-    <entry file="file://$PROJECT_DIR$/arraz/src/test/java/ArrazTest.java">
494
+    <entry file="file://$PROJECT_DIR$/arraz/src/main/java/Arraz.java">
497
       <provider selected="true" editor-type-id="text-editor">
495
       <provider selected="true" editor-type-id="text-editor">
498
-        <state relative-caret-position="313">
499
-          <caret line="161" column="49" selection-start-line="161" selection-start-column="49" selection-end-line="161" selection-end-column="49" />
496
+        <state relative-caret-position="343">
497
+          <caret line="103" lean-forward="true" selection-start-line="103" selection-end-line="103" />
500
           <folding>
498
           <folding>
501
             <element signature="imports" expanded="true" />
499
             <element signature="imports" expanded="true" />
502
           </folding>
500
           </folding>

+ 23
- 3
arraz/src/main/java/Arraz.java Wyświetl plik

72
     public Integer[] copyArrayByIterator(Integer[] array){
72
     public Integer[] copyArrayByIterator(Integer[] array){
73
         Integer[] newArray = new Integer[array.length];
73
         Integer[] newArray = new Integer[array.length];
74
         int index = 0;
74
         int index = 0;
75
-        Iterator<Integer> iterator = Arrays.asList(array).iterator();
76
-        while(iterator.hasNext()){
77
-            newArray[index] = iterator.next();
75
+        for (Integer integer : Arrays.asList(array)) {
76
+            newArray[index] = integer;
78
             index++;
77
             index++;
79
         }
78
         }
80
         return newArray;
79
         return newArray;
81
         }
80
         }
82
 
81
 
82
+    public int[] copyArrayByLoop(int[] array){
83
+        int[] newArray = new int[array.length];
84
+        int index = 0;
85
+        for(int each:array){
86
+            newArray[index] = each;
87
+            index++;
88
+        }
89
+        return newArray;
90
+    }
91
+
92
+    public int[] removeElementFromArray(int[] array, int value){
93
+        int[] newArray = new int[array.length -1];
94
+        int index = 0;
95
+        for (int each:array) {
96
+            if(each!=value){
97
+                newArray[index] =each;
98
+                index++;
99
+            }
100
+        }
101
+        return newArray;
83
     }
102
     }
103
+}

+ 30
- 1
arraz/src/test/java/ArrazTest.java Wyświetl plik

107
         int[] expected =new int[]{100, 29, 3, 10, 5};
107
         int[] expected =new int[]{100, 29, 3, 10, 5};
108
         int[] actual = testArraz.reverseArray(arr1);
108
         int[] actual = testArraz.reverseArray(arr1);
109
 
109
 
110
-        Assert.assertTrue(Arrays.equals(expected, actual));
110
+        Assert.assertArrayEquals(expected, actual);
111
     }
111
     }
112
 
112
 
113
     @Test
113
     @Test
161
 
161
 
162
         Assert.assertArrayEquals(expected, actual);
162
         Assert.assertArrayEquals(expected, actual);
163
     }
163
     }
164
+
165
+    @Test
166
+    public void testCopyArrayByLoop1(){
167
+        int[] expected = arr1;
168
+        int[] actual = testArraz.copyArrayByLoop(arr1);
169
+
170
+        Assert.assertArrayEquals(expected, actual);
171
+    }
172
+
173
+    @Test
174
+    public void testCopyArrayByLoop2(){
175
+        Assert.assertFalse(Arrays.equals(arr1, testArraz.copyArrayByLoop(arr2)));
176
+    }
177
+
178
+    @Test
179
+    public void testRemoveElementFromArray1(){
180
+        int[] expected = new int[]{5, 10, 29, 100};
181
+        int[] actual = testArraz.removeElementFromArray(arr1, 3);
182
+
183
+        Assert.assertArrayEquals(expected, actual);
184
+    }
185
+
186
+    @Test
187
+    public void testRemoveElementFromArray2(){
188
+        int[] expected = new int[]{2, 7, 89};
189
+        int[] actual = testArraz.removeElementFromArray(arr2, 432);
190
+
191
+        Assert.assertArrayEquals(expected, actual);
192
+    }
164
 }
193
 }