mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[wpilibj] Add Preferences.getNetworkTable() (#7962)
This commit is contained in:
@@ -97,6 +97,15 @@ public final class Preferences {
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the network table used for preferences entries.
|
||||
*
|
||||
* @return the network table used for preferences entries
|
||||
*/
|
||||
public static NetworkTable getNetworkTable() {
|
||||
return m_table;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the preferences keys.
|
||||
*
|
||||
|
||||
@@ -91,6 +91,13 @@ class PreferencesTest {
|
||||
"Preferences was not empty! Preferences in table: " + Arrays.toString(keys.toArray()));
|
||||
}
|
||||
|
||||
@Test
|
||||
void getNetworkTableTest() {
|
||||
NetworkTable networkTable = Preferences.getNetworkTable();
|
||||
|
||||
assertEquals(m_table, networkTable);
|
||||
}
|
||||
|
||||
@ParameterizedTest
|
||||
@MethodSource("defaultKeyProvider")
|
||||
void defaultKeysTest(String key) {
|
||||
|
||||
Reference in New Issue
Block a user