diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2018-11-04 13:27:10 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2018-11-04 13:29:17 +0300 |
commit | d3c815bd0831f46c18bb4bddc9f290b5f47e2c45 (patch) | |
tree | 6dc0fddd52da62faeaec8c9422997974e3437cf8 /tests/gtests | |
parent | 0d69a5aa3491501c4a556aec3978128c041d328e (diff) |
BLI_heap: add an API function to directly read the top node value.
It is very commonly needed in loop conditions to check if
the items in the heap are good enough to continue.
Diffstat (limited to 'tests/gtests')
-rw-r--r-- | tests/gtests/blenlib/BLI_heap_test.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/gtests/blenlib/BLI_heap_test.cc b/tests/gtests/blenlib/BLI_heap_test.cc index 69566d8dca6..26f3aa19b9f 100644 --- a/tests/gtests/blenlib/BLI_heap_test.cc +++ b/tests/gtests/blenlib/BLI_heap_test.cc @@ -176,6 +176,7 @@ static void random_heap_reinsert_helper( for (int out_test = 0; out_test < items_total; out_test++) { HeapNode *node_top = BLI_heap_top(heap); float out = BLI_heap_node_value(node_top); + EXPECT_EQ(out, BLI_heap_top_value(heap)); EXPECT_EQ((float)out_test, out); BLI_heap_pop_min(heap); } |