Boost logo

Boost Testing :

From: Victor A. Wagner Jr. (vawjr_at_[hidden])
Date: 2005-06-02 09:12:51


At 06:20 2005-06-02, Bronek Kozicki wrote:
>Victor A. Wagner Jr. <vawjr_at_[hidden]> wrote:
>>>Above comment is present in CRT sources of both MSVC6 and MSVC71. I
>>>do not know how this relates to standards in *nix world.
>>
>>One has to wonder why the test functions in 7.1 then and fails in
>>8.0. Surely you don't imply that the older libraries were "better".
>
>Well, "old" CRT returned NULL when input was negative. It's documented in
>MSDN and quite obvious when looking at source code. I dunno if returning
>NULL makes them "better" or not; it depends on what you do with result.
>However, if you test the result for NULL, probably you might test time_t
>value instead for negative, before actually calling localtime?

maybe I haven't made myself clear, this assertion occurs when trying to
format for OUTPUT!
the output would be correct if they simply removed the assert
therefore, someone has made the conscious decision that they're NOT going
to allow output of dates outside some range (perhaps we need to switch
boost::datetime to use the 64bit flavors for vc8.0 and later.

also, I can't test anything, this is all inside boost and Microsoft /
Dinkumware code.

here is the source code from the test that's causing the assert

try {
       local_date_time sv_time4(min_date_time);
       check("min_date_time to_string: " + sv_time4.to_string(),
             sv_time4.to_string() == "1400-Jan-01 00:00:00 UTC");
     }
     catch (std::exception& e) {
       check("min_date_time to_string -- exception" , false);
       std::cout << "Exception is : " << e.what() << std::endl;
     }

>B.

Victor A. Wagner Jr. http://rudbek.com
The five most dangerous words in the English language:
               "There oughta be a law"


Boost-testing list run by mbergal at meta-comm.com