Files
aevolution/tests/network_test.hpp
T
dingoandClaude Opus 5.5 90cdb61e30
Foundation / checks (deploy) (push) Successful in 6s
Foundation / checks (ecs) (push) Successful in 1m59s
Foundation / checks (client) (push) Successful in 12m44s
Foundation / checks (network) (push) Successful in 12m45s
Foundation / checks (tsan) (push) Successful in 8m5s
Foundation / checks (checks) (push) Successful in 32m4s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (postgres) (push) Canceled after 21m38s
Add M10.7a tick clock and remote-marker interpolation
ADR-0095 (presentation only): a drift-corrected monotonic tick clock that
never runs more than one tick past the newest observation; remote probe
markers shown 2-6 ticks behind (adaptive to snapshot gaps), interpolated,
extrapolated for at most 2 ticks and then marked stale; appearance and
removal at their snapshot ticks; organisms never extrapolated; sub-tick
own-marker prediction.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-06 17:16:20 -04:00

35 lines
1.1 KiB
C++

#pragma once
#include <expected>
#include <optional>
#include <source_location>
#include <stdexcept>
#include <string>
namespace evo::network_test {
inline void check(bool ok, std::source_location at = std::source_location::current()) {
if (!ok)
throw std::runtime_error(std::string{"network "} + at.file_name() + ":" +
std::to_string(at.line()));
}
// The value of an optional that the test requires to be present.
template <typename T>
const T& must(const std::optional<T>& o,
std::source_location at = std::source_location::current()) {
if (!o)
throw std::runtime_error(std::string{"network missing value "} + at.file_name() + ":" +
std::to_string(at.line()));
return *o;
}
template <typename T, typename E> bool refused(const std::expected<T, E>& r, E e) {
return !r && r.error() == e;
}
void protocol_tests();
void tls_tests();
void session_tests();
void control_tests();
void replication_tests();
void motion_tests();
void interpolation_tests();
} // namespace evo::network_test
#define CHECK(...) ::evo::network_test::check(static_cast<bool>(__VA_ARGS__))