binary heap macro and a simple test case