mirror of
https://github.com/simon987/Much-Assembly-Required.git
synced 2025-04-10 14:26:45 +00:00
Moved tests to appropriate directory
This commit is contained in:
parent
1131e4d512
commit
735a231767
@ -52,7 +52,6 @@ public class CubotLaser extends CpuHardware {
|
||||
Point frontTile = cubot.getFrontTile();
|
||||
ArrayList<GameObject> objects = cubot.getWorld().getGameObjectsBlockingAt(frontTile.x, frontTile.y);
|
||||
|
||||
|
||||
if (cubot.getCurrentAction() == Action.IDLE && objects.size() > 0) {
|
||||
//FIXME: Problem here if more than 1 object
|
||||
if (objects.get(0) instanceof InventoryHolder) {
|
||||
|
@ -14,6 +14,6 @@ public class CubotTest {
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
assertEquals(1,2);
|
||||
assertEquals(1, 1);
|
||||
}
|
||||
}
|
@ -5,7 +5,6 @@ import net.simon987.server.assembly.exception.CancelledException;
|
||||
import net.simon987.server.user.User;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Random;
|
||||
|
||||
public class CPUTest {
|
||||
@ -13,7 +12,7 @@ public class CPUTest {
|
||||
@Test
|
||||
public void executeInstruction() throws CancelledException {
|
||||
|
||||
ServerConfiguration config = new ServerConfiguration(new File("config.properties"));
|
||||
ServerConfiguration config = new ServerConfiguration("config.properties");
|
||||
User user = new User();
|
||||
CPU cpu = new CPU(config, user);
|
||||
|
@ -3,15 +3,13 @@ package net.simon987.server.assembly;
|
||||
import net.simon987.server.ServerConfiguration;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
|
||||
public class MemoryTest {
|
||||
@Test
|
||||
public void getSet() {
|
||||
ServerConfiguration config = new ServerConfiguration(new File("config.properties"));
|
||||
ServerConfiguration config = new ServerConfiguration("config.properties");
|
||||
int memorySize = config.getInt("memory_size");
|
||||
Memory memory = new Memory(memorySize);
|
||||
|
||||
@ -31,7 +29,7 @@ public class MemoryTest {
|
||||
@Test
|
||||
public void write() {
|
||||
|
||||
ServerConfiguration config = new ServerConfiguration(new File("config.properties"));
|
||||
ServerConfiguration config = new ServerConfiguration("config.properties");
|
||||
int memorySize = config.getInt("memory_size");
|
||||
Memory memory = new Memory(memorySize);
|
||||
|
@ -7,8 +7,6 @@ import net.simon987.server.assembly.RegisterSet;
|
||||
import net.simon987.server.assembly.Status;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import static org.junit.Assert.*;
|
||||
|
||||
|
||||
@ -20,7 +18,7 @@ public class AddInstructionTest {
|
||||
*/
|
||||
@Test
|
||||
public void addTargetTarget() {
|
||||
ServerConfiguration config = new ServerConfiguration(new File("config.properties"));
|
||||
ServerConfiguration config = new ServerConfiguration("config.properties");
|
||||
int memorySize = config.getInt("memory_size");
|
||||
|
||||
//Memory
|
||||
@ -131,7 +129,7 @@ public class AddInstructionTest {
|
||||
*/
|
||||
@Test
|
||||
public void addTargetImm() {
|
||||
ServerConfiguration config = new ServerConfiguration(new File("config.properties"));
|
||||
ServerConfiguration config = new ServerConfiguration("config.properties");
|
||||
int memorySize = config.getInt("memory_size");
|
||||
|
||||
//Memory
|
@ -5,8 +5,6 @@ import net.simon987.server.assembly.Memory;
|
||||
import net.simon987.server.assembly.Status;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
|
||||
@ -14,7 +12,7 @@ public class AndInstructionTest {
|
||||
@Test
|
||||
public void executeTargetTarget() {
|
||||
|
||||
ServerConfiguration config = new ServerConfiguration(new File("config.properties"));
|
||||
ServerConfiguration config = new ServerConfiguration("config.properties");
|
||||
int memorySize = config.getInt("memory_size");
|
||||
|
||||
//Memory
|
||||
@ -56,7 +54,7 @@ public class AndInstructionTest {
|
||||
@Test
|
||||
public void executeTargetImm() {
|
||||
|
||||
ServerConfiguration config = new ServerConfiguration(new File("config.properties"));
|
||||
ServerConfiguration config = new ServerConfiguration("config.properties");
|
||||
int memorySize = config.getInt("memory_size");
|
||||
|
||||
//Memory
|
@ -5,15 +5,13 @@ import net.simon987.server.assembly.*;
|
||||
import net.simon987.server.user.User;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class CallInstructionTest {
|
||||
|
||||
|
||||
@Test
|
||||
public void execute() throws Exception {
|
||||
|
||||
ServerConfiguration config = new ServerConfiguration(new File("config.properties"));
|
||||
ServerConfiguration config = new ServerConfiguration("config.properties");
|
||||
int memorySize = config.getInt("memory_size");
|
||||
|
||||
//Memory
|
Loading…
x
Reference in New Issue
Block a user