OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [gnat.dg/] [test_time_stamp.adb] - Blame information for rev 696

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 696 jeremybenn
--  { dg-do run }
2
 
3
with GNAT.Time_Stamp;
4
use  GNAT.Time_Stamp;
5
 
6
procedure test_time_stamp is
7
   S : constant String := Current_Time;
8
 
9
   function NN (S : String) return Boolean is
10
   begin
11
      for J in S'Range loop
12
         if S (J) not in '0' .. '9' then
13
            return True;
14
         end if;
15
      end loop;
16
      return False;
17
   end NN;
18
 
19
begin
20
   if S'Length /= 22
21
     or else S (5) /= '-'
22
     or else S (8) /= '-'
23
     or else S (11) /= ' '
24
     or else S (14) /= ':'
25
     or else S (17) /= ':'
26
     or else S (20) /= '.'
27
     or else NN (S (1 .. 4))
28
     or else NN (S (6 .. 7))
29
     or else NN (S (9 .. 10))
30
     or else NN (S (12 .. 13))
31
     or else NN (S (15 .. 16))
32
     or else NN (S (18 .. 19))
33
     or else NN (S (21 .. 22))
34
   then
35
      raise Program_Error;
36
   end if;
37
end;

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.