git subrepo clone git@github.com:Rconybea/xo-alloc.git xo-alloc
subrepo: subdir: "xo-alloc" merged: "fc656313" upstream: origin: "git@github.com:Rconybea/xo-alloc.git" branch: "main" commit: "fc656313" git-subrepo: version: "0.4.9" origin: "???" commit: "???"
This commit is contained in:
parent
d16545d815
commit
2c8faf6e43
49 changed files with 7196 additions and 0 deletions
39
xo-alloc/utest/generation.test.cpp
Normal file
39
xo-alloc/utest/generation.test.cpp
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
/* generation.test.cpp
|
||||
*
|
||||
* author: Roland Conybeare, Aug 2025
|
||||
*/
|
||||
|
||||
#include "xo/alloc/generation.hpp"
|
||||
#include <sstream>
|
||||
#include <catch2/catch.hpp>
|
||||
#include <cstring>
|
||||
|
||||
namespace xo {
|
||||
namespace gc {
|
||||
TEST_CASE("generation", "[gc]") {
|
||||
REQUIRE(::strcmp(gen2str(generation::nursery), "nursery") == 0);
|
||||
REQUIRE(::strcmp(gen2str(generation::tenured), "tenured") == 0);
|
||||
REQUIRE(::strcmp(gen2str(generation::N), "?generation") == 0);
|
||||
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << generation::nursery;
|
||||
REQUIRE(ss.str() == "nursery");
|
||||
}
|
||||
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << generation::tenured;
|
||||
REQUIRE(ss.str() == "tenured");
|
||||
}
|
||||
|
||||
{
|
||||
std::stringstream ss;
|
||||
ss << generation::N;
|
||||
REQUIRE(ss.str() == "?generation");
|
||||
}
|
||||
}
|
||||
} /*namespace gc*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* generation.test.cpp */
|
||||
Loading…
Add table
Add a link
Reference in a new issue