Problem in Compiling Because of Testcase

View: New views
5 Messages — Rating Filter:   Alert me  

Problem in Compiling Because of Testcase

by asherbaig :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I want to compile the game but unfortunatly i got error due to
testcases that i have made it.Any solution ?

Console Log Report :

Buildfile:
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\build\build.xml
clean:
     [echo] Cleaning up build files...
   [delete] Deleting directory
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\build\build
init:
     [echo] Initializes the build...
    [mkdir] Created dir:
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\build\build\libs
compile.robocode:
     [echo] Compiling Robocode...
     [copy] Copying 1 file to
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\build\build\libs
    [javac] Compiling 258 source files to
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\build\build
    [javac]
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\NewBattleBattleFieldTabTest.java:17:
package junit.framework does not exist
    [javac] import junit.framework.*;
    [javac] ^
    [javac]
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\NewBattleBattleFieldTabTest.java:19:
cannot find symbol
    [javac] symbol: class TestCase
    [javac] public class NewBattleBattleFieldTabTest extends TestCase {
    [javac]                                                  ^
    [javac]
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\NewBattleBattleFieldTabTest2.java:3:
package junit.framework does not exist
    [javac] import junit.framework.Assert;
    [javac]                       ^
    [javac]
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\NewBattleBattleFieldTabTest2.java:4:
package junit.framework does not exist
    [javac] import junit.framework.TestCase;
    [javac]                       ^
    [javac]
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\NewBattleBattleFieldTabTest2.java:6:
cannot find symbol
    [javac] symbol: class TestCase
    [javac] public class NewBattleBattleFieldTabTest2 extends TestCase {
    [javac]                                                   ^
    [javac]
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\NewBattleDialogTest3.java:5:
package junit.framework does not exist
    [javac] import junit.framework.Assert;
    [javac]                       ^
    [javac]
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\NewBattleDialogTest3.java:6:
package junit.framework does not exist
    [javac] import junit.framework.TestCase;
    [javac]                       ^
    [javac]
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\NewBattleDialogTest3.java:8:
cannot find symbol
    [javac] symbol: class TestCase
    [javac] public class NewBattleDialogTest3 extends TestCase {
    [javac]                                           ^
    [javac]
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\RobocodeMenuBarTest.java:5:
package junit.framework does not exist
    [javac] import junit.framework.Assert;
    [javac]                       ^
    [javac]
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\RobocodeMenuBarTest.java:7:
package org.junit does not exist
    [javac] import org.junit.Test;
    [javac]                 ^
    [javac]
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\RobotSelectionPanelTest.java:5:
package junit.framework does not exist
    [javac] import junit.framework.Assert;
    [javac]                       ^
    [javac]
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\RobotSelectionPanelTest.java:7:
package org.junit does not exist
    [javac] import org.junit.Test;
    [javac]                 ^
    [javac]
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\testPackage\AllTests.java:6:
package junit.framework does not exist
    [javac] import junit.framework.Test;
    [javac]                       ^
    [javac]
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\testPackage\AllTests.java:7:
package junit.framework does not exist
    [javac] import junit.framework.TestCase;
    [javac]                       ^
    [javac]
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\testPackage\AllTests.java:8:
package junit.framework does not exist
    [javac] import junit.framework.TestSuite;
    [javac]                       ^
    [javac]
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\testPackage\AllTests.java:10:
cannot find symbol
    [javac] symbol: class TestCase
    [javac] public class AllTests extends TestCase{
    [javac]                               ^
    [javac]
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\testPackage\AllTests.java:16:
cannot find symbol
    [javac] symbol  : class Test
    [javac] location: class testPackage.AllTests
    [javac]     public static Test suite(){
    [javac]                   ^
    [javac]
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\RobocodeMenuBarTest.java:30:
cannot find symbol
    [javac] symbol  : class Test
    [javac] location: class robocode.dialog.RobocodeMenuBarTest
    [javac] @Test
    [javac] ^
    [javac]
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\RobotSelectionPanelTest.java:13:
cannot find symbol
    [javac] symbol  : class Test
    [javac] location: class robocode.dialog.RobotSelectionPanelTest
    [javac] @Test
    [javac] ^
    [javac]
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\NewBattleBattleFieldTabTest.java:37:
cannot find symbol
    [javac] symbol  : variable Assert
    [javac] location: class robocode.dialog.NewBattleBattleFieldTabTest
    [javac]
Assert.assertEquals(battleFieldTab.getButtons()[battleFieldTab.getButtons().length
-1].getText(), max_size+"x"+max_size);
    [javac] ^
    [javac]
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\NewBattleBattleFieldTabTest.java:68:
cannot find symbol
    [javac] symbol  : variable Assert
    [javac] location: class robocode.dialog.NewBattleBattleFieldTabTest
    [javac] Assert.assertEquals(expected, actual);
    [javac] ^
    [javac]
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\NewBattleBattleFieldTabTest.java:69:
cannot find symbol
    [javac] symbol  : variable Assert
    [javac] location: class robocode.dialog.NewBattleBattleFieldTabTest
    [javac] Assert.assertTrue("JSlider Exists ", !jSliderExists);
    [javac] ^
    [javac]
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\NewBattleBattleFieldTabTest2.java:24:
cannot find symbol
    [javac] symbol  : variable Assert
    [javac] location: class robocode.dialog.NewBattleBattleFieldTabTest2
    [javac] Assert.assertEquals(expected_value,
Backgroundpanel.Max_num_Button());
    [javac] ^
    [javac]
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\NewBattleDialogTest3.java:27:
cannot find symbol
    [javac] symbol  : variable Assert
    [javac] location: class robocode.dialog.NewBattleDialogTest3
    [javac] Assert.assertEquals(true,
dailog.validateNumRounds(battleProperty.getNumRounds()));
    [javac] ^
    [javac]
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\PreferencesKeyConfigurationOptionsTab.java:20:
warning: [serial] serializable class
robocode.dialog.PreferencesKeyConfigurationOptionsTab has no
definition of serialVersionUID
    [javac] public class PreferencesKeyConfigurationOptionsTab
extends WizardPanel {
    [javac]        ^
    [javac]
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\RobocodeMenuBarTest.java:38:
cannot find symbol
    [javac] symbol  : variable Assert
    [javac] location: class robocode.dialog.RobocodeMenuBarTest
    [javac] Assert.assertNotSame(battleField,offscreenImage);
    [javac] ^
    [javac]
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\RobocodeMenuBarTest.java:42:
cannot find symbol
    [javac] symbol  : variable Assert
    [javac] location: class robocode.dialog.RobocodeMenuBarTest
    [javac]
Assert.assertEquals(battleField.getHeight()+battleField.getWidth(),Capture_X.getBattlefieldHeight()+Capture_Y.getBattlefieldWidth());
    [javac] ^
    [javac]
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\RobotSelectionPanelTest.java:23:
cannot find symbol
    [javac] symbol  : variable Assert
    [javac] location: class robocode.dialog.RobotSelectionPanelTest
    [javac] Assert.assertTrue(maxRobot<=
RobotSelectionPanel.maxRobots);
    [javac] ^
    [javac]
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\testPackage\AllTests.java:18:
cannot find symbol
    [javac] symbol  : class TestSuite
    [javac] location: class testPackage.AllTests
    [javac]         TestSuite suite = new TestSuite("3a group test
suite");
    [javac]         ^
    [javac]
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\testPackage\AllTests.java:18:
cannot find symbol
    [javac] symbol  : class TestSuite
    [javac] location: class testPackage.AllTests
    [javac]         TestSuite suite = new TestSuite("3a group test
suite");
    [javac]                               ^
    [javac]
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\testPackage\AllTests.java:21:
cannot find symbol
    [javac] symbol  : class TestSuite
    [javac] location: class testPackage.AllTests
    [javac]         suite.addTest(new
TestSuite(NewBattleBattleFieldTabTest.class, "deleted function test
suite"));
    [javac]                           ^
    [javac]
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\testPackage\AllTests.java:22:
cannot find symbol
    [javac] symbol  : class TestSuite
    [javac] location: class testPackage.AllTests
    [javac]         suite.addTest(new
TestSuite(NewBattleDialogTest3.class, "modified function test suite"));
    [javac]                           ^
    [javac]
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\testPackage\AllTests.java:23:
cannot find symbol
    [javac] symbol  : class TestSuite
    [javac] location: class testPackage.AllTests
    [javac]         suite.addTest(new
TestSuite(NewBattleBattleFieldTabTest2.class, "addition function test
suite"));
    [javac]                           ^
    [javac] 32 errors
    [javac] 1 warning

BUILD FAILED
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\build\build.xml:150:
The following error occurred while executing this line:
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\build\build.xml:576:
Compile failed; see the compiler error output for details.

Total time: 6 seconds


Re: Problem in Compiling Because of Testcase

by flemmingnlarsen-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I guess you have followed the 'Developers Guide for building Robocode'?:

http://testwiki.roborumble.org/w/index.php?title=Robocode/Developers_Guide_for_building_Robocode

I not, check this out to see if you forgot something. But I guess
everything is okay here.

When look thru the compiler error / stack trace it looks like it
cannot find the JUnit library. You should make sure that the 'tests'
project (where your tests should be located) are put into this project.

Try to do this:
---------------
When your Robocode workspace is open in Eclipse, right-click on the
'tests' project, and select 'Properties' (the last entry) in the popup
that appears.
  Now you select 'Java Build Path' on the left side of the window that
appeared, and click on the 'Libraries' tab page.
  Here you should be able to see 'junit-4.4.jar - test/libs'. If not,
you must add it by pressing the 'Add JARs...' button, and select
test/libs/junit-4.4.jar.

I hope this works. I does for me for the tests provided with Robocode.

Regards,
- Flemming

--- In Robocode@..., "asherbaig" <devilvsevil@...> wrote:

>
> I want to compile the game but unfortunatly i got error due to
> testcases that i have made it.Any solution ?
>
> Console Log Report :
>
> Buildfile:
> H:\Unidata\SPM\Projects\robocode-workspace\Robocode\build\build.xml
> clean:
>      [echo] Cleaning up build files...
>    [delete] Deleting directory
> H:\Unidata\SPM\Projects\robocode-workspace\Robocode\build\build
> init:
>      [echo] Initializes the build...
>     [mkdir] Created dir:
> H:\Unidata\SPM\Projects\robocode-workspace\Robocode\build\build\libs
> compile.robocode:
>      [echo] Compiling Robocode...
>      [copy] Copying 1 file to
> H:\Unidata\SPM\Projects\robocode-workspace\Robocode\build\build\libs
>     [javac] Compiling 258 source files to
> H:\Unidata\SPM\Projects\robocode-workspace\Robocode\build\build
>     [javac]
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\NewBattleBattleFieldTabTest.java:17:
> package junit.framework does not exist
>     [javac] import junit.framework.*;
>     [javac] ^
>     [javac]
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\NewBattleBattleFieldTabTest.java:19:
> cannot find symbol
>     [javac] symbol: class TestCase
>     [javac] public class NewBattleBattleFieldTabTest extends TestCase {
>     [javac]                                                  ^
>     [javac]
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\NewBattleBattleFieldTabTest2.java:3:
> package junit.framework does not exist
>     [javac] import junit.framework.Assert;
>     [javac]                       ^
>     [javac]
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\NewBattleBattleFieldTabTest2.java:4:
> package junit.framework does not exist
>     [javac] import junit.framework.TestCase;
>     [javac]                       ^
>     [javac]
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\NewBattleBattleFieldTabTest2.java:6:
> cannot find symbol
>     [javac] symbol: class TestCase
>     [javac] public class NewBattleBattleFieldTabTest2 extends TestCase {
>     [javac]                                                   ^
>     [javac]
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\NewBattleDialogTest3.java:5:
> package junit.framework does not exist
>     [javac] import junit.framework.Assert;
>     [javac]                       ^
>     [javac]
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\NewBattleDialogTest3.java:6:
> package junit.framework does not exist
>     [javac] import junit.framework.TestCase;
>     [javac]                       ^
>     [javac]
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\NewBattleDialogTest3.java:8:
> cannot find symbol
>     [javac] symbol: class TestCase
>     [javac] public class NewBattleDialogTest3 extends TestCase {
>     [javac]                                           ^
>     [javac]
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\RobocodeMenuBarTest.java:5:
> package junit.framework does not exist
>     [javac] import junit.framework.Assert;
>     [javac]                       ^
>     [javac]
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\RobocodeMenuBarTest.java:7:
> package org.junit does not exist
>     [javac] import org.junit.Test;
>     [javac]                 ^
>     [javac]
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\RobotSelectionPanelTest.java:5:
> package junit.framework does not exist
>     [javac] import junit.framework.Assert;
>     [javac]                       ^
>     [javac]
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\RobotSelectionPanelTest.java:7:
> package org.junit does not exist
>     [javac] import org.junit.Test;
>     [javac]                 ^
>     [javac]
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\testPackage\AllTests.java:6:
> package junit.framework does not exist
>     [javac] import junit.framework.Test;
>     [javac]                       ^
>     [javac]
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\testPackage\AllTests.java:7:
> package junit.framework does not exist
>     [javac] import junit.framework.TestCase;
>     [javac]                       ^
>     [javac]
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\testPackage\AllTests.java:8:
> package junit.framework does not exist
>     [javac] import junit.framework.TestSuite;
>     [javac]                       ^
>     [javac]
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\testPackage\AllTests.java:10:
> cannot find symbol
>     [javac] symbol: class TestCase
>     [javac] public class AllTests extends TestCase{
>     [javac]                               ^
>     [javac]
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\testPackage\AllTests.java:16:
> cannot find symbol
>     [javac] symbol  : class Test
>     [javac] location: class testPackage.AllTests
>     [javac]     public static Test suite(){
>     [javac]                   ^
>     [javac]
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\RobocodeMenuBarTest.java:30:
> cannot find symbol
>     [javac] symbol  : class Test
>     [javac] location: class robocode.dialog.RobocodeMenuBarTest
>     [javac] @Test
>     [javac] ^
>     [javac]
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\RobotSelectionPanelTest.java:13:
> cannot find symbol
>     [javac] symbol  : class Test
>     [javac] location: class robocode.dialog.RobotSelectionPanelTest
>     [javac] @Test
>     [javac] ^
>     [javac]
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\NewBattleBattleFieldTabTest.java:37:
> cannot find symbol
>     [javac] symbol  : variable Assert
>     [javac] location: class robocode.dialog.NewBattleBattleFieldTabTest
>     [javac]
>
Assert.assertEquals(battleFieldTab.getButtons()[battleFieldTab.getButtons().length
> -1].getText(), max_size+"x"+max_size);
>     [javac] ^
>     [javac]
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\NewBattleBattleFieldTabTest.java:68:
> cannot find symbol
>     [javac] symbol  : variable Assert
>     [javac] location: class robocode.dialog.NewBattleBattleFieldTabTest
>     [javac] Assert.assertEquals(expected, actual);
>     [javac] ^
>     [javac]
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\NewBattleBattleFieldTabTest.java:69:
> cannot find symbol
>     [javac] symbol  : variable Assert
>     [javac] location: class robocode.dialog.NewBattleBattleFieldTabTest
>     [javac] Assert.assertTrue("JSlider Exists ", !jSliderExists);
>     [javac] ^
>     [javac]
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\NewBattleBattleFieldTabTest2.java:24:
> cannot find symbol
>     [javac] symbol  : variable Assert
>     [javac] location: class robocode.dialog.NewBattleBattleFieldTabTest2
>     [javac] Assert.assertEquals(expected_value,
> Backgroundpanel.Max_num_Button());
>     [javac] ^
>     [javac]
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\NewBattleDialogTest3.java:27:
> cannot find symbol
>     [javac] symbol  : variable Assert
>     [javac] location: class robocode.dialog.NewBattleDialogTest3
>     [javac] Assert.assertEquals(true,
> dailog.validateNumRounds(battleProperty.getNumRounds()));
>     [javac] ^
>     [javac]
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\PreferencesKeyConfigurationOptionsTab.java:20:
> warning: [serial] serializable class
> robocode.dialog.PreferencesKeyConfigurationOptionsTab has no
> definition of serialVersionUID
>     [javac] public class PreferencesKeyConfigurationOptionsTab
> extends WizardPanel {
>     [javac]        ^
>     [javac]
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\RobocodeMenuBarTest.java:38:
> cannot find symbol
>     [javac] symbol  : variable Assert
>     [javac] location: class robocode.dialog.RobocodeMenuBarTest
>     [javac] Assert.assertNotSame(battleField,offscreenImage);
>     [javac] ^
>     [javac]
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\RobocodeMenuBarTest.java:42:
> cannot find symbol
>     [javac] symbol  : variable Assert
>     [javac] location: class robocode.dialog.RobocodeMenuBarTest
>     [javac]
>
Assert.assertEquals(battleField.getHeight()+battleField.getWidth(),Capture_X.getBattlefieldHeight()+Capture_Y.getBattlefieldWidth());
>     [javac] ^
>     [javac]
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\RobotSelectionPanelTest.java:23:
> cannot find symbol
>     [javac] symbol  : variable Assert
>     [javac] location: class robocode.dialog.RobotSelectionPanelTest
>     [javac] Assert.assertTrue(maxRobot<=
> RobotSelectionPanel.maxRobots);
>     [javac] ^
>     [javac]
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\testPackage\AllTests.java:18:
> cannot find symbol
>     [javac] symbol  : class TestSuite
>     [javac] location: class testPackage.AllTests
>     [javac]         TestSuite suite = new TestSuite("3a group test
> suite");
>     [javac]         ^
>     [javac]
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\testPackage\AllTests.java:18:
> cannot find symbol
>     [javac] symbol  : class TestSuite
>     [javac] location: class testPackage.AllTests
>     [javac]         TestSuite suite = new TestSuite("3a group test
> suite");
>     [javac]                               ^
>     [javac]
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\testPackage\AllTests.java:21:
> cannot find symbol
>     [javac] symbol  : class TestSuite
>     [javac] location: class testPackage.AllTests
>     [javac]         suite.addTest(new
> TestSuite(NewBattleBattleFieldTabTest.class, "deleted function test
> suite"));
>     [javac]                           ^
>     [javac]
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\testPackage\AllTests.java:22:
> cannot find symbol
>     [javac] symbol  : class TestSuite
>     [javac] location: class testPackage.AllTests
>     [javac]         suite.addTest(new
> TestSuite(NewBattleDialogTest3.class, "modified function test suite"));
>     [javac]                           ^
>     [javac]
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\testPackage\AllTests.java:23:

> cannot find symbol
>     [javac] symbol  : class TestSuite
>     [javac] location: class testPackage.AllTests
>     [javac]         suite.addTest(new
> TestSuite(NewBattleBattleFieldTabTest2.class, "addition function test
> suite"));
>     [javac]                           ^
>     [javac] 32 errors
>     [javac] 1 warning
>
> BUILD FAILED
> H:\Unidata\SPM\Projects\robocode-workspace\Robocode\build\build.xml:150:
> The following error occurred while executing this line:
> H:\Unidata\SPM\Projects\robocode-workspace\Robocode\build\build.xml:576:
> Compile failed; see the compiler error output for details.
>
> Total time: 6 seconds
>



Re: Problem in Compiling Because of Testcase

by asherbaig :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

When i checked Build Path i found there Junit 4 and Junit 3 because i
used both of them.Even then it shows me the same message.Unable to
compile.


--- In Robocode@..., "flemmingnlarsen"
<flemming.n.larsen@...> wrote:
>
> I guess you have followed the 'Developers Guide for building Robocode'?:
>
>
http://testwiki.roborumble.org/w/index.php?title=Robocode/Developers_Guide_for_building_Robocode

>
> I not, check this out to see if you forgot something. But I guess
> everything is okay here.
>
> When look thru the compiler error / stack trace it looks like it
> cannot find the JUnit library. You should make sure that the 'tests'
> project (where your tests should be located) are put into this project.
>
> Try to do this:
> ---------------
> When your Robocode workspace is open in Eclipse, right-click on the
> 'tests' project, and select 'Properties' (the last entry) in the popup
> that appears.
>   Now you select 'Java Build Path' on the left side of the window that
> appeared, and click on the 'Libraries' tab page.
>   Here you should be able to see 'junit-4.4.jar - test/libs'. If not,
> you must add it by pressing the 'Add JARs...' button, and select
> test/libs/junit-4.4.jar.
>
> I hope this works. I does for me for the tests provided with Robocode.
>
> Regards,
> - Flemming
>
> --- In Robocode@..., "asherbaig" <devilvsevil@> wrote:
> >
> > I want to compile the game but unfortunatly i got error due to
> > testcases that i have made it.Any solution ?
> >
> > Console Log Report :
> >
> > Buildfile:
> > H:\Unidata\SPM\Projects\robocode-workspace\Robocode\build\build.xml
> > clean:
> >      [echo] Cleaning up build files...
> >    [delete] Deleting directory
> > H:\Unidata\SPM\Projects\robocode-workspace\Robocode\build\build
> > init:
> >      [echo] Initializes the build...
> >     [mkdir] Created dir:
> > H:\Unidata\SPM\Projects\robocode-workspace\Robocode\build\build\libs
> > compile.robocode:
> >      [echo] Compiling Robocode...
> >      [copy] Copying 1 file to
> > H:\Unidata\SPM\Projects\robocode-workspace\Robocode\build\build\libs
> >     [javac] Compiling 258 source files to
> > H:\Unidata\SPM\Projects\robocode-workspace\Robocode\build\build
> >     [javac]
> >
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\NewBattleBattleFieldTabTest.java:17:
> > package junit.framework does not exist
> >     [javac] import junit.framework.*;
> >     [javac] ^
> >     [javac]
> >
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\NewBattleBattleFieldTabTest.java:19:
> > cannot find symbol
> >     [javac] symbol: class TestCase
> >     [javac] public class NewBattleBattleFieldTabTest extends
TestCase {
> >     [javac]                                                  ^
> >     [javac]
> >
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\NewBattleBattleFieldTabTest2.java:3:
> > package junit.framework does not exist
> >     [javac] import junit.framework.Assert;
> >     [javac]                       ^
> >     [javac]
> >
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\NewBattleBattleFieldTabTest2.java:4:
> > package junit.framework does not exist
> >     [javac] import junit.framework.TestCase;
> >     [javac]                       ^
> >     [javac]
> >
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\NewBattleBattleFieldTabTest2.java:6:
> > cannot find symbol
> >     [javac] symbol: class TestCase
> >     [javac] public class NewBattleBattleFieldTabTest2 extends
TestCase {
> >     [javac]                                                   ^
> >     [javac]
> >
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\NewBattleDialogTest3.java:5:
> > package junit.framework does not exist
> >     [javac] import junit.framework.Assert;
> >     [javac]                       ^
> >     [javac]
> >
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\NewBattleDialogTest3.java:6:
> > package junit.framework does not exist
> >     [javac] import junit.framework.TestCase;
> >     [javac]                       ^
> >     [javac]
> >
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\NewBattleDialogTest3.java:8:
> > cannot find symbol
> >     [javac] symbol: class TestCase
> >     [javac] public class NewBattleDialogTest3 extends TestCase {
> >     [javac]                                           ^
> >     [javac]
> >
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\RobocodeMenuBarTest.java:5:
> > package junit.framework does not exist
> >     [javac] import junit.framework.Assert;
> >     [javac]                       ^
> >     [javac]
> >
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\RobocodeMenuBarTest.java:7:
> > package org.junit does not exist
> >     [javac] import org.junit.Test;
> >     [javac]                 ^
> >     [javac]
> >
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\RobotSelectionPanelTest.java:5:
> > package junit.framework does not exist
> >     [javac] import junit.framework.Assert;
> >     [javac]                       ^
> >     [javac]
> >
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\RobotSelectionPanelTest.java:7:
> > package org.junit does not exist
> >     [javac] import org.junit.Test;
> >     [javac]                 ^
> >     [javac]
> >
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\testPackage\AllTests.java:6:
> > package junit.framework does not exist
> >     [javac] import junit.framework.Test;
> >     [javac]                       ^
> >     [javac]
> >
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\testPackage\AllTests.java:7:
> > package junit.framework does not exist
> >     [javac] import junit.framework.TestCase;
> >     [javac]                       ^
> >     [javac]
> >
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\testPackage\AllTests.java:8:
> > package junit.framework does not exist
> >     [javac] import junit.framework.TestSuite;
> >     [javac]                       ^
> >     [javac]
> >
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\testPackage\AllTests.java:10:
> > cannot find symbol
> >     [javac] symbol: class TestCase
> >     [javac] public class AllTests extends TestCase{
> >     [javac]                               ^
> >     [javac]
> >
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\testPackage\AllTests.java:16:
> > cannot find symbol
> >     [javac] symbol  : class Test
> >     [javac] location: class testPackage.AllTests
> >     [javac]     public static Test suite(){
> >     [javac]                   ^
> >     [javac]
> >
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\RobocodeMenuBarTest.java:30:
> > cannot find symbol
> >     [javac] symbol  : class Test
> >     [javac] location: class robocode.dialog.RobocodeMenuBarTest
> >     [javac] @Test
> >     [javac] ^
> >     [javac]
> >
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\RobotSelectionPanelTest.java:13:
> > cannot find symbol
> >     [javac] symbol  : class Test
> >     [javac] location: class robocode.dialog.RobotSelectionPanelTest
> >     [javac] @Test
> >     [javac] ^
> >     [javac]
> >
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\NewBattleBattleFieldTabTest.java:37:
> > cannot find symbol
> >     [javac] symbol  : variable Assert
> >     [javac] location: class
robocode.dialog.NewBattleBattleFieldTabTest
> >     [javac]
> >
>
Assert.assertEquals(battleFieldTab.getButtons()[battleFieldTab.getButtons().length
> > -1].getText(), max_size+"x"+max_size);
> >     [javac] ^
> >     [javac]
> >
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\NewBattleBattleFieldTabTest.java:68:
> > cannot find symbol
> >     [javac] symbol  : variable Assert
> >     [javac] location: class
robocode.dialog.NewBattleBattleFieldTabTest
> >     [javac] Assert.assertEquals(expected, actual);
> >     [javac] ^
> >     [javac]
> >
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\NewBattleBattleFieldTabTest.java:69:
> > cannot find symbol
> >     [javac] symbol  : variable Assert
> >     [javac] location: class
robocode.dialog.NewBattleBattleFieldTabTest
> >     [javac] Assert.assertTrue("JSlider Exists ", !jSliderExists);
> >     [javac] ^
> >     [javac]
> >
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\NewBattleBattleFieldTabTest2.java:24:
> > cannot find symbol
> >     [javac] symbol  : variable Assert
> >     [javac] location: class
robocode.dialog.NewBattleBattleFieldTabTest2
> >     [javac] Assert.assertEquals(expected_value,
> > Backgroundpanel.Max_num_Button());
> >     [javac] ^
> >     [javac]
> >
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\NewBattleDialogTest3.java:27:
> > cannot find symbol
> >     [javac] symbol  : variable Assert
> >     [javac] location: class robocode.dialog.NewBattleDialogTest3
> >     [javac] Assert.assertEquals(true,
> > dailog.validateNumRounds(battleProperty.getNumRounds()));
> >     [javac] ^
> >     [javac]
> >
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\PreferencesKeyConfigurationOptionsTab.java:20:
> > warning: [serial] serializable class
> > robocode.dialog.PreferencesKeyConfigurationOptionsTab has no
> > definition of serialVersionUID
> >     [javac] public class PreferencesKeyConfigurationOptionsTab
> > extends WizardPanel {
> >     [javac]        ^
> >     [javac]
> >
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\RobocodeMenuBarTest.java:38:
> > cannot find symbol
> >     [javac] symbol  : variable Assert
> >     [javac] location: class robocode.dialog.RobocodeMenuBarTest
> >     [javac] Assert.assertNotSame(battleField,offscreenImage);
> >     [javac] ^
> >     [javac]
> >
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\RobocodeMenuBarTest.java:42:
> > cannot find symbol
> >     [javac] symbol  : variable Assert
> >     [javac] location: class robocode.dialog.RobocodeMenuBarTest
> >     [javac]
> >
>
Assert.assertEquals(battleField.getHeight()+battleField.getWidth(),Capture_X.getBattlefieldHeight()+Capture_Y.getBattlefieldWidth());
> >     [javac] ^
> >     [javac]
> >
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\robocode\dialog\RobotSelectionPanelTest.java:23:
> > cannot find symbol
> >     [javac] symbol  : variable Assert
> >     [javac] location: class robocode.dialog.RobotSelectionPanelTest
> >     [javac] Assert.assertTrue(maxRobot<=
> > RobotSelectionPanel.maxRobots);
> >     [javac] ^
> >     [javac]
> >
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\testPackage\AllTests.java:18:
> > cannot find symbol
> >     [javac] symbol  : class TestSuite
> >     [javac] location: class testPackage.AllTests
> >     [javac]         TestSuite suite = new TestSuite("3a group test
> > suite");
> >     [javac]         ^
> >     [javac]
> >
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\testPackage\AllTests.java:18:
> > cannot find symbol
> >     [javac] symbol  : class TestSuite
> >     [javac] location: class testPackage.AllTests
> >     [javac]         TestSuite suite = new TestSuite("3a group test
> > suite");
> >     [javac]                               ^
> >     [javac]
> >
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\testPackage\AllTests.java:21:

> > cannot find symbol
> >     [javac] symbol  : class TestSuite
> >     [javac] location: class testPackage.AllTests
> >     [javac]         suite.addTest(new
> > TestSuite(NewBattleBattleFieldTabTest.class, "deleted function test
> > suite"));
> >     [javac]                           ^
> >     [javac]
> >
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\testPackage\AllTests.java:22:
> > cannot find symbol
> >     [javac] symbol  : class TestSuite
> >     [javac] location: class testPackage.AllTests
> >     [javac]         suite.addTest(new
> > TestSuite(NewBattleDialogTest3.class, "modified function test
suite"));
> >     [javac]                           ^
> >     [javac]
> >
>
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\robocode\testPackage\AllTests.java:23:

> > cannot find symbol
> >     [javac] symbol  : class TestSuite
> >     [javac] location: class testPackage.AllTests
> >     [javac]         suite.addTest(new
> > TestSuite(NewBattleBattleFieldTabTest2.class, "addition function test
> > suite"));
> >     [javac]                           ^
> >     [javac] 32 errors
> >     [javac] 1 warning
> >
> > BUILD FAILED
> >
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\build\build.xml:150:
> > The following error occurred while executing this line:
> >
H:\Unidata\SPM\Projects\robocode-workspace\Robocode\build\build.xml:576:
> > Compile failed; see the compiler error output for details.
> >
> > Total time: 6 seconds
> >
>



Re: Problem in Compiling Because of Testcase

by asherbaig :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have seen that my Junit 3 and 4 both are there inside
Libraries.Please help me compiling it.As it says in console that
"package junit.framework does not exist".Also Here is the snapshot of
it.

http://i44.tinypic.com/34rwzfl.jpg



--- In Robocode@..., "flemmingnlarsen"
<flemming.n.larsen@...> wrote:
>
> I guess you have followed the 'Developers Guide for building
Robocode'?:
>
> http://testwiki.roborumble.org/w/index.php?
title=Robocode/Developers_Guide_for_building_Robocode
>
> I not, check this out to see if you forgot something. But I guess
> everything is okay here.
>
> When look thru the compiler error / stack trace it looks like it
> cannot find the JUnit library. You should make sure that the 'tests'
> project (where your tests should be located) are put into this
project.
>
> Try to do this:
> ---------------
> When your Robocode workspace is open in Eclipse, right-click on the
> 'tests' project, and select 'Properties' (the last entry) in the
popup
> that appears.
>   Now you select 'Java Build Path' on the left side of the window
that
> appeared, and click on the 'Libraries' tab page.
>   Here you should be able to see 'junit-4.4.jar - test/libs'. If
not,
> you must add it by pressing the 'Add JARs...' button, and select
> test/libs/junit-4.4.jar.
>
> I hope this works. I does for me for the tests provided with
Robocode.

>
> Regards,
> - Flemming
>
> --- In Robocode@..., "asherbaig" <devilvsevil@> wrote:
> >
> > I want to compile the game but unfortunatly i got error due to
> > testcases that i have made it.Any solution ?
> >
> > Console Log Report :
> >
> > Buildfile:
> > H:\Unidata\SPM\Projects\robocode-
workspace\Robocode\build\build.xml
> > clean:
> >      [echo] Cleaning up build files...
> >    [delete] Deleting directory
> > H:\Unidata\SPM\Projects\robocode-workspace\Robocode\build\build
> > init:
> >      [echo] Initializes the build...
> >     [mkdir] Created dir:
> > H:\Unidata\SPM\Projects\robocode-
workspace\Robocode\build\build\libs
> > compile.robocode:
> >      [echo] Compiling Robocode...
> >      [copy] Copying 1 file to
> > H:\Unidata\SPM\Projects\robocode-
workspace\Robocode\build\build\libs
> >     [javac] Compiling 258 source files to
> > H:\Unidata\SPM\Projects\robocode-workspace\Robocode\build\build
> >     [javac]
> >
> H:\Unidata\SPM\Projects\robocode-
workspace\Robocode\robocode\robocode\dialog\NewBattleBattleFieldTabTes
t.java:17:
> > package junit.framework does not exist
> >     [javac] import junit.framework.*;
> >     [javac] ^
> >     [javac]
> >
> H:\Unidata\SPM\Projects\robocode-
workspace\Robocode\robocode\robocode\dialog\NewBattleBattleFieldTabTes
t.java:19:
> > cannot find symbol
> >     [javac] symbol: class TestCase
> >     [javac] public class NewBattleBattleFieldTabTest extends
TestCase {
> >     [javac]                                                  ^
> >     [javac]
> >
> H:\Unidata\SPM\Projects\robocode-
workspace\Robocode\robocode\robocode\dialog\NewBattleBattleFieldTabTes
t2.java:3:
> > package junit.framework does not exist
> >     [javac] import junit.framework.Assert;
> >     [javac]                       ^
> >     [javac]
> >
> H:\Unidata\SPM\Projects\robocode-
workspace\Robocode\robocode\robocode\dialog\NewBattleBattleFieldTabTes
t2.java:4:
> > package junit.framework does not exist
> >     [javac] import junit.framework.TestCase;
> >     [javac]                       ^
> >     [javac]
> >
> H:\Unidata\SPM\Projects\robocode-
workspace\Robocode\robocode\robocode\dialog\NewBattleBattleFieldTabTes
t2.java:6:
> > cannot find symbol
> >     [javac] symbol: class TestCase
> >     [javac] public class NewBattleBattleFieldTabTest2 extends
TestCase {
> >     [javac]                                                   ^
> >     [javac]
> >
> H:\Unidata\SPM\Projects\robocode-
workspace\Robocode\robocode\robocode\dialog\NewBattleDialogTest3.java:
5:
> > package junit.framework does not exist
> >     [javac] import junit.framework.Assert;
> >     [javac]                       ^
> >     [javac]
> >
> H:\Unidata\SPM\Projects\robocode-
workspace\Robocode\robocode\robocode\dialog\NewBattleDialogTest3.java:
6:
> > package junit.framework does not exist
> >     [javac] import junit.framework.TestCase;
> >     [javac]                       ^
> >     [javac]
> >
> H:\Unidata\SPM\Projects\robocode-
workspace\Robocode\robocode\robocode\dialog\NewBattleDialogTest3.java:
8:
> > cannot find symbol
> >     [javac] symbol: class TestCase
> >     [javac] public class NewBattleDialogTest3 extends TestCase {
> >     [javac]                                           ^
> >     [javac]
> >
> H:\Unidata\SPM\Projects\robocode-
workspace\Robocode\robocode\robocode\dialog\RobocodeMenuBarTest.java:5
:
> > package junit.framework does not exist
> >     [javac] import junit.framework.Assert;
> >     [javac]                       ^
> >     [javac]
> >
> H:\Unidata\SPM\Projects\robocode-
workspace\Robocode\robocode\robocode\dialog\RobocodeMenuBarTest.java:7
:
> > package org.junit does not exist
> >     [javac] import org.junit.Test;
> >     [javac]                 ^
> >     [javac]
> >
> H:\Unidata\SPM\Projects\robocode-
workspace\Robocode\robocode\robocode\dialog\RobotSelectionPanelTest.ja
va:5:
> > package junit.framework does not exist
> >     [javac] import junit.framework.Assert;
> >     [javac]                       ^
> >     [javac]
> >
> H:\Unidata\SPM\Projects\robocode-
workspace\Robocode\robocode\robocode\dialog\RobotSelectionPanelTest.ja
va:7:
> > package org.junit does not exist
> >     [javac] import org.junit.Test;
> >     [javac]                 ^
> >     [javac]
> >
> H:\Unidata\SPM\Projects\robocode-
workspace\Robocode\robocode\testPackage\AllTests.java:6:
> > package junit.framework does not exist
> >     [javac] import junit.framework.Test;
> >     [javac]                       ^
> >     [javac]
> >
> H:\Unidata\SPM\Projects\robocode-
workspace\Robocode\robocode\testPackage\AllTests.java:7:
> > package junit.framework does not exist
> >     [javac] import junit.framework.TestCase;
> >     [javac]                       ^
> >     [javac]
> >
> H:\Unidata\SPM\Projects\robocode-
workspace\Robocode\robocode\testPackage\AllTests.java:8:
> > package junit.framework does not exist
> >     [javac] import junit.framework.TestSuite;
> >     [javac]                       ^
> >     [javac]
> >
> H:\Unidata\SPM\Projects\robocode-
workspace\Robocode\robocode\testPackage\AllTests.java:10:
> > cannot find symbol
> >     [javac] symbol: class TestCase
> >     [javac] public class AllTests extends TestCase{
> >     [javac]                               ^
> >     [javac]
> >
> H:\Unidata\SPM\Projects\robocode-
workspace\Robocode\robocode\testPackage\AllTests.java:16:
> > cannot find symbol
> >     [javac] symbol  : class Test
> >     [javac] location: class testPackage.AllTests
> >     [javac]     public static Test suite(){
> >     [javac]                   ^
> >     [javac]
> >
> H:\Unidata\SPM\Projects\robocode-
workspace\Robocode\robocode\robocode\dialog\RobocodeMenuBarTest.java:3
0:
> > cannot find symbol
> >     [javac] symbol  : class Test
> >     [javac] location: class robocode.dialog.RobocodeMenuBarTest
> >     [javac] @Test
> >     [javac] ^
> >     [javac]
> >
> H:\Unidata\SPM\Projects\robocode-
workspace\Robocode\robocode\robocode\dialog\RobotSelectionPanelTest.ja
va:13:
> > cannot find symbol
> >     [javac] symbol  : class Test
> >     [javac] location: class
robocode.dialog.RobotSelectionPanelTest
> >     [javac] @Test
> >     [javac] ^
> >     [javac]
> >
> H:\Unidata\SPM\Projects\robocode-
workspace\Robocode\robocode\robocode\dialog\NewBattleBattleFieldTabTes
t.java:37:
> > cannot find symbol
> >     [javac] symbol  : variable Assert
> >     [javac] location: class
robocode.dialog.NewBattleBattleFieldTabTest
> >     [javac]
> >
>
Assert.assertEquals(battleFieldTab.getButtons()[battleFieldTab.getButt
ons().length
> > -1].getText(), max_size+"x"+max_size);
> >     [javac] ^
> >     [javac]
> >
> H:\Unidata\SPM\Projects\robocode-
workspace\Robocode\robocode\robocode\dialog\NewBattleBattleFieldTabTes
t.java:68:
> > cannot find symbol
> >     [javac] symbol  : variable Assert
> >     [javac] location: class
robocode.dialog.NewBattleBattleFieldTabTest
> >     [javac] Assert.assertEquals(expected, actual);
> >     [javac] ^
> >     [javac]
> >
> H:\Unidata\SPM\Projects\robocode-
workspace\Robocode\robocode\robocode\dialog\NewBattleBattleFieldTabTes
t.java:69:
> > cannot find symbol
> >     [javac] symbol  : variable Assert
> >     [javac] location: class
robocode.dialog.NewBattleBattleFieldTabTest
> >     [javac] Assert.assertTrue("JSlider Exists ",
!jSliderExists);
> >     [javac] ^
> >     [javac]
> >
> H:\Unidata\SPM\Projects\robocode-
workspace\Robocode\robocode\robocode\dialog\NewBattleBattleFieldTabTes
t2.java:24:
> > cannot find symbol
> >     [javac] symbol  : variable Assert
> >     [javac] location: class
robocode.dialog.NewBattleBattleFieldTabTest2
> >     [javac] Assert.assertEquals(expected_value,
> > Backgroundpanel.Max_num_Button());
> >     [javac] ^
> >     [javac]
> >
> H:\Unidata\SPM\Projects\robocode-
workspace\Robocode\robocode\robocode\dialog\NewBattleDialogTest3.java:
27:
> > cannot find symbol
> >     [javac] symbol  : variable Assert
> >     [javac] location: class robocode.dialog.NewBattleDialogTest3
> >     [javac] Assert.assertEquals(true,
> > dailog.validateNumRounds(battleProperty.getNumRounds()));
> >     [javac] ^
> >     [javac]
> >
> H:\Unidata\SPM\Projects\robocode-
workspace\Robocode\robocode\robocode\dialog\PreferencesKeyConfiguratio
nOptionsTab.java:20:
> > warning: [serial] serializable class
> > robocode.dialog.PreferencesKeyConfigurationOptionsTab has no
> > definition of serialVersionUID
> >     [javac] public class PreferencesKeyConfigurationOptionsTab
> > extends WizardPanel {
> >     [javac]        ^
> >     [javac]
> >
> H:\Unidata\SPM\Projects\robocode-
workspace\Robocode\robocode\robocode\dialog\RobocodeMenuBarTest.java:3
8:
> > cannot find symbol
> >     [javac] symbol  : variable Assert
> >     [javac] location: class robocode.dialog.RobocodeMenuBarTest
> >     [javac]
Assert.assertNotSame(battleField,offscreenImage);
> >     [javac] ^
> >     [javac]
> >
> H:\Unidata\SPM\Projects\robocode-
workspace\Robocode\robocode\robocode\dialog\RobocodeMenuBarTest.java:4
2:
> > cannot find symbol
> >     [javac] symbol  : variable Assert
> >     [javac] location: class robocode.dialog.RobocodeMenuBarTest
> >     [javac]
> >
>
Assert.assertEquals(battleField.getHeight()+battleField.getWidth(),Cap
ture_X.getBattlefieldHeight()+Capture_Y.getBattlefieldWidth());
> >     [javac] ^
> >     [javac]
> >
> H:\Unidata\SPM\Projects\robocode-
workspace\Robocode\robocode\robocode\dialog\RobotSelectionPanelTest.ja
va:23:
> > cannot find symbol
> >     [javac] symbol  : variable Assert
> >     [javac] location: class
robocode.dialog.RobotSelectionPanelTest
> >     [javac] Assert.assertTrue(maxRobot<=
> > RobotSelectionPanel.maxRobots);
> >     [javac] ^
> >     [javac]
> >
> H:\Unidata\SPM\Projects\robocode-
workspace\Robocode\robocode\testPackage\AllTests.java:18:
> > cannot find symbol
> >     [javac] symbol  : class TestSuite
> >     [javac] location: class testPackage.AllTests
> >     [javac]         TestSuite suite = new TestSuite("3a group test
> > suite");
> >     [javac]         ^
> >     [javac]
> >
> H:\Unidata\SPM\Projects\robocode-
workspace\Robocode\robocode\testPackage\AllTests.java:18:
> > cannot find symbol
> >     [javac] symbol  : class TestSuite
> >     [javac] location: class testPackage.AllTests
> >     [javac]         TestSuite suite = new TestSuite("3a group test
> > suite");
> >     [javac]                               ^
> >     [javac]
> >
> H:\Unidata\SPM\Projects\robocode-
workspace\Robocode\robocode\testPackage\AllTests.java:21:
> > cannot find symbol
> >     [javac] symbol  : class TestSuite
> >     [javac] location: class testPackage.AllTests
> >     [javac]         suite.addTest(new
> > TestSuite(NewBattleBattleFieldTabTest.class, "deleted function
test
> > suite"));
> >     [javac]                           ^
> >     [javac]
> >
> H:\Unidata\SPM\Projects\robocode-
workspace\Robocode\robocode\testPackage\AllTests.java:22:
> > cannot find symbol
> >     [javac] symbol  : class TestSuite
> >     [javac] location: class testPackage.AllTests
> >     [javac]         suite.addTest(new
> > TestSuite(NewBattleDialogTest3.class, "modified function test
suite"));
> >     [javac]                           ^
> >     [javac]
> >
> H:\Unidata\SPM\Projects\robocode-
workspace\Robocode\robocode\testPackage\AllTests.java:23:
> > cannot find symbol
> >     [javac] symbol  : class TestSuite
> >     [javac] location: class testPackage.AllTests
> >     [javac]         suite.addTest(new
> > TestSuite(NewBattleBattleFieldTabTest2.class, "addition function
test
> > suite"));
> >     [javac]                           ^
> >     [javac] 32 errors
> >     [javac] 1 warning
> >
> > BUILD FAILED
> > H:\Unidata\SPM\Projects\robocode-
workspace\Robocode\build\build.xml:150:
> > The following error occurred while executing this line:
> > H:\Unidata\SPM\Projects\robocode-
workspace\Robocode\build\build.xml:576:
> > Compile failed; see the compiler error output for details.
> >
> > Total time: 6 seconds
> >
>




Re: Problem in Compiling Because of Testcase

by flemmingnlarsen-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

You could do a Google search for:
"package junit.framework does not exist"

At least I did and got some potential answers here:
http://www.google.dk/search?hl=da&q=%22package+junit.framework+does+not+exist%22&btnG=Google-s%C3%B8gning&meta=&aq=f&oq=

I don't know what will fix the problem you have encountered, but
perhaps this page gives the answer?:

http://dev.eclipse.org/newslists/news.eclipse.newcomer/msg11102.html

I hope you'll be able to solve the problem.

Best regards,
- Flemming

--- In Robocode@..., "asherbaig" <devilvsevil@...> wrote:

>
> I have seen that my Junit 3 and 4 both are there inside
> Libraries.Please help me compiling it.As it says in console that
> "package junit.framework does not exist".Also Here is the snapshot of
> it.
>
> http://i44.tinypic.com/34rwzfl.jpg
>
>
>
> --- In Robocode@..., "flemmingnlarsen"
> <flemming.n.larsen@> wrote:
> >
> > I guess you have followed the 'Developers Guide for building
> Robocode'?:
> >
> > http://testwiki.roborumble.org/w/index.php?
> title=Robocode/Developers_Guide_for_building_Robocode
> >
> > I not, check this out to see if you forgot something. But I guess
> > everything is okay here.
> >
> > When look thru the compiler error / stack trace it looks like it
> > cannot find the JUnit library. You should make sure that the 'tests'
> > project (where your tests should be located) are put into this
> project.
> >
> > Try to do this:
> > ---------------
> > When your Robocode workspace is open in Eclipse, right-click on the
> > 'tests' project, and select 'Properties' (the last entry) in the
> popup
> > that appears.
> >   Now you select 'Java Build Path' on the left side of the window
> that
> > appeared, and click on the 'Libraries' tab page.
> >   Here you should be able to see 'junit-4.4.jar - test/libs'. If
> not,
> > you must add it by pressing the 'Add JARs...' button, and select
> > test/libs/junit-4.4.jar.
> >
> > I hope this works. I does for me for the tests provided with
> Robocode.
> >
> > Regards,
> > - Flemming
> >
> > --- In Robocode@..., "asherbaig" <devilvsevil@> wrote:
> > >
> > > I want to compile the game but unfortunatly i got error due to
> > > testcases that i have made it.Any solution ?
> > >
> > > Console Log Report :
> > >
> > > Buildfile:
> > > H:\Unidata\SPM\Projects\robocode-
> workspace\Robocode\build\build.xml
> > > clean:
> > >      [echo] Cleaning up build files...
> > >    [delete] Deleting directory
> > > H:\Unidata\SPM\Projects\robocode-workspace\Robocode\build\build
> > > init:
> > >      [echo] Initializes the build...
> > >     [mkdir] Created dir:
> > > H:\Unidata\SPM\Projects\robocode-
> workspace\Robocode\build\build\libs
> > > compile.robocode:
> > >      [echo] Compiling Robocode...
> > >      [copy] Copying 1 file to
> > > H:\Unidata\SPM\Projects\robocode-
> workspace\Robocode\build\build\libs
> > >     [javac] Compiling 258 source files to
> > > H:\Unidata\SPM\Projects\robocode-workspace\Robocode\build\build
> > >     [javac]
> > >
> > H:\Unidata\SPM\Projects\robocode-
> workspace\Robocode\robocode\robocode\dialog\NewBattleBattleFieldTabTes
> t.java:17:
> > > package junit.framework does not exist
> > >     [javac] import junit.framework.*;
> > >     [javac] ^
> > >     [javac]
> > >
> > H:\Unidata\SPM\Projects\robocode-
> workspace\Robocode\robocode\robocode\dialog\NewBattleBattleFieldTabTes
> t.java:19:
> > > cannot find symbol
> > >     [javac] symbol: class TestCase
> > >     [javac] public class NewBattleBattleFieldTabTest extends
> TestCase {
> > >     [javac]                                                  ^
> > >     [javac]
> > >
> > H:\Unidata\SPM\Projects\robocode-
> workspace\Robocode\robocode\robocode\dialog\NewBattleBattleFieldTabTes
> t2.java:3:
> > > package junit.framework does not exist
> > >     [javac] import junit.framework.Assert;
> > >     [javac]                       ^
> > >     [javac]
> > >
> > H:\Unidata\SPM\Projects\robocode-
> workspace\Robocode\robocode\robocode\dialog\NewBattleBattleFieldTabTes
> t2.java:4:
> > > package junit.framework does not exist
> > >     [javac] import junit.framework.TestCase;
> > >     [javac]                       ^
> > >     [javac]
> > >
> > H:\Unidata\SPM\Projects\robocode-
> workspace\Robocode\robocode\robocode\dialog\NewBattleBattleFieldTabTes
> t2.java:6:
> > > cannot find symbol
> > >     [javac] symbol: class TestCase
> > >     [javac] public class NewBattleBattleFieldTabTest2 extends
> TestCase {
> > >     [javac]                                                   ^
> > >     [javac]
> > >
> > H:\Unidata\SPM\Projects\robocode-
> workspace\Robocode\robocode\robocode\dialog\NewBattleDialogTest3.java:
> 5:
> > > package junit.framework does not exist
> > >     [javac] import junit.framework.Assert;
> > >     [javac]                       ^
> > >     [javac]
> > >
> > H:\Unidata\SPM\Projects\robocode-
> workspace\Robocode\robocode\robocode\dialog\NewBattleDialogTest3.java:
> 6:
> > > package junit.framework does not exist
> > >     [javac] import junit.framework.TestCase;
> > >     [javac]                       ^
> > >     [javac]
> > >
> > H:\Unidata\SPM\Projects\robocode-
> workspace\Robocode\robocode\robocode\dialog\NewBattleDialogTest3.java:
> 8:
> > > cannot find symbol
> > >     [javac] symbol: class TestCase
> > >     [javac] public class NewBattleDialogTest3 extends TestCase {
> > >     [javac]                                           ^
> > >     [javac]
> > >
> > H:\Unidata\SPM\Projects\robocode-
> workspace\Robocode\robocode\robocode\dialog\RobocodeMenuBarTest.java:5
> :
> > > package junit.framework does not exist
> > >     [javac] import junit.framework.Assert;
> > >     [javac]                       ^
> > >     [javac]
> > >
> > H:\Unidata\SPM\Projects\robocode-
> workspace\Robocode\robocode\robocode\dialog\RobocodeMenuBarTest.java:7
> :
> > > package org.junit does not exist
> > >     [javac] import org.junit.Test;
> > >     [javac]                 ^
> > >     [javac]
> > >
> > H:\Unidata\SPM\Projects\robocode-
> workspace\Robocode\robocode\robocode\dialog\RobotSelectionPanelTest.ja
> va:5:
> > > package junit.framework does not exist
> > >     [javac] import junit.framework.Assert;
> > >     [javac]                       ^
> > >     [javac]
> > >
> > H:\Unidata\SPM\Projects\robocode-
> workspace\Robocode\robocode\robocode\dialog\RobotSelectionPanelTest.ja
> va:7:
> > > package org.junit does not exist
> > >     [javac] import org.junit.Test;
> > >     [javac]                 ^
> > >     [javac]
> > >
> > H:\Unidata\SPM\Projects\robocode-
> workspace\Robocode\robocode\testPackage\AllTests.java:6:
> > > package junit.framework does not exist
> > >     [javac] import junit.framework.Test;
> > >     [javac]                       ^
> > >     [javac]
> > >
> > H:\Unidata\SPM\Projects\robocode-
> workspace\Robocode\robocode\testPackage\AllTests.java:7:
> > > package junit.framework does not exist
> > >     [javac] import junit.framework.TestCase;
> > >     [javac]                       ^
> > >     [javac]
> > >
> > H:\Unidata\SPM\Projects\robocode-
> workspace\Robocode\robocode\testPackage\AllTests.java:8:
> > > package junit.framework does not exist
> > >     [javac] import junit.framework.TestSuite;
> > >     [javac]                       ^
> > >     [javac]
> > >
> > H:\Unidata\SPM\Projects\robocode-
> workspace\Robocode\robocode\testPackage\AllTests.java:10:
> > > cannot find symbol
> > >     [javac] symbol: class TestCase
> > >     [javac] public class AllTests extends TestCase{
> > >     [javac]                               ^
> > >     [javac]
> > >
> > H:\Unidata\SPM\Projects\robocode-
> workspace\Robocode\robocode\testPackage\AllTests.java:16:
> > > cannot find symbol
> > >     [javac] symbol  : class Test
> > >     [javac] location: class testPackage.AllTests
> > >     [javac]     public static Test suite(){
> > >     [javac]                   ^
> > >     [javac]
> > >
> > H:\Unidata\SPM\Projects\robocode-
> workspace\Robocode\robocode\robocode\dialog\RobocodeMenuBarTest.java:3
> 0:
> > > cannot find symbol
> > >     [javac] symbol  : class Test
> > >     [javac] location: class robocode.dialog.RobocodeMenuBarTest
> > >     [javac] @Test
> > >     [javac] ^
> > >     [javac]
> > >
> > H:\Unidata\SPM\Projects\robocode-
> workspace\Robocode\robocode\robocode\dialog\RobotSelectionPanelTest.ja
> va:13:
> > > cannot find symbol
> > >     [javac] symbol  : class Test
> > >     [javac] location: class
> robocode.dialog.RobotSelectionPanelTest
> > >     [javac] @Test
> > >     [javac] ^
> > >     [javac]
> > >
> > H:\Unidata\SPM\Projects\robocode-
> workspace\Robocode\robocode\robocode\dialog\NewBattleBattleFieldTabTes
> t.java:37:
> > > cannot find symbol
> > >     [javac] symbol  : variable Assert
> > >     [javac] location: class
> robocode.dialog.NewBattleBattleFieldTabTest
> > >     [javac]
> > >
> >
> Assert.assertEquals(battleFieldTab.getButtons()[battleFieldTab.getButt
> ons().length
> > > -1].getText(), max_size+"x"+max_size);
> > >     [javac] ^
> > >     [javac]
> > >
> > H:\Unidata\SPM\Projects\robocode-
> workspace\Robocode\robocode\robocode\dialog\NewBattleBattleFieldTabTes
> t.java:68:
> > > cannot find symbol
> > >     [javac] symbol  : variable Assert
> > >     [javac] location: class
> robocode.dialog.NewBattleBattleFieldTabTest
> > >     [javac] Assert.assertEquals(expected, actual);
> > >     [javac] ^
> > >     [javac]
> > >
> > H:\Unidata\SPM\Projects\robocode-
> workspace\Robocode\robocode\robocode\dialog\NewBattleBattleFieldTabTes
> t.java:69:
> > > cannot find symbol
> > >     [javac] symbol  : variable Assert
> > >     [javac] location: class
> robocode.dialog.NewBattleBattleFieldTabTest
> > >     [javac] Assert.assertTrue("JSlider Exists ",
> !jSliderExists);
> > >     [javac] ^
> > >     [javac]
> > >
> > H:\Unidata\SPM\Projects\robocode-
> workspace\Robocode\robocode\robocode\dialog\NewBattleBattleFieldTabTes
> t2.java:24:
> > > cannot find symbol
> > >     [javac] symbol  : variable Assert
> > >     [javac] location: class
> robocode.dialog.NewBattleBattleFieldTabTest2
> > >     [javac] Assert.assertEquals(expected_value,
> > > Backgroundpanel.Max_num_Button());
> > >     [javac] ^
> > >     [javac]
> > >
> > H:\Unidata\SPM\Projects\robocode-
> workspace\Robocode\robocode\robocode\dialog\NewBattleDialogTest3.java:
> 27:
> > > cannot find symbol
> > >     [javac] symbol  : variable Assert
> > >     [javac] location: class robocode.dialog.NewBattleDialogTest3
> > >     [javac] Assert.assertEquals(true,
> > > dailog.validateNumRounds(battleProperty.getNumRounds()));
> > >     [javac] ^
> > >     [javac]
> > >
> > H:\Unidata\SPM\Projects\robocode-
> workspace\Robocode\robocode\robocode\dialog\PreferencesKeyConfiguratio
> nOptionsTab.java:20:
> > > warning: [serial] serializable class
> > > robocode.dialog.PreferencesKeyConfigurationOptionsTab has no
> > > definition of serialVersionUID
> > >     [javac] public class PreferencesKeyConfigurationOptionsTab
> > > extends WizardPanel {
> > >     [javac]        ^
> > >     [javac]
> > >
> > H:\Unidata\SPM\Projects\robocode-
> workspace\Robocode\robocode\robocode\dialog\RobocodeMenuBarTest.java:3
> 8:
> > > cannot find symbol
> > >     [javac] symbol  : variable Assert
> > >     [javac] location: class robocode.dialog.RobocodeMenuBarTest
> > >     [javac]
> Assert.assertNotSame(battleField,offscreenImage);
> > >     [javac] ^
> > >     [javac]
> > >
> > H:\Unidata\SPM\Projects\robocode-
> workspace\Robocode\robocode\robocode\dialog\RobocodeMenuBarTest.java:4
> 2:
> > > cannot find symbol
> > >     [javac] symbol  : variable Assert
> > >     [javac] location: class robocode.dialog.RobocodeMenuBarTest
> > >     [javac]
> > >
> >
> Assert.assertEquals(battleField.getHeight()+battleField.getWidth(),Cap
> ture_X.getBattlefieldHeight()+Capture_Y.getBattlefieldWidth());
> > >     [javac] ^
> > >     [javac]
> > >
> > H:\Unidata\SPM\Projects\robocode-
> workspace\Robocode\robocode\robocode\dialog\RobotSelectionPanelTest.ja
> va:23:
> > > cannot find symbol
> > >     [javac] symbol  : variable Assert
> > >     [javac] location: class
> robocode.dialog.RobotSelectionPanelTest
> > >     [javac] Assert.assertTrue(maxRobot<=
> > > RobotSelectionPanel.maxRobots);
> > >     [javac] ^
> > >     [javac]
> > >
> > H:\Unidata\SPM\Projects\robocode-
> workspace\Robocode\robocode\testPackage\AllTests.java:18:
> > > cannot find symbol
> > >     [javac] symbol  : class TestSuite
> > >     [javac] location: class testPackage.AllTests
> > >     [javac]         TestSuite suite = new TestSuite("3a group test
> > > suite");
> > >     [javac]         ^
> > >     [javac]
> > >
> > H:\Unidata\SPM\Projects\robocode-
> workspace\Robocode\robocode\testPackage\AllTests.java:18:
> > > cannot find symbol
> > >     [javac] symbol  : class TestSuite
> > >     [javac] location: class testPackage.AllTests
> > >     [javac]         TestSuite suite = new TestSuite("3a group test
> > > suite");
> > >     [javac]                               ^
> > >     [javac]
> > >
> > H:\Unidata\SPM\Projects\robocode-
> workspace\Robocode\robocode\testPackage\AllTests.java:21:
> > > cannot find symbol
> > >     [javac] symbol  : class TestSuite
> > >     [javac] location: class testPackage.AllTests
> > >     [javac]         suite.addTest(new
> > > TestSuite(NewBattleBattleFieldTabTest.class, "deleted function
> test
> > > suite"));
> > >     [javac]                           ^
> > >     [javac]
> > >
> > H:\Unidata\SPM\Projects\robocode-
> workspace\Robocode\robocode\testPackage\AllTests.java:22:
> > > cannot find symbol
> > >     [javac] symbol  : class TestSuite
> > >     [javac] location: class testPackage.AllTests
> > >     [javac]         suite.addTest(new
> > > TestSuite(NewBattleDialogTest3.class, "modified function test
> suite"));
> > >     [javac]                           ^
> > >     [javac]
> > >
> > H:\Unidata\SPM\Projects\robocode-
> workspace\Robocode\robocode\testPackage\AllTests.java:23:
> > > cannot find symbol
> > >     [javac] symbol  : class TestSuite
> > >     [javac] location: class testPackage.AllTests
> > >     [javac]         suite.addTest(new
> > > TestSuite(NewBattleBattleFieldTabTest2.class, "addition function
> test
> > > suite"));
> > >     [javac]                           ^
> > >     [javac] 32 errors
> > >     [javac] 1 warning
> > >
> > > BUILD FAILED
> > > H:\Unidata\SPM\Projects\robocode-
> workspace\Robocode\build\build.xml:150:
> > > The following error occurred while executing this line:
> > > H:\Unidata\SPM\Projects\robocode-
> workspace\Robocode\build\build.xml:576:
> > > Compile failed; see the compiler error output for details.
> > >
> > > Total time: 6 seconds
> > >
> >
>