Add copying utility methods to Arena

This commit is contained in:
2025-09-14 20:38:54 -04:00
parent 147edf5c93
commit f62770c4ab
9 changed files with 109 additions and 87 deletions

View File

@@ -585,32 +585,6 @@ TEST_CASE("thread counter cleanup bug") {
}
}
TEST_CASE("error conditions") {
SUBCASE("counter negative increment") {
auto counter_family = metric::create_counter("error_counter", "Error test");
auto counter = counter_family.create({});
// This should abort in debug builds due to validation
// In release builds, behavior is undefined
// counter.inc(-1.0); // Would abort
}
SUBCASE("invalid metric names") {
// These should abort due to validation
// auto bad_counter = metric::create_counter("123invalid", "help"); // Would
// abort auto bad_gauge = metric::create_gauge("invalid-name", "help"); //
// Would abort
}
SUBCASE("invalid label keys") {
auto counter_family = metric::create_counter("valid_name", "help");
// This should abort due to label validation
// auto counter = counter_family.create({{"123invalid", "value"}}); // Would
// abort
}
}
TEST_CASE("memory management") {
SUBCASE("arena allocation in render") {
Arena arena;