diff options
| author | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-01-20 14:50:23 +0100 |
|---|---|---|
| committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-01-20 14:50:23 +0100 |
| commit | 952940c3487856447bb80c819b61483b8028d027 (patch) | |
| tree | 6e9c641af6d8f785a3c7c8faf60e351325561ed8 /lib/core/tests/chunk.cpp | |
| parent | e8a72234dc585459d2a5dc95ff601e8a212e0b71 (diff) | |
| download | libs-lbm-952940c3487856447bb80c819b61483b8028d027.tar.gz | |
Chunk setup test
Diffstat (limited to 'lib/core/tests/chunk.cpp')
| -rw-r--r-- | lib/core/tests/chunk.cpp | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/lib/core/tests/chunk.cpp b/lib/core/tests/chunk.cpp index 5110597..a9d1748 100644 --- a/lib/core/tests/chunk.cpp +++ b/lib/core/tests/chunk.cpp @@ -19,8 +19,8 @@ SAW_TEST("Chunk Ghost size 0"){ 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>; + 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"); } @@ -28,10 +28,20 @@ SAW_TEST("Chunk Ghost size 1"){ 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>; + 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"); } +SAW_TEST("Chunk setup"){ + using namespace kel; + + using TestChunk = lbm::sch::Chunk<sch::Float32, 1u, 2u, 2u>; + + auto chunk = saw::heap<saw::data<TestChunk>>(); + chunk->at({{0u,0u}}).set(1.0f); + SAW_EXPECT((chunk->ghost_at({{1u,1u}}).get() == 1.0f),"Check if ghost is at shifted spot."); +} + } |
