summaryrefslogtreecommitdiff
path: root/lib/core/tests/chunk.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/core/tests/chunk.cpp')
-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");
+}
+
+}