Skip to content

Commit

Permalink
Fix style warnings in CpuTests.java
Browse files Browse the repository at this point in the history
  • Loading branch information
lupino3 committed May 26, 2016
1 parent 16e058f commit d09791d
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions test/org/edumips64/CpuTests.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@

@RunWith(JUnit4.class)
public class CpuTests {
protected CPU cpu;
protected Parser parser;
public static String testsLocation = "test/org/edumips64/data/";
private CPU cpu;
private Parser parser;
private static String testsLocation = "test/org/edumips64/data/";
private final static Logger log = Logger.getLogger(CpuTestStatus.class.getName());
protected Dinero dinero = Dinero.getInstance();
protected ConfigStore config = ConfigManager.getTmpConfig();
private Dinero dinero = Dinero.getInstance();
private ConfigStore config = ConfigManager.getTmpConfig();

@Rule
public ErrorCollector collector = new ErrorCollector();
Expand All @@ -65,7 +65,7 @@ class CpuTestStatus {
int rawStalls, wawStalls, memStalls;
String traceFile;

public CpuTestStatus(CPU cpu, String dineroTrace) {
CpuTestStatus(CPU cpu, String dineroTrace) {
cycles = cpu.getCycles();
instructions = cpu.getInstructions();
wawStalls = cpu.getWAWStalls();
Expand All @@ -91,15 +91,15 @@ public FPUExceptionsConfig() {
}

// Restore values to the config Store.
public void restore() {
void restore() {
config.putBoolean("INVALID_OPERATION", invalidOperation);
config.putBoolean("OVERFLOW", overflow);
config.putBoolean("UNDERFLOW", underflow);
config.putBoolean("DIVIDE_BY_ZERO", divideByZero);
}
}

protected FPUExceptionsConfig fec;
private FPUExceptionsConfig fec;

@BeforeClass
public static void setup() {
Expand Down Expand Up @@ -131,7 +131,7 @@ public void testTearDown() {
*
* @param testPath path of the test code.
*/
protected CpuTestStatus runMipsTest(String testPath) throws Exception {
private CpuTestStatus runMipsTest(String testPath) throws Exception {
log.warning("================================= Starting test " + testPath);
cpu.reset();
testPath = testsLocation + testPath;
Expand Down Expand Up @@ -176,9 +176,9 @@ enum ForwardingStatus {ENABLED, DISABLED}
* @return a dictionary that maps the forwarding status to the
* corresponding CpuTestStatus object.
*/
protected Map<ForwardingStatus, CpuTestStatus> runMipsTestWithAndWithoutForwarding(String testPath) throws Exception {
private Map<ForwardingStatus, CpuTestStatus> runMipsTestWithAndWithoutForwarding(String testPath) throws Exception {
boolean forwardingStatus = Instruction.getEnableForwarding();
Map<ForwardingStatus, CpuTestStatus> statuses = new HashMap<ForwardingStatus, CpuTestStatus>();
Map<ForwardingStatus, CpuTestStatus> statuses = new HashMap<>();

Instruction.setEnableForwarding(true);
statuses.put(ForwardingStatus.ENABLED, runMipsTest(testPath));
Expand Down

0 comments on commit d09791d

Please sign in to comment.