xo-alloc xo-object; + utests
This commit is contained in:
parent
fc9180363d
commit
ff5b0cfb8a
1 changed files with 29 additions and 0 deletions
29
utest/IAlloc.test.cpp
Normal file
29
utest/IAlloc.test.cpp
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
/* @file IAlloc.test.cpp
|
||||
*
|
||||
* author: Roland Conybeare, Aug 2025
|
||||
*/
|
||||
|
||||
#include "xo/alloc/IAlloc.hpp"
|
||||
#include <catch2/catch.hpp>
|
||||
|
||||
namespace xo {
|
||||
using xo::gc::IAlloc;
|
||||
|
||||
namespace ut {
|
||||
TEST_CASE("ialloc", "[alloc]")
|
||||
{
|
||||
REQUIRE(IAlloc::alloc_padding(0) == 0);
|
||||
REQUIRE(IAlloc::alloc_padding(1) == 7);
|
||||
REQUIRE(IAlloc::alloc_padding(2) == 6);
|
||||
REQUIRE(IAlloc::alloc_padding(3) == 5);
|
||||
REQUIRE(IAlloc::alloc_padding(4) == 4);
|
||||
REQUIRE(IAlloc::alloc_padding(5) == 3);
|
||||
REQUIRE(IAlloc::alloc_padding(6) == 2);
|
||||
REQUIRE(IAlloc::alloc_padding(7) == 1);
|
||||
REQUIRE(IAlloc::alloc_padding(8) == 0);
|
||||
REQUIRE(IAlloc::alloc_padding(9) == 7);
|
||||
}
|
||||
} /*namespace ut*/
|
||||
} /*namespace xo*/
|
||||
|
||||
/* end IAlloc.test.cpp */
|
||||
Loading…
Add table
Add a link
Reference in a new issue