| 53 | } |
| 54 | |
| 55 | void TestOneNameSpace() { |
| 56 | graph_ = InMemoryGraph::Create(config_); |
| 57 | EXPECT_TRUE(graph_ != nullptr); |
| 58 | |
| 59 | // topology |
| 60 | EXPECT_EQ(graph_->uniq_nodes_list()[0].size(), 13u); |
| 61 | EXPECT_EQ(graph_->total_freqs()[0], (int_t)52); |
| 62 | |
| 63 | // size |
| 64 | EXPECT_EQ(graph_->node_size(), 13u); |
| 65 | EXPECT_EQ(graph_->node_feature_size(), 12u); |
| 66 | EXPECT_EQ(graph_->neigh_feature_size(), 12u); |
| 67 | |
| 68 | // empty |
| 69 | EXPECT_TRUE(!graph_->node_empty()); |
| 70 | EXPECT_TRUE(!graph_->node_feature_empty()); |
| 71 | EXPECT_TRUE(!graph_->neigh_feature_empty()); |
| 72 | |
| 73 | // degree |
| 74 | for (auto node : graph_->node_keys()) { |
| 75 | EXPECT_EQ(graph_->GetInDegree(node), 3); |
| 76 | EXPECT_EQ(graph_->GetOutDegree(node), 3); |
| 77 | } |
| 78 | } |
| 79 | |
| 80 | void TestTwoNameSpace() { |
| 81 | config_.set_node_graph(USER_ITEM_CONTEXT); |
nothing calls this directly
no test coverage detected