mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-28 02:11:43 +00:00
[wpiutil,hal] Move C++ Handle wrapper to wpiutil (#8935)
Also move WPI_Handle typedef to its own header (util/Handle.h).
This commit is contained in:
@@ -51,10 +51,10 @@ void ConnectionListenerTest::Connect(const char* address, unsigned int port4) {
|
||||
TEST_F(ConnectionListenerTest, Polled) {
|
||||
// set up the poller
|
||||
NT_ListenerPoller poller = wpi::nt::CreateListenerPoller(server_inst);
|
||||
ASSERT_NE(poller, 0u);
|
||||
ASSERT_NE(poller, 0);
|
||||
NT_Listener handle = wpi::nt::AddPolledListener(
|
||||
poller, server_inst, wpi::nt::EventFlags::CONNECTION);
|
||||
ASSERT_NE(handle, 0u);
|
||||
ASSERT_NE(handle, 0);
|
||||
|
||||
// trigger a connect event
|
||||
Connect("127.0.0.1", 10020);
|
||||
|
||||
@@ -73,11 +73,11 @@ TEST_F(LocalStorageTest, GetTopic2) {
|
||||
}
|
||||
|
||||
TEST_F(LocalStorageTest, GetTopicEmptyName) {
|
||||
EXPECT_EQ(storage.GetTopic(""), 0u);
|
||||
EXPECT_EQ(storage.GetTopic(""), 0);
|
||||
}
|
||||
|
||||
TEST_F(LocalStorageTest, GetEntryEmptyName) {
|
||||
EXPECT_EQ(storage.GetEntry(""), 0u);
|
||||
EXPECT_EQ(storage.GetEntry(""), 0);
|
||||
}
|
||||
|
||||
TEST_F(LocalStorageTest, GetEntryCached) {
|
||||
@@ -538,11 +538,11 @@ TEST_F(LocalStorageTest, PublishUntyped) {
|
||||
std::string_view{"cannot publish 'foo' with an unassigned "
|
||||
"type or empty type string"}));
|
||||
|
||||
EXPECT_EQ(storage.Publish(fooTopic, NT_UNASSIGNED, "", {}, {}), 0u);
|
||||
EXPECT_EQ(storage.Publish(fooTopic, NT_UNASSIGNED, "", {}, {}), 0);
|
||||
}
|
||||
|
||||
TEST_F(LocalStorageTest, SetValueInvalidHandle) {
|
||||
EXPECT_FALSE(storage.SetEntryValue(0u, {}));
|
||||
EXPECT_FALSE(storage.SetEntryValue(0, {}));
|
||||
}
|
||||
|
||||
class LocalStorageDuplicatesTest : public LocalStorageTest {
|
||||
|
||||
Reference in New Issue
Block a user