freepooma-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pooma-dev] RFA: Proposed Modifications to Test Files


From: James Crotinger
Subject: Re: [pooma-dev] RFA: Proposed Modifications to Test Files
Date: Thu, 15 Mar 2001 08:58:33 -0700
User-agent: Microsoft-Outlook-Express-Macintosh-Edition/5.02.2022

on 3/14/01 11:39 PM, Jeffrey Oldham at address@hidden wrote:

> Are the attached changes to the files in the Pooma "test" directory
> acceptable?  

I'm not at all sure about the status of anything under the "r2/test"
directory. Once upon a time we had a testing team and under their auspices
we formed the r2/test directory. This was supposed to test things based on
specifications; i.e. it was supposed to be somewhat black-box, whereas the
unit tests (src/Engine/tests, etc) were written by the developers and were
pretty much white-box. This process did not work out (we spent more time
debugging the test-team's test codes than we did debugging the things they
were testing). I don't even know if these were included in Graham Mark's
regression tests or in the distribution - I'm guessing not. In other words,
this is probably not a big deal as we may want to nuke r2/test.

Given that, I'll make a comment or two...

> Array/Test/ArrayTest.cpp:
> 
> * Prepend iostream functions with "std::".

This is not needed since we include <iostream.h> and not <iostream>. We did
this on purpose. At the time, some systems did not yet supporting the ANSI
iostreams. I seem to recall that this was particularly an issue with SGI's
CC.  Ah, yes, here is the text of my message on this:

> Matt Austern said that 7.2.1 beta 2 should definitely have some (not all)
> of the .h-less header files. However, SGI has decided to only put things in
> the std:: namespace if they are conforming. Their streams are not, so they
> don't put streams in the std:: namespace. Almost everyone thought this was
> a dumb idea, but I don't know if anyone convinced Matt.

Even though SGI isn't the platform of the future at LANL, it is the platform
of the present, and so we don't want to break things there. I guess we need
to check if this has been fixed in SGI CC. If not, we probably need to stick
with the current practice of include <iostream.h>.

As a practical matter, even if we go to <iostream> I'd prefer a

  using std::cout;
  using std::endl;

approach to writing "std::" in a million places in these test files.

> Shared/dclock.cpp:
> 
> * Rewrite from non-portable SGI code to (hopefully) portable Gnu C
> Library code.

I'm not sure about this code, but there are places where we used SGI's
high-speed timers and I think we want to keep that code. I think that those
places all provide portable versions, though.

> Utilities/RefCounting/RefCountedBlockPtr/RefCountedBlockPtrTest.cpp:
> 
> * Change abs() to fabs() for floating point numbers.

Stroustrup says <cmath> and <math.h> are supposed to include

  double abs(double);

Is that not true.

  Jim

reply via email to

[Prev in Thread] Current Thread [Next in Thread]