From c0549d71b2109f10c1238db8b22362e7826ba61b Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Sun, 5 Jul 2026 15:59:23 +0200 Subject: Just rename from lib to modules --- modules/core/tests/chunk.cpp | 47 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 modules/core/tests/chunk.cpp (limited to 'modules/core/tests/chunk.cpp') diff --git a/modules/core/tests/chunk.cpp b/modules/core/tests/chunk.cpp new file mode 100644 index 0000000..008d4c6 --- /dev/null +++ b/modules/core/tests/chunk.cpp @@ -0,0 +1,47 @@ +#include + +#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; + using TestArray = sch::FixedArray; + + SAW_EXPECT((std::is_same_v), "Types are not identical"); +} + +SAW_TEST("Chunk Ghost size 1"){ + using namespace kel; + + using TestChunk = lbm::sch::Chunk; + using TestArray = sch::FixedArray; + + SAW_EXPECT((std::is_same_v), "Types are not identical"); +} + +SAW_TEST("Chunk Ghost size 3"){ + using namespace kel; + + using TestChunk = lbm::sch::Chunk; + using TestArray = sch::FixedArray; + + SAW_EXPECT((std::is_same_v), "Types are not identical"); +} + +SAW_TEST("Chunk 2D setup"){ + using namespace kel; + + using TestChunk = lbm::sch::Chunk; + + auto chunk = saw::heap>(); + chunk->at({{0u,0u}}).set(1.0f); + SAW_EXPECT((chunk->ghost_at({{1u,1u}}).get() == 1.0f),"Check if ghost is at shifted spot."); +} + +} -- cgit v1.2.3