Re: Unit testing - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Unit testing
Date
Msg-id 5176.1097505833@sss.pgh.pa.us
Whole thread Raw
In response to Re: Unit testing  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: Unit testing
List pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> 2. Won't dissolving away "static" cause naming conflicts?

Most likely (and I for one will for sure resist any attempt to force
global uniqueness on static names).  It seems that that whole issue
is easily avoided though ... just #include the source file under test
into the unit-test module for it, instead of compiling them separately.

> 3. Unit testing frameworks are best suited to component-based 
> architectures, ISTM. I'm not sure that one would fit Postgres very well. 

I have strong doubts about the usefulness of this too, but if Gavin and
Neil want to invest some time in trying it, I won't stand in their way.

One thing I don't particularly want is a bunch of invasive code changes,
at least in advance of seeing convincing proof that this will be a big win
for us.  The bits about "we'll just refactor the code till we like it"
are raising some red flags for me --- I think that that is at least as
likely to introduce new bugs as find existing ones.
        regards, tom lane


pgsql-hackers by date:

Previous
From: Neil Conway
Date:
Subject: Re: Unit testing
Next
From: Tom Lane
Date:
Subject: Re: pg_restore case sensitivity