Skip to content

Commit

Permalink
add additional checking to detect the previously neglected bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
seunghwak committed Sep 19, 2023
1 parent 8781612 commit f92b5f5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions cpp/tests/sampling/sampling_post_processing_test.cu
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,12 @@ class Tests_SamplingPostProcessing
(*renumbered_and_sorted_edgelist_label_hop_offsets).end()))
<< "Renumbered and sorted edge list (label,hop) offset array values should be "
"non-decreasing.";

ASSERT_TRUE(
(*renumbered_and_sorted_edgelist_label_hop_offsets).back_element(handle.get_stream()) ==
renumbered_and_sorted_edgelist_srcs.size())
<< "Renumbered and sorted edge list (label,hop) offset array's last element should "
"coincide with the number of edges.";
}

if (renumbered_and_sorted_renumber_map_label_offsets) {
Expand Down Expand Up @@ -1189,6 +1195,11 @@ class Tests_SamplingPostProcessing
(*sorted_edgelist_label_hop_offsets).end()))
<< "Sorted edge list (label,hop) offset array values should be "
"non-decreasing.";

ASSERT_TRUE((*sorted_edgelist_label_hop_offsets).back_element(handle.get_stream()) ==
sorted_edgelist_srcs.size())
<< "Sorted edge list (label,hop) offset array's last element should coincide with the "
"number of edges.";
}

for (size_t i = 0; i < sampling_post_processing_usecase.num_labels; ++i) {
Expand Down

0 comments on commit f92b5f5

Please sign in to comment.