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