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

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.5.1/] [gcc/] [testsuite/] [ada/] [acats/] [tests/] [c9/] [c96005f.ada] - Blame information for rev 294

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 294 jeremybenn
-- C96005F.ADA
2
 
3
--                             Grant of Unlimited Rights
4
--
5
--     Under contracts F33600-87-D-0337, F33600-84-D-0280, MDA903-79-C-0687,
6
--     F08630-91-C-0015, and DCA100-97-D-0025, the U.S. Government obtained 
7
--     unlimited rights in the software and documentation contained herein.
8
--     Unlimited rights are defined in DFAR 252.227-7013(a)(19).  By making 
9
--     this public release, the Government intends to confer upon all 
10
--     recipients unlimited rights  equal to those held by the Government.  
11
--     These rights include rights to use, duplicate, release or disclose the 
12
--     released technical data and computer software in whole or in part, in 
13
--     any manner and for any purpose whatsoever, and to have or permit others 
14
--     to do so.
15
--
16
--                                    DISCLAIMER
17
--
18
--     ALL MATERIALS OR INFORMATION HEREIN RELEASED, MADE AVAILABLE OR
19
--     DISCLOSED ARE AS IS.  THE GOVERNMENT MAKES NO EXPRESS OR IMPLIED 
20
--     WARRANTY AS TO ANY MATTER WHATSOEVER, INCLUDING THE CONDITIONS OF THE
21
--     SOFTWARE, DOCUMENTATION OR OTHER INFORMATION RELEASED, MADE AVAILABLE 
22
--     OR DISCLOSED, OR THE OWNERSHIP, MERCHANTABILITY, OR FITNESS FOR A
23
--     PARTICULAR PURPOSE OF SAID MATERIAL.
24
--*
25
-- CHECK THAT PACKAGE CALENDAR + AND - FUNCTIONS WORK PROPERLY,
26
-- ESPECIALLY WITH VALUES AT MIDNIGHT.
27
 
28
-- GOM 02/18/85
29
-- JWC 05/14/85
30
 
31
WITH REPORT;
32
USE REPORT;
33
WITH CALENDAR;
34
USE CALENDAR;
35
 
36
PROCEDURE C96005F IS
37
 
38
     CURR_DAY1 : CONSTANT TIME := TIME_OF(1984,1,1,0.0);
39
     CURR_DAY2 : CONSTANT TIME := TIME_OF(1984,1,1,DAY_DURATION'LAST);
40
     CURR_DAY3 : CONSTANT TIME := TIME_OF(1984,1,1,10000.0);
41
 
42
     TOMORROW1 : CONSTANT TIME := TIME_OF(1984,1,2,0.0);
43
     TOMORROW2 : CONSTANT TIME := TIME_OF(1984,1,2,DAY_DURATION'LAST);
44
     TOMORROW3 : CONSTANT TIME := TIME_OF(1984,1,2,10000.0);
45
 
46
     YESTERDAY1 : CONSTANT TIME := TIME_OF(1983,12,31,0.0);
47
     YESTERDAY2 : CONSTANT TIME := TIME_OF(1983,12,31,
48
                                           DAY_DURATION'LAST);
49
     YESTERDAY3 : CONSTANT TIME := TIME_OF(1983,12,31,10000.0);
50
 
51
BEGIN
52
     TEST("C96005F","CHECKING PACKAGE CALENDAR + AND - FUNCTIONS");
53
 
54
     -- CHECK IF ADDING ONE DAY TO 'CURR_DAY#' TIMES YIELDS
55
     -- TIMES EQUAL TO 'TOMORROW'.
56
 
57
     IF (CURR_DAY1 + DAY_DURATION'LAST) /= TOMORROW1 THEN
58
          FAILED("FAILURE IN ADDING 1 DAY TO 'CURR_DAY1'");
59
     END IF;
60
 
61
     IF (CURR_DAY2 + DAY_DURATION'LAST) /= TOMORROW2 THEN
62
          FAILED("FAILURE IN ADDING 1 DAY TO 'CURR_DAY2'");
63
     END IF;
64
 
65
     IF (CURR_DAY3 + DAY_DURATION'LAST) /= TOMORROW3 THEN
66
          FAILED("FAILURE IN ADDING 1 DAY TO 'CURR_DAY3'");
67
     END IF;
68
 
69
     IF (CURR_DAY1 + DAY_DURATION'LAST) /= CURR_DAY2 THEN
70
          FAILED("'CURR_DAY1' + 1 /= 'CURR_DAY2'");
71
     END IF;
72
 
73
     -- CHECK IF SUBTRACTING ONE DAY FROM 'CURR_DAY#' TIMES YIELDS
74
     -- TIMES EQUAL TO 'YESTERDAY'.
75
 
76
     IF (CURR_DAY1 - DAY_DURATION'LAST) /= YESTERDAY1 THEN
77
          FAILED("FAILURE IN SUBTRACTING 1 DAY FROM 'CURR_DAY1'");
78
     END IF;
79
 
80
     IF (CURR_DAY2 - DAY_DURATION'LAST) /= YESTERDAY2 THEN
81
          FAILED("FAILURE IN SUBTRACTING 1 DAY FROM 'CURR_DAY2'");
82
     END IF;
83
 
84
     IF (CURR_DAY3 - DAY_DURATION'LAST) /= YESTERDAY3 THEN
85
          FAILED("FAILURE IN SUBTRACTING 1 DAY FROM 'CURR_DAY3'");
86
     END IF;
87
 
88
     IF (CURR_DAY2 - DAY_DURATION'LAST) /= CURR_DAY1 THEN
89
          FAILED("'CURR_DAY2' - 1 /= 'CURR_DAY1'");
90
     END IF;
91
 
92
     RESULT;
93
END C96005F;

powered by: WebSVN 2.1.0

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