mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
Removes statics from hal sim (#825)
Based off of #824, the equivelent in sim.
This commit is contained in:
committed by
Peter Johnson
parent
8bd48d6c34
commit
d2e7a90f41
@@ -11,6 +11,7 @@ import com.google.common.base.Stopwatch;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import edu.wpi.first.wpilibj.hal.HAL;
|
||||
import edu.wpi.first.wpilibj.util.BaseSystemNotInitializedException;
|
||||
|
||||
/**
|
||||
@@ -25,6 +26,7 @@ public final class UnitTestUtility {
|
||||
* Sets up the base system WPILib so that it does not rely on hardware.
|
||||
*/
|
||||
public static void setupMockBase() {
|
||||
HAL.initialize(500, 0);
|
||||
try {
|
||||
// Check to see if this has been setup
|
||||
Timer.getFPGATimestamp();
|
||||
|
||||
@@ -9,9 +9,12 @@ package edu.wpi.first.wpilibj.can;
|
||||
|
||||
import org.junit.Test;
|
||||
|
||||
import edu.wpi.first.wpilibj.hal.HAL;
|
||||
|
||||
public class CANStatusTest {
|
||||
@Test
|
||||
public void canStatusGetDoesntThrow() {
|
||||
HAL.initialize(500, 0);
|
||||
CANStatus status = new CANStatus();
|
||||
CANJNI.GetCANStatus(status);
|
||||
// Nothing we can assert, so just make sure it didn't throw.
|
||||
|
||||
@@ -19,6 +19,7 @@ public class JNITest {
|
||||
|
||||
@Test
|
||||
public void jniHalLinkTest() {
|
||||
HAL.initialize(500, 0);
|
||||
// Test to verify that the JNI test link works correctly.
|
||||
HALUtil.getHALRuntimeType();
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ import org.junit.Test;
|
||||
public class MatchInfoDataTest {
|
||||
@Test
|
||||
public void matchInfoDataDoesNotThrow() {
|
||||
HAL.initialize(500, 0);
|
||||
MatchInfoData data = new MatchInfoData();
|
||||
HAL.getMatchInfo(data);
|
||||
// Nothing we can assert, so just make sure it didn't throw.
|
||||
|
||||
Reference in New Issue
Block a user