-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathstinger_dynograph_test.cc
More file actions
34 lines (27 loc) · 1000 Bytes
/
stinger_dynograph_test.cc
File metadata and controls
34 lines (27 loc) · 1000 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include "stinger_server.h"
#include <dynograph_util/dynograph_impl_test.h>
#include <dynograph_util/edgelist_dataset.h>
INSTANTIATE_TYPED_TEST_CASE_P(STINGER_DYNOGRAPH, ImplTest, StingerServer);
INSTANTIATE_TYPED_TEST_CASE_P(STINGER_DYNOGRAPH, CompareWithReferenceTest, StingerServer);
TEST(STINGER_DYNOGRAPH, SetInitialEdgesTest)
{
DynoGraph::Args args = {1, "dynograph_util/data/worldcup-10K.graph.bin", 10, {}, Args::SORT_MODE::SNAPSHOT, 1.0, 1};
DynoGraph::EdgeListDataset dataset(args);
auto batch = dataset.getBatch(0);
int64_t nv = dataset.getMaxVertexId() + 1;
StingerGraph graph(nv);
graph.insert_using_set_initial_edges(*batch);
reference_impl golden(args, nv);
golden.insert_batch(*batch);
ASSERT_EQ(
golden.get_num_edges(),
stinger_edges_up_to(graph.S, nv)
);
for (int64_t v = 0; v < nv; ++v)
{
ASSERT_EQ(
golden.get_out_degree(v),
stinger_outdegree_get(graph.S, v)
);
}
}