Re: [PATCH] Add tests for binaryheap.c

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Aleksander Alekseev <aleksander(at)timescale(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH] Add tests for binaryheap.c
Date: 2025-06-26 20:46:50
Message-ID: aF2xurczhN0rS07L@nathan
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jun 26, 2025 at 06:16:10PM +0300, Aleksander Alekseev wrote:
> The proposed patch adds tests for binaryheap.c. This is similar to our
> tests for RB-trees in test_rbtree.c.

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.

--
nathan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2025-06-26 20:49:08 Re: Adding support for SSLKEYLOGFILE in the frontend
Previous Message Jianghua Yang 2025-06-26 20:46:10 Re: [PATCH] Use DatumGetUInt32() for dsm_attach() in test_shm_mq_main()