MCPcopy Create free account
hub / github.com/baidu/babylon / SetUp

Method SetUp

test/anyflow/builtin/test_select.cpp:34–58  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32class SelectTest : public ::testing::Test {
33 public:
34 virtual void SetUp() override {
35 {
36 auto& vertex = builder.add_vertex([] {
37 return ::std::unique_ptr<ConstProcessor>(new ConstProcessor);
38 });
39 vertex.named_depend("a").to("CA");
40 vertex.named_emit("x").to("CB");
41 }
42 {
43 auto& vertex = builder.add_vertex([] {
44 return ::std::unique_ptr<MutableProcessor>(new MutableProcessor);
45 });
46 vertex.named_depend("a").to("MA");
47 vertex.named_emit("x").to("MB");
48 }
49 SelectProcessor::apply(builder, "CA", "C", "X", "Y");
50 SelectProcessor::apply(builder, "MA", "C", "X", "Y");
51 builder.finish();
52 graph = builder.build();
53 x = graph->find_data("X");
54 y = graph->find_data("Y");
55 c = graph->find_data("C");
56 cb = graph->find_data("CB");
57 mb = graph->find_data("MB");
58 }
59
60 GraphBuilder builder;
61 ::std::unique_ptr<Graph> graph;

Callers

nothing calls this directly

Calls 4

find_dataMethod · 0.80
named_emitMethod · 0.45
finishMethod · 0.45
buildMethod · 0.45

Tested by

no test coverage detected