Re: [PATCH] Add tests for binaryheap.c

Aleksander Alekseev <aleksander@timescale.com>

From: Aleksander Alekseev <aleksander@timescale.com>
To: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Nathan Bossart <nathandbossart@gmail.com>
Date: 2025-06-27T11:02:22Z
Lists: pgsql-hackers

Attachments

Hi Nathan,

> Adding some tests here seems like a good idea.
>
> I'm not sure I see much point in testing both min-heaps and max-heaps.  The
> only difference between the two is in the comparator, so IMHO the extra
> tests really only serve to test the test comparator.

Make sense. Here is the corrected patch.

-- 
Best regards,
Aleksander Alekseev

Commits

  1. Add a test harness for the binary heap code.