大更新

This commit is contained in:
2026-08-08 19:16:58 +08:00
parent d289f8d6e2
commit ae5dc3eb46
178 changed files with 69427 additions and 525 deletions
+7 -7
View File
@@ -1,5 +1,5 @@
#include "config_store.hpp"
#include <cassert>
#include "adminive_test.hpp"
#include <filesystem>
#include <string>
int main() {
@@ -9,18 +9,18 @@ int main() {
std::filesystem::remove_all(test_directory);
{
Config_Store store(config_path);
assert(std::filesystem::exists(config_path));
assert(store.radio_service().snapshot().profile_name == "Primary Radio Profile");
ADMINIVE_CHECK(std::filesystem::exists(config_path));
ADMINIVE_CHECK(store.radio_service().snapshot().profile_name == "Primary Radio Profile");
auto updated = store.radio_service().snapshot();
updated.profile_name = "Persisted Profile";
store.persist_radio_service(updated);
assert(store.radio_service().snapshot().profile_name == "Persisted Profile");
assert(!std::filesystem::exists(config_path.string() + ".tmp"));
ADMINIVE_CHECK(store.radio_service().snapshot().profile_name == "Persisted Profile");
ADMINIVE_CHECK(!std::filesystem::exists(config_path.string() + ".tmp"));
}
{
Config_Store store(config_path);
assert(store.radio_service().snapshot().profile_name == "Persisted Profile");
assert(store.default_device_type() == Device_Table_Type::serial);
ADMINIVE_CHECK(store.radio_service().snapshot().profile_name == "Persisted Profile");
ADMINIVE_CHECK(store.default_device_type() == Device_Table_Type::serial);
}
std::filesystem::remove_all(test_directory);
return 0;