From dcee24278ed28d21cd3addffeeb8e5f9f7248602 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Tue, 17 Feb 2026 18:29:22 +0100 Subject: End of day --- lib/core/tests/memory.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 lib/core/tests/memory.cpp (limited to 'lib/core/tests/memory.cpp') diff --git a/lib/core/tests/memory.cpp b/lib/core/tests/memory.cpp new file mode 100644 index 0000000..27cd938 --- /dev/null +++ b/lib/core/tests/memory.cpp @@ -0,0 +1,18 @@ +#include + +#include "../c++/memory.hpp" + +namespace { +namespace sch { +using namespace saw::schema; +} + +SAW_TEST("Memory Estimate"){ + using namespace kel::lbm; + + SAW_EXPECT((memory_estimate().get() == 4u), std::string{"Float32 isn't 4 bytes, but "} + std::to_string(memory_estimate().get()) ); + SAW_EXPECT((memory_estimate>().get() == 60u), "FixedArray isn't 60 bytes"); + SAW_EXPECT((memory_estimate, sch::UInt8>().get() == 61u), "FixedArray + UInt8 isn't 61 bytes"); +} + +} -- cgit v1.2.3