30 TEST_CASE(
"QueuedPacket's can be constructed.",
"[QueuedPacket]")
32 auto packet = std::make_shared<packet_v2::Packet>(to_vector(PingV2()));
34 REQUIRE_THROWS_AS(
QueuedPacket(
nullptr, 3, 10), std::invalid_argument);
36 QueuedPacket(
nullptr, 3, 10),
"Given packet pointer is null.");
40 TEST_CASE(
"QueuedPacket' are comparable.",
"[QueuedPacket]")
42 auto packet = std::make_shared<packet_v2::Packet>(to_vector(PingV2()));
75 std::numeric_limits<unsigned long long>::max() / 2 + 1));
80 std::numeric_limits<unsigned long long>::max() / 2));
101 std::numeric_limits<unsigned long long>::max() / 2 + 1) >
106 std::numeric_limits<unsigned long long>::max() / 2) >
131 std::numeric_limits<unsigned long long>::max() / 2 + 1));
136 std::numeric_limits<unsigned long long>::max() / 2));
156 std::numeric_limits<unsigned long long>::max() / 2 + 1) >=
161 std::numeric_limits<unsigned long long>::max() / 2) >=
167 TEST_CASE(
"QueuedPacket's are copyable.",
"[QueuedPacket]")
169 auto packet = std::make_shared<packet_v2::Packet>(to_vector(PingV2()));
176 TEST_CASE(
"QueuedPacket's are movable.",
"[QueuedPacket]")
178 auto packet = std::make_shared<packet_v2::Packet>(to_vector(PingV2()));
180 auto moved(std::move(original));
185 TEST_CASE(
"QueuedPacket's are assignable.",
"[QueuedPacket]")
187 auto packet = std::make_shared<packet_v2::Packet>(to_vector(PingV2()));
196 TEST_CASE(
"QueuedPacket's are assignable (by move semantics).",
199 auto packet = std::make_shared<packet_v2::Packet>(to_vector(PingV2()));
208 TEST_CASE(
"QueuedPacket's 'packet' method returns the contained MAVLink packet",
211 auto packet = std::make_shared<packet_v2::Packet>(to_vector(PingV2()));
212 REQUIRE(*
QueuedPacket(packet, 3, 10).packet() == *packet);
216 TEST_CASE(
"QueuedPacket's are printable.",
"[QueuedPacket]")
218 auto packet = std::make_shared<packet_v2::Packet>(to_vector(PingV2()));
221 "PING (#4) from 192.168 to 127.1 (v2.0) with priority -10");
224 "PING (#4) from 192.168 to 127.1 (v2.0) with priority 0");
227 "PING (#4) from 192.168 to 127.1 (v2.0) with priority 3");
230 "PING (#4) from 192.168 to 127.1 (v2.0) with priority 10");
std::string str(const T &object)
TEST_CASE("QueuedPacket's can be constructed.", "[QueuedPacket]")