MCPcopy Create free account
hub / github.com/RaftLib/RaftLib / main

Function main

testsuite/staticContJoinRetStruct.cpp:59–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

57
58
59int
60main()
61{
62 using namespace raft;
63 using type_t = std::uint32_t;
64 using gen = random_variate< std::default_random_engine,
65 std::uniform_int_distribution,
66 type_t >;
67 using p_out = raft::print< type_t, '\n' >;
68
69 std::vector< type_t > output;
70
71 const static auto min( 0 );
72 const static auto max( 100 );
73 gen g( 100, min, max );
74
75 p_out print;
76
77 sub< type_t > s;
78 sub< type_t > s2;
79 raft::join< type_t > jo( STATICPORT );
80
81 raft::map m;
82 auto kernels( m += ( g >> s >> s2 ) >= jo >> print );
83 if( kernels.getSrcSize() != STATICPORT )
84 {
85 std::cerr << "Return kernel_pair_t source should be of size " << STATICPORT << " for this test, it was: " << kernels.getSrcSize() << "\n";
86 return( EXIT_FAILURE );
87 }
88 if( kernels.getDstSize() != 1 )
89 {
90 std::cerr << "Return kernel_pair_t destination should be of size 1 for this test\n";
91 return( EXIT_FAILURE );
92 }
93 m.exe();
94
95 return( EXIT_SUCCESS );
96}

Callers

nothing calls this directly

Calls 2

getSrcSizeMethod · 0.80
getDstSizeMethod · 0.80

Tested by

no test coverage detected