Natools

Check-in [c517c2f45f]
Login
Overview
Comment:time_io-tests: add a check with an invalid leap-second time, to reach full coverage
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: c517c2f45fdef66c8b4cb4da822b9abc5818eb2b
User & Date: nat on 2014-08-22 17:05:59
Other Links: manifest | tags
Context
2014-08-24
20:31
references: add Is_Last primitive

It's almost a break in abstraction, and it's unsafe to use when the reference can be accessed concurrently. However it might have some use in some context, to free the last reference when checked in a protected or thread-local context, to build a crude garbage collection system. check-in: 610b834d9d user: nat tags: trunk

2014-08-22
17:05
time_io-tests: add a check with an invalid leap-second time, to reach full coverage check-in: c517c2f45f user: nat tags: trunk
2014-08-21
20:52
time_io-tests: add test for leap second workaround on implementations that don't support them check-in: ba34be19be user: nat tags: trunk
Changes

Modified tests/natools-time_io-tests.adb from [c77496cbaa] to [9199c98093].

296
297
298
299
300
301
302










303
304
305
306
307
308
309
           (1937, 01, 01, 12, 0, 27, 0.87, False, 20), 20),
         Value ("1937-01-01T12:00:27.87+00:20"),
         "[5] Noon in the Netherlands:");

      Check (Test, Now,
         Value (RFC_3339.Image (Now.Time, Subsecond_Digits => 9)),
         "[6] Round trip with current time:");










   exception
      when Error : others => Test.Report_Exception (Error);
   end Read_From_RFC_3339;


   procedure Write_As_RFC_3339 (Report : in out NT.Reporter'Class) is
      Test : NT.Test := Report.Item ("Ada.Calendar.Time -> RFC-3339");







>
>
>
>
>
>
>
>
>
>







296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
           (1937, 01, 01, 12, 0, 27, 0.87, False, 20), 20),
         Value ("1937-01-01T12:00:27.87+00:20"),
         "[5] Noon in the Netherlands:");

      Check (Test, Now,
         Value (RFC_3339.Image (Now.Time, Subsecond_Digits => 9)),
         "[6] Round trip with current time:");

      declare
         Time : Extended_Time;
      begin
         RFC_3339.Value ("1990-11-31T23:59:60Z", Time.Time, Time.Offset);
         Test.Fail ("No exception on 1990-11-31, found " & Image (Time));
      exception
         when Ada.Calendar.Time_Error =>
            null;
      end;
   exception
      when Error : others => Test.Report_Exception (Error);
   end Read_From_RFC_3339;


   procedure Write_As_RFC_3339 (Report : in out NT.Reporter'Class) is
      Test : NT.Test := Report.Item ("Ada.Calendar.Time -> RFC-3339");