File tree Expand file tree Collapse file tree 5 files changed +24
-16
lines changed
robocode.api/src/main/java/robocode/control
main/java/net/sf/robocode/test/helpers
test/java/net/sf/robocode/test/host/security Expand file tree Collapse file tree 5 files changed +24
-16
lines changed Original file line number Diff line number Diff line change 99
1010
1111import net .sf .robocode .io .Logger ;
12-
1312import robocode .control .events .*;
1413import robocode .control .snapshot .IRobotSnapshot ;
1514import robocode .robotinterfaces .IBasicRobot ;
1817import java .io .IOException ;
1918import java .util .List ;
2019
21- import static robocode .util .Utils .*;
20+ import static robocode .util .Utils .assertEquals ;
21+ import static robocode .util .Utils .assertNotNull ;
2222
2323
2424/**
@@ -177,7 +177,7 @@ protected void beforeInit() {
177177 System .setProperty ("robocode.options.battle.desiredTPS" , "10000" );
178178
179179 try {
180- File robotsPathFile = new File ("../.sandbox/robots" ).getCanonicalFile ().getAbsoluteFile ();
180+ File robotsPathFile = new File ("../.sandbox/test- robots" ).getCanonicalFile ().getAbsoluteFile ();
181181 robotsPath = robotsPathFile .getPath ();
182182 } catch (IOException e ) {
183183 e .printStackTrace (Logger .realErr );
Original file line number Diff line number Diff line change @@ -25,19 +25,29 @@ tasks {
2525 into(" ../.sandbox/robots" )
2626 }
2727
28- val copyClasses by registering(Copy ::class ) {
29- from(compileJava)
28+ val copyRobotClasses by registering(Copy ::class ) {
29+ dependsOn(compileJava)
30+
31+ from(" build/classes/java/main" )
3032 into(" ../.sandbox/robots" )
3133 }
3234
35+ val copyRobotClassesToTestRobots by registering(Copy ::class ) {
36+ dependsOn(compileJava)
37+
38+ from(" build/classes/java/main" )
39+ into(" ../.sandbox/test-robots" )
40+ }
41+
3342 javadoc {
3443 source = sourceSets[" main" ].java
3544 include(" **/*.java" )
3645 }
3746
3847 jar {
3948 dependsOn(copyContent)
40- dependsOn(copyClasses)
49+ dependsOn(copyRobotClasses)
50+ dependsOn(copyRobotClassesToTestRobots)
4151 dependsOn(javadoc)
4252
4353 duplicatesStrategy = DuplicatesStrategy .INCLUDE
Original file line number Diff line number Diff line change @@ -15,19 +15,19 @@ tasks {
1515 from(" src/main/resources" ) {
1616 include(" **/*.*" )
1717 }
18- into(" ../.sandbox/robots" )
18+ into(" ../.sandbox/test- robots" )
1919 }
2020
21- val copyClasses by registering(Copy ::class ) {
22- dependsOn(configurations.runtimeClasspath )
21+ val copyRobotClasses by registering(Copy ::class ) {
22+ dependsOn(compileJava )
2323
24- from(compileJava )
25- into(" ../.sandbox/robots" )
24+ from(" build/classes/java/main " )
25+ into(" ../.sandbox/test- robots" )
2626 }
2727
2828 jar {
2929 dependsOn(copyContent)
30- dependsOn(copyClasses )
30+ dependsOn(copyRobotClasses )
3131 }
3232}
3333
Original file line number Diff line number Diff line change 1010
1111import org .junit .After ;
1212import org .junit .Before ;
13- import org .junit .Test ;
14- import robocode .control .*;
13+ import robocode .control .RobotTestBed ;
1514
1615import java .io .File ;
1716
Original file line number Diff line number Diff line change 1313import net .sf .robocode .host .security .RobotClassLoader ;
1414import net .sf .robocode .io .Logger ;
1515import net .sf .robocode .security .HiddenAccess ;
16- import net .sf .robocode .test .helpers .RobocodeTestBed ;
1716import org .junit .Assert ;
1817import org .junit .BeforeClass ;
1918import org .junit .Test ;
@@ -36,7 +35,7 @@ public class RobotClassLoaderTest {
3635 public static void init () throws IOException {
3736 HiddenAccess .initContainer ();
3837 try {
39- File robotsPathFile = new File ("../.sandbox/robots" ).getCanonicalFile ().getAbsoluteFile ();
38+ File robotsPathFile = new File ("../.sandbox/test- robots" ).getCanonicalFile ().getAbsoluteFile ();
4039 robotsPath = robotsPathFile .getPath ();
4140 } catch (IOException e ) {
4241 e .printStackTrace (Logger .realErr );
You can’t perform that action at this time.
0 commit comments