-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #595 from elbeno/flow-graph-cycle
🚸 Improve error message for cyclic flows
- Loading branch information
Showing
4 changed files
with
29 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#include <cib/cib.hpp> | ||
#include <flow/flow.hpp> | ||
|
||
// EXPECT: Topological sort failed: cycle in flow | ||
|
||
namespace { | ||
using namespace flow::literals; | ||
|
||
constexpr auto a = flow::milestone<"a">(); | ||
constexpr auto b = flow::milestone<"b">(); | ||
|
||
struct TestFlowAlpha : public flow::service<> {}; | ||
|
||
struct CyclicFlowConfig { | ||
constexpr static auto config = cib::config( | ||
cib::exports<TestFlowAlpha>, cib::extend<TestFlowAlpha>(a >> b >> a)); | ||
}; | ||
} // namespace | ||
|
||
auto main() -> int { | ||
cib::nexus<CyclicFlowConfig> nexus{}; | ||
nexus.service<TestFlowAlpha>(); | ||
} |