mirror of
https://github.com/vicliu624/trail-mate.git
synced 2026-10-08 11:37:18 +00:00
Development checkpoint: indexed recovery, publication, GPX installation and checkpoint maintenance; public Pages client and directory/bridge services; editable TCP defaults and shared storage retry fixes. Host regression, ASAN and L2 compilation passed. Physical device acceptance and permanent service hosting remain incomplete.
28 lines
1012 B
C++
28 lines
1012 B
C++
#include "ui/screens/settings/settings_spec.h"
|
|
#include <cassert>
|
|
|
|
int main()
|
|
{
|
|
using namespace settings::ui;
|
|
const SettingId fields[] = {SettingId::RtTcpSlot, SettingId::RtTcpDefaults,
|
|
SettingId::RtWifiHost, SettingId::RtWifiPort};
|
|
for (auto protocol : {chat::MeshProtocol::Meshtastic, chat::MeshProtocol::MeshCore,
|
|
chat::MeshProtocol::Reticulum})
|
|
{
|
|
for (bool bearer_ip : {false, true})
|
|
{
|
|
spec::VisibilityContext context{};
|
|
context.protocol = protocol;
|
|
context.reticulum_wifi_visible = bearer_ip;
|
|
context.wifi_supported = true;
|
|
for (auto field : fields)
|
|
{
|
|
assert(spec::should_show(field, context));
|
|
assert(spec::id_for_key(spec::key_for_id(field)) == field);
|
|
}
|
|
context.wifi_supported = false;
|
|
for (auto field : fields) assert(!spec::should_show(field, context));
|
|
}
|
|
}
|
|
}
|