MCPcopy Create free account
hub / github.com/dengwirda/jigsaw / test_heap

Method test_heap

src/libcpp/containers/priorityset.hpp:425–449  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

423 */
424
425 __normal_call bool_type test_heap (
426 )
427 {
428# ifdef _DEBUG
429 /*------------------ test relationships for all nodes */
430 size_type _ipos = +1 ;
431 size_type _iend =
432 this->_heap.count () ;
433 for ( ; _ipos < _iend; ++_ipos)
434 {
435 /*------------------ heap is invalid if lower < upper */
436 size_type _ppos =
437 (_ipos - 1)/_nfan ;
438
439 if (this->_pred(
440 this->_heap[_ipos],
441 this->_heap[_ppos]
442 ) )
443 return false ;
444 }
445# endif
446
447 /*------------------ must be valid if we got this far */
448 return true ;
449 }
450
451 } ;
452

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected