diff options
| author | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-07-05 15:59:23 +0200 |
|---|---|---|
| committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-07-05 15:59:23 +0200 |
| commit | c0549d71b2109f10c1238db8b22362e7826ba61b (patch) | |
| tree | 16cd5264fcc3afe912e1b1b67738c8940d6d1177 /modules/core/tests/flatten.cpp | |
| parent | 9a3147bc79caf3c0fb1a9cdee29d156b5ff092c7 (diff) | |
| download | libs-lbm-c0549d71b2109f10c1238db8b22362e7826ba61b.tar.gz | |
Just rename from lib to modules
Diffstat (limited to 'modules/core/tests/flatten.cpp')
| -rw-r--r-- | modules/core/tests/flatten.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/modules/core/tests/flatten.cpp b/modules/core/tests/flatten.cpp new file mode 100644 index 0000000..84b3fa4 --- /dev/null +++ b/modules/core/tests/flatten.cpp @@ -0,0 +1,22 @@ +#include <forstio/test/suite.hpp> + +#include "../c++/flatten.hpp" + +namespace { +namespace sch { +using namespace saw::schema; +} + +SAW_TEST("Flatten Index Stride"){ + using namespace kel; + + constexpr saw::data<sch::UInt64> zero = lbm::flatten_index<sch::UInt64,3u>::stride<0u>({{2u,4u,3u}}); + constexpr saw::data<sch::UInt64> one = lbm::flatten_index<sch::UInt64,3u>::stride<1u>({{2u,4u,3u}}); + constexpr saw::data<sch::UInt64> two = lbm::flatten_index<sch::UInt64,3u>::stride<2u>({{2u,4u,3u}}); + + SAW_EXPECT(zero.get() == 1u, "Zero is correct"); + SAW_EXPECT(one.get() == 2u, "Zero is correct"); + SAW_EXPECT(two.get() == 8u, "Zero is correct"); +} + +} |
