Re: [HACKERS] Thoughts on unit testing? - Mailing list pgsql-hackers

From Thomas Munro
Subject Re: [HACKERS] Thoughts on unit testing?
Date
Msg-id CAEepm=0tAVcSRth8sCcVNf8pwgYaGop1qLPSGDgP4XTZEKzASQ@mail.gmail.com
Whole thread Raw
In response to Re: [HACKERS] Thoughts on unit testing?  (Thomas Munro <thomas.munro@enterprisedb.com>)
List pgsql-hackers
On Fri, Aug 11, 2017 at 11:13 AM, Thomas Munro
<thomas.munro@enterprisedb.com> wrote:
> Just create a .test.c file and type "TEST(my_math,
> factorial) { EXPECT_EQ(6, factorial(3)); }" ...

Of course that would really need to #include "something/test_macros.h"
and "something/factorial.h", and EXPECT_EQ probably doesn't make much
sense in C, but you get the point: very low barrier to use it.

-- 
Thomas Munro
http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: AP
Date:
Subject: Re: [HACKERS] pgsql 10: hash indexes testing
Next
From: Noah Misch
Date:
Subject: Re: [HACKERS] [BUGS] Replication to Postgres 10 on Windows is broken