#include #include using namespace alsk::edsl; struct Do { void operator()() { std::puts("Do"); } }; TEST_CASE("edsl::Loop") { auto aDo = makeOperand(); auto e0 = loop(aDo); using E0 = decltype(e0); using S0 = alsk::S; using L0 = alsk::L; auto e1 = seq(5*aDo); using E1 = decltype(e1); using S1 = alsk::S; using L1 = alsk::L; auto e2 = &(aDo*3); using E2 = decltype(e2); using S2 = alsk::S; using L2 = alsk::L; SECTION("Construction") { REQUIRE(std::is_same{}); REQUIRE(std::is_same{}); REQUIRE(std::is_same{}); REQUIRE(std::is_same{}); REQUIRE(std::is_same{}); REQUIRE(std::is_same{}); REQUIRE(std::is_same{}); REQUIRE(std::is_same{}); REQUIRE(std::is_same{}); } SECTION("Setup") { auto f0 = implement(e0); REQUIRE(f0.skeleton.n == 0); auto f1 = implement(e1); REQUIRE(f1.skeleton.n == 5); auto f2 = implement(e2); REQUIRE(f2.skeleton.n == 3); } }