diff options
| author | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-07-06 01:37:34 +0200 |
|---|---|---|
| committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-07-06 01:37:34 +0200 |
| commit | af4b3f8f9bf7b19c169d9fbd0a2b49668af8ad10 (patch) | |
| tree | 3e98fff4bad333affa55e082de0da759bad57229 /lib/core/tests/iterator.cpp | |
| parent | 52326efc80dfeae6e830527df2e7803ecf61b00a (diff) | |
| parent | 015e941a91552ce6ea4cde4507ec9451c3708e77 (diff) | |
| download | libs-lbm-af4b3f8f9bf7b19c169d9fbd0a2b49668af8ad10.tar.gz | |
Merge branch 'dev'
Diffstat (limited to 'lib/core/tests/iterator.cpp')
| -rw-r--r-- | lib/core/tests/iterator.cpp | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/lib/core/tests/iterator.cpp b/lib/core/tests/iterator.cpp deleted file mode 100644 index 919c12c..0000000 --- a/lib/core/tests/iterator.cpp +++ /dev/null @@ -1,72 +0,0 @@ -#include <forstio/test/suite.hpp> - -#include "../c++/iterator.hpp" - -#include <iostream> - -namespace { -namespace sch { -using namespace kel::lbm::sch; -} - -SAW_TEST("Old Iterate"){ - using namespace kel; - - saw::data<sch::FixedArray<sch::UInt64,2u>> start{{0u,0u}}; - saw::data<sch::FixedArray<sch::UInt64,2u>> end{{3u,3u}}; - - lbm::iterate_over([](const saw::data<sch::FixedArray<sch::UInt64,2u>>& index){ - std::cout<<"Index: "<<index.at({0u}).get()<<" "<<index.at({1u}).get()<<std::endl; - }, start, end); -} - -SAW_TEST("CT Tuple Iterator"){ - using namespace kel; - - saw::data< - sch::Tuple< - sch::Float32, - sch::Int16, - sch::Float64, - sch::UInt32 - > - > tup; - - lbm::ct_tuple_iterator<std::decay_t<decltype(tup)>::Schema>::apply([](auto& val) -> saw::error_or<void> { - return saw::make_void(); - },tup); -} - -SAW_TEST("Old Iterate with Distance 1"){ - using namespace kel; - - saw::data<sch::FixedArray<sch::UInt64,2u>> start{{0u,0u}}; - saw::data<sch::FixedArray<sch::UInt64,2u>> end{{4u,4u}}; - - lbm::iterate_over([](const saw::data<sch::FixedArray<sch::UInt64,2u>>& index){ - std::cout<<"Index: "<<index.at({0u}).get()<<" "<<index.at({1u}).get()<<std::endl; - }, start, end, {{1u,1u}}); -} - -SAW_TEST("Iterate - 2D"){ - using namespace kel; - - saw::data<sch::FixedArray<sch::UInt64,2u>> start{{0u,0u}}; - saw::data<sch::FixedArray<sch::UInt64,2u>> end{{3u,3u}}; - - lbm::iterator<2u>::apply([](const saw::data<sch::FixedArray<sch::UInt64,2u>>& index){ - std::cout<<"Index: "<<index.at({0u}).get()<<" "<<index.at({1u}).get()<<std::endl; - }, start, end); -} - -SAW_TEST("Iterate with Distance 1 - 2D"){ - using namespace kel; - - saw::data<sch::FixedArray<sch::UInt64,2u>> start{{0u,0u}}; - saw::data<sch::FixedArray<sch::UInt64,2u>> end{{4u,4u}}; - - lbm::iterator<2u>::apply([](const saw::data<sch::FixedArray<sch::UInt64,2u>>& index){ - std::cout<<"Index: "<<index.at({0u}).get()<<" "<<index.at({1u}).get()<<std::endl; - }, start, end, {{1u,1u}}); -} -} |
