Re: RFC: Make w32api headers (effectively) self-contained

Earnie <[email protected]> Sat, 25 Feb 2017 11:56:44 -0500
Newsgroups gmane.comp.gnu.mingw.devel
Message-ID <[email protected]>

On 2/24/2017 10:10 AM, Keith Marshall wrote:
> On 12/12/16 22:52, Keith Marshall wrote:
>> I've started playing with autotest, to implement unit tests for mingwrt
>> and w32api; (so far, I've implemented several tests for mingwrt, among
>> them a test group to verify self-containment of system headers).  This
>> is fine for mingwrt, but right now, if I invoke (say):
> 
>>   $ echo '#include <winuser.h>' | mingw32-gcc -c -xc - -o /dev/null
> 
>> I see a swathe of error messages, relating to undefined (custom) data
>> types; (winuser.h has inherent prerequisite dependencies on windef.h,
>> stdarg.h, and by default wingdi.h).  I don't know how Microsoft handle
>> this, but IMO it is just dreadfully poor software engineering; users
>> should not need to be concerned by such interdependencies among system
>> headers.
> 
> I've now added some preliminary unit tests into the repository, for both 
> mingwrt and w32api; in both cases, header integrity and self-containment 
> is tested, for each header file in isolation, and for all together.  For 
> mingwrt, I've also added a set of printf() tests, and tests for some of 
> the mathematical functions.
> 

Great, thanks Keith.  Something that we've needed since day one.

-- 
Earnie

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot