This is the mail archive of the libstdc++@sourceware.cygnus.com mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Test suites


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

From: Benjamin Kosnik <bkoz@cygnus.com>
Sent: 05 June 2000 18:02
> > A large number of the test programs utilise implementation
> > details of, e.g. filebuf. Is this just to make testing easier, or
> > is it to exercise specific features of the implementation, or a
> > mixture? For the former, would it be possible to use more generic
> > methods, so that the test suite can be used to compare the
> > functionality of libstdc++-v3 against the native C++ library for
> > the platform, or any other supposedly standard-compliant library?
> 
> Can you give specific examples? I'm unclear on the details.
> 

Specifically, the iostream tests use such things as
fpos<>._M_position(), and filebuf._M_buf_size_opt, and
numpunct<>._M_init, which are implementation details not available on
other implementations of the library, such as that shipped with
Microsoft Visual C++.

> In general, yes, it would be nice to abstract out as much detail as
>  possible, and to have tests that are as portable as possible.   
> 
> However, as you've noticed, for filebufs in particular, details
> differ  per host. (see the _M_buf_size_pref, to be precise.) Some
> effort has been  expended to make sure the filebuf tests work on
> both solaris, linux, and  cross compilers...   
> 
> I would be interested in suggestions to make things more portable. 

Calls to fpos<>._M_position() can be replaced with a cast to
streamoff.

The use of _M_buf_size_opt should be replaced with calls to setbuf(),
though this is required on every open whereas _M_buf_size_opt applies
across calls to open.

Calls to numpunct<>._M_init() can be replaced by overriding the
virtual protected member functions that return the decimal point,
thousand separator and grouping.

Anthony

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.1 for non-commercial use <http://www.pgp.com>
Comment: PGP Key at: http://i3.yimg.com/3/c7e5ee24/g/68fc2307.asc

iQA/AwUBOTy+Qpvw+P4cG5rVEQIZ2ACbBsB1fQY07Gdy93ZNs312q5D0RNAAoJsA
j2jWL6aFN5Byun25dz+fNra1
=Vzj6
-----END PGP SIGNATURE-----



__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]