summaryrefslogtreecommitdiff
path: root/lib/core/tests
diff options
context:
space:
mode:
authorClaudius "keldu" Holeksa <mail@keldu.de>2026-01-20 12:56:14 +0100
committerClaudius "keldu" Holeksa <mail@keldu.de>2026-01-20 12:56:14 +0100
commite8a72234dc585459d2a5dc95ff601e8a212e0b71 (patch)
tree633b921c76fec9b685ae0255e6c94ade71ffa4aa /lib/core/tests
parent5b11a9374a0f7e6fb667d63519c2714a934398b0 (diff)
downloadlibs-lbm-e8a72234dc585459d2a5dc95ff601e8a212e0b71.tar.gz
Added Chunk Size deduction for ghost layer
Diffstat (limited to 'lib/core/tests')
-rw-r--r--lib/core/tests/chunk.cpp37
1 files changed, 37 insertions, 0 deletions
diff --git a/lib/core/tests/chunk.cpp b/lib/core/tests/chunk.cpp
new file mode 100644
index 0000000..5110597
--- /dev/null
+++ b/lib/core/tests/chunk.cpp
@@ -0,0 +1,37 @@
+#include <forstio/test/suite.hpp>
+
+#include "../c++/chunk.hpp"
+
+namespace {
+namespace sch {
+using namespace saw::schema;
+}
+
+SAW_TEST("Chunk Ghost size 0"){
+ using namespace kel;
+
+ using TestChunk = lbm::sch::Chunk<sch::UInt32, 0u, 2u, 3u, 4u>;
+ using TestArray = sch::FixedArray<sch::UInt32, 2u, 3u, 4u>;
+
+ SAW_EXPECT((std::is_same_v<TestChunk::InnerSchema,TestArray>), "Types are not identical");
+}
+
+SAW_TEST("Chunk Ghost size 1"){
+ using namespace kel;
+
+ using TestChunk = lbm::sch::Chunk<sch::UInt32, 1u, 2u, 3u, 4u>;
+ using TestArray = sch::FixedArray<sch::UInt32, 4u, 5u, 6u>;
+
+ SAW_EXPECT((std::is_same_v<TestChunk::InnerSchema,TestArray>), "Types are not identical");
+}
+
+SAW_TEST("Chunk Ghost size 3"){
+ using namespace kel;
+
+ using TestChunk = lbm::sch::Chunk<sch::UInt32, 3u, 2u, 3u, 4u,10u,6u>;
+ using TestArray = sch::FixedArray<sch::UInt32, 8u, 9u, 10u,16u,12u>;
+
+ SAW_EXPECT((std::is_same_v<TestChunk::InnerSchema,TestArray>), "Types are not identical");
+}
+
+}