Skip to content

Commit

Permalink
few clang fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
iontodirel committed Oct 6, 2024
1 parent b571ad1 commit 56d73d3
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 9 deletions.
1 change: 1 addition & 0 deletions aprsroute.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ struct packet
{
packet() = default;
packet(const packet& other) = default;
packet& operator=(const packet& other) = default;
packet(const std::string& from, const std::string& to, const std::vector<std::string>& path, const std::string& data);
packet(const char* packet_string);
packet(const std::string packet_string);
Expand Down
18 changes: 18 additions & 0 deletions tests/CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,24 @@
}
}
},
{
"name": "linux-clang-debug",
"displayName": "Linux Clang Debug",
"inherits": "linux-debug",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"CMAKE_C_COMPILER": "clang",
"CMAKE_CXX_COMPILER": "clang++"
}
},
{
"name": "linux-clang-release",
"displayName": "Linux Clang Release",
"inherits": "linux-clang-debug",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
}
},
{
"name": "macos-debug",
"displayName": "macOS Debug",
Expand Down
18 changes: 9 additions & 9 deletions tests/tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1141,7 +1141,7 @@ TEST(router, try_route_packet_enable_diagnostics)
// ~
// 12 13 - Packet address marked as 'set'

digi.address = { "A" };
digi.address = "A";
digi.path = {};
digi.options = routing_option::none;
p = { "N0CALL", "APRS", { "A", "B", "C", "D", "E", "F", "G" }, "data"};
Expand Down Expand Up @@ -1170,7 +1170,7 @@ TEST(router, try_route_packet_enable_diagnostics)
// ~~~~~
// 12 17 - Packet address marked as 'set'

digi.address = { "ABCDE" };
digi.address = "ABCDE";
digi.path = {};
digi.options = routing_option::preempt_front;
p = { "N0CALL", "APRS", { "AB", "ABC", "ABCD", "ABCDE" }, "data"};
Expand Down Expand Up @@ -1217,7 +1217,7 @@ TEST(router, try_route_packet_enable_diagnostics)
// ~~~~~
// 17 22 - Packet address marked as 'set'

digi.address = { "DIGI" };
digi.address = "DIGI";
digi.path = { "CALLB" };
digi.options = routing_option::preempt_front; // todo + substitute_explicit_address
p = { "N0CALL", "APRS", { "CALLA", "CALLB" }, "data"};
Expand Down Expand Up @@ -1271,7 +1271,7 @@ TEST(router, try_route_packet_enable_diagnostics)
// ~~~~~
// 12 17 - Packet address marked as 'set'

digi.address = { "CITYD" };
digi.address = "CITYD";
digi.path = {};
digi.options = routing_option::preempt_drop;
p = { "N0CALL", "APRS", { "CITYA*", "CITYB", "CITYC", "CITYD", "CITYE" }, "data"};
Expand Down Expand Up @@ -1325,7 +1325,7 @@ TEST(router, try_route_packet_enable_diagnostics)
// ~~~~
// 24 28 - Packet address marked as 'set'

digi.address = { "DIGI" };
digi.address = "DIGI";
digi.path = { "WIDE2-2" };
digi.options = routing_option::trap_excessive_hops;
p = { "N0CALL", "APRS", { "CALLA*", "CALLB*", "WIDE2-3" }, "data"};
Expand Down Expand Up @@ -1375,7 +1375,7 @@ TEST(router, try_route_packet_enable_diagnostics)
// ~~~~
// 12 16 - Packet address marked as 'set'

digi.address = { "DIGI" };
digi.address = "DIGI";
digi.path = { "WIDE1", "WIDE2" };
digi.options = routing_option::none;
p = { "N0CALL", "APRS", { "WIDE1-2" }, "data"};
Expand Down Expand Up @@ -1422,7 +1422,7 @@ TEST(router, try_route_packet_enable_diagnostics)
// ~~~~
// 23 27 - Packet address marked as 'set'

digi.address = { "DIGI" };
digi.address = "DIGI";
digi.path = { "WIDE2", "WIDE1" };
digi.options = routing_option::none;
p = { "N0CALL", "APRS", { "CALL", "WIDE1*", "WIDE2-2" }, "data"};
Expand Down Expand Up @@ -1476,7 +1476,7 @@ TEST(router, try_route_packet_enable_diagnostics)
// ~~~~
// 48 52 - Packet address marked as 'set'

digi.address = { "DIGI" };
digi.address = "DIGI";
digi.path = { "WIDE3" };
digi.options = routing_option::none;
p = { "N0CALL", "APRS", { "CALL1", "CALL2", "CALL3", "CALL4", "CALL5", "CALL6*", "WIDE3-3" }, "data"};
Expand Down Expand Up @@ -1530,7 +1530,7 @@ TEST(router, try_route_packet_enable_diagnostics)
// ~
// 12 12 - Packet address removed

digi.address = { "DIGI" };
digi.address = "DIGI";
digi.path = { "WIDE1" };
digi.options = routing_option::substitute_complete_hops;
p = { "N0CALL", "APRS", { "", "WIDE1-1" }, "data"};
Expand Down

0 comments on commit 56d73d3

Please sign in to comment.