On 11/19/2009 10:45 PM, Austin Lund wrote:
2009/11/19 Paul Vriens<[email protected]>:
On 11/19/2009 01:23 PM, Austin Lund wrote:

-                ok (pFileStructA->uFileDate == pFileStructW->uDate2&&
-                    pFileStructA->uFileTime == pFileStructW->uTime2,
-                    "Last write time should match last access time!\n");
-

Hi Austin,

Is there no other way to get around this? I think it's a bit of a shame
having tests removed for that odd system that has a FAT filesystem on a NT4+
box.


The date is always within 1 day (plus or minus).  I guess it would be
possible to implement a calendar addition and subtraction algorithm.
Is there one already available somewhere that could be used with this
bit packed structure in a test?

The time could be anything, except perhaps the seconds.  On my trials
with this, it always seems to have the seconds as zero.  I'm not sure
if you can set a timezone that has a delta with non-zero seconds.

On thinking about this, the way I'd do this is:

     if dates and times are equal then pass
     else check the rough rules as outlined

But is it ok (or even sensible to do):

     if (date1 == date2&&  time1 == time2) ok(TRUE, "Blah");
     else { /* some other test */ }

or would you leave out the ok()?

Would this serve it's purpose?

if (abs(date2 - date1) == 1)
   skip("We dont't check access times on a FAT filesystem\n");
else
   ok(..., "Last write time should match last access time!\n")

The if() is according to your statement:

"The date is always within 1 day (plus or minus)."

--
Cheers,

Paul.


Reply via email to