mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-02 10:00:34 +08:00
Refactored tests of node ID allocation server
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
* Copyright (C) 2015 Pavel Kirienko <pavel.kirienko@gmail.com>
|
||||
*/
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
#include <uavcan/protocol/dynamic_node_id_server/distributed/event.hpp>
|
||||
|
||||
|
||||
TEST(DynamicNodeIDServer, EventCodeToString)
|
||||
{
|
||||
using namespace uavcan::dynamic_node_id_server::distributed;
|
||||
using namespace uavcan::dynamic_node_id_server;
|
||||
|
||||
// Simply checking some error codes
|
||||
ASSERT_STREQ("Error", IEventTracer::getEventName(TraceError));
|
||||
ASSERT_STREQ("RaftActiveSwitch", IEventTracer::getEventName(TraceRaftActiveSwitch));
|
||||
ASSERT_STREQ("RaftAppendEntriesCallFailure", IEventTracer::getEventName(TraceRaftAppendEntriesCallFailure));
|
||||
ASSERT_STREQ("DiscoveryReceived", IEventTracer::getEventName(TraceDiscoveryReceived));
|
||||
}
|
||||
Reference in New Issue
Block a user