[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/ModuleWorks/taskflow/task_isolation/unittests/test_basics.cpp [Back]  [Original]

#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN

#include 
#include 
#include 
#include 

// --------------------------------------------------------
// Testcase: Type
// --------------------------------------------------------
TEST_CASE("Type" * doctest::timeout(300)) {

  tf::Taskflow taskflow, taskflow2;

  auto t1 = taskflow.emplace([](){});
  auto t2 = taskflow.emplace([](){ return 1; });
  auto t3 = taskflow.emplace([](tf::Subflow&){ });
  auto t4 = taskflow.composed_of(taskflow2);
  auto t5 = taskflow.emplace([](){ return tf::SmallVector{1, 2}; });
  auto t6 = taskflow.emplace([](tf::Runtime&){});

  REQUIRE(t1.type() == tf::TaskType::STATIC);
  REQUIRE(t2.type() == tf::TaskType::CONDITION);
  REQUIRE(t3.type() == tf::TaskType::SUBFLOW);
  REQUIRE(t4.type() == tf::TaskType::MODULE);
  REQUIRE(t5.type() == tf::TaskType::CONDITION);
  REQUIRE(t6.type() == tf::TaskType::RUNTIME);
}

// --------------------------------------------------------
// Testcase: Builder
// --------------------------------------------------------
TEST_CASE("Builder" * doctest::timeout(300)) {

  SUBCASE("EmptyFlow") {
    for(unsigned W=1; W

Web Proxy Viewer  |  New URL  |  Original Page