2020-12-26 14:12:05 -08:00
|
|
|
// Copyright (c) FIRST and other WPILib contributors.
|
|
|
|
|
// Open Source Software; you can modify and/or share it under the terms of
|
|
|
|
|
// the WPILib BSD license file in the root directory of this project.
|
2017-01-04 23:48:13 -08:00
|
|
|
|
2025-11-07 19:55:43 -05:00
|
|
|
package org.wpilib.hal;
|
2017-01-04 23:48:13 -08:00
|
|
|
|
2025-11-07 19:55:43 -05:00
|
|
|
import org.wpilib.hardware.hal.HAL;
|
|
|
|
|
import org.wpilib.hardware.hal.HALUtil;
|
|
|
|
|
import org.wpilib.networktables.NetworkTablesJNI;
|
2020-12-29 22:45:16 -08:00
|
|
|
import org.junit.jupiter.api.Test;
|
2018-05-24 00:31:04 -04:00
|
|
|
|
2018-06-11 18:01:49 -04:00
|
|
|
class JNITest {
|
2017-08-18 21:35:53 -07:00
|
|
|
@Test
|
2018-06-11 18:01:49 -04:00
|
|
|
void jniNtcoreLinkTest() {
|
2017-08-18 21:35:53 -07:00
|
|
|
// Test to verify that the JNI test link works correctly.
|
2017-08-27 19:31:46 -07:00
|
|
|
NetworkTablesJNI.flush(NetworkTablesJNI.getDefaultInstance());
|
2017-08-18 21:35:53 -07:00
|
|
|
}
|
2017-01-04 23:48:13 -08:00
|
|
|
|
2017-08-18 21:35:53 -07:00
|
|
|
@Test
|
2018-06-11 18:01:49 -04:00
|
|
|
void jniHalLinkTest() {
|
2017-12-10 19:38:53 -08:00
|
|
|
HAL.initialize(500, 0);
|
2017-08-18 21:35:53 -07:00
|
|
|
// Test to verify that the JNI test link works correctly.
|
|
|
|
|
HALUtil.getHALRuntimeType();
|
|
|
|
|
}
|
2017-01-04 23:48:13 -08:00
|
|
|
}
|