1#include "Dataflow/Core/Sources/SingleDataSourceNode.hpp"
2#include <Dataflow/RaDataflow.hpp>
3#include <catch2/catch_test_macros.hpp>
5#include <Dataflow/Core/PortFactory.hpp>
7using namespace Ra::Dataflow::Core;
9TEST_CASE(
"Dataflow/Core/PortFactory",
"[unittests][Dataflow][PortFactory]" ) {
12 REQUIRE( PortFactory::getInstance() !=
nullptr );
13 auto factory = PortFactory::getInstance();
15 SECTION(
"After init default port types are available" ) {
32 SECTION(
"Other types aren't available" ) {
41 SECTION(
"Can add port with default types" ) {
42 REQUIRE(
factory->make_input_port( &node,
"port",
typeid( Scalar ) ) );
43 REQUIRE(
factory->make_output_port( &node,
"port",
typeid( Scalar ) ) );
45 SECTION(
"Can't add port with other types" ) {
51 SECTION(
"Add new port type and can add port with other types" ) {
52 add_port_type<std::string>();
53 add_port_type<std::vector<int>>();
Base class for nodes that will give access to some input data to the graph. This class can be used to...
This namespace contains everything "low level", related to data, datastuctures, and computation.
auto factory(const NodeFactorySet::key_type &name) -> NodeFactorySet::mapped_type
Gets the given factory from the manager.