From 3ad1f9e4147cf64627793d4003b50039d86ce995 Mon Sep 17 00:00:00 2001 From: Claudius 'keldu' Holeksa Date: Thu, 25 Jul 2024 14:56:53 +0200 Subject: wip --- modules/codec/tests/forst.cpp | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) (limited to 'modules/codec/tests/forst.cpp') diff --git a/modules/codec/tests/forst.cpp b/modules/codec/tests/forst.cpp index 28501c9..8e9ac49 100644 --- a/modules/codec/tests/forst.cpp +++ b/modules/codec/tests/forst.cpp @@ -5,7 +5,7 @@ #include namespace { -namespace schema { +namespace sch { using namespace saw::schema; using TestStruct = Struct< @@ -18,7 +18,7 @@ using TestArray = Array< TestStruct >; -SAW_TEST("Codec Forst Info"){ +SAW_TEST("Codec Forst Layer Info"){ using namespace saw; { @@ -38,5 +38,34 @@ SAW_TEST("Codec Forst Info"){ SAW_EXPECT(depth == 2, "Layer info is wrong"); } } + +SAW_TEST("Codec Forst Static Size Info"){ + using namespace saw; + + { + uint64_t depth = impl::forst_codec_info::static_size; + SAW_EXPECT(depth == 8u, "Static size is wrong"); + } + { + uint64_t size = impl::forst_codec_info::static_size; + SAW_EXPECT(size == 1u, "Static size is wrong"); + } + { + uint64_t size = impl::forst_codec_info::static_size; + SAW_EXPECT(size == 2u, "Static size is wrong"); + } + { + uint64_t size = impl::forst_codec_info::static_size; + SAW_EXPECT(size == 4u, "Static size is wrong"); + } + { + uint64_t size = impl::forst_codec_info::static_size; + SAW_EXPECT(size == 8u, "Static size is wrong"); + } + { + uint64_t size = impl::forst_codec_info::static_size; + SAW_EXPECT(size == 17u, std::string{"Static size is wrong: "} + std::to_string(size)); + } +} } } -- cgit v1.2.3