-- TEST_GENERIC_COMPLEX_ELEMENTARY_FUNCTIONS_1.ADA called: TEST_GCEF_1.ADA -- part 1 of multiple part test -- This part tests exceptions and prescribed values. -- Additional parts test accuracy based on Peter Tang's techniques. -- This is version 0.1, 20-Apr-1992 of a specification compliance test suite -- for the Generic Complex Elementary Functions as specified in -- NUMWG Draft 0.99, 20 April 1992 -- The ACVC Ada Compiler Validation Capability philosophy is intended to -- be used. e.g. This is a test against a specification on a specific -- implementation. A specific implementation means the combination of three -- items : 1) a specific Ada compilation system, 2) a specific hardware -- configuration and 3) a specific Generic Complex Elementary Functions -- implementation. The specification is interpreted by the NRG -- the same way ANSI/MIL-STD-1815A is interpreted by the ARG. -- Note to implementors: Once an initial release of this test suite is -- released, there may be periodic updates. There is no guarantee that -- passing any particular version implies passing another version. -- This is the same philosophy as for ACVC. -- When the specification says the domain is unbounded, then the test -- suite checks for no exceptions being raised for FLOAT_TYPE'SAFE_LARGE, -- 'SAFE_SMALL their negatives, and possibly other values. Similarly for a -- domain of X>0 or X>=0 'SAFE_LARGE and 'SAFE_SMALL are used. When there is -- a note about "restricted domain" then the check for no exceptions is made by -- replacing 'SAFE_LARGE reduced by enough to be within the relative -- error. -- The functions are tested in the order the functions appear -- in the specification. Required exceptions are tested first. -- A few tests where exceptions should not occur are tested next. -- Finally, prescribed values required by the specification are tested. -- This part of the test is itself generic. There are two instantiations -- at the end. Only some instantiations will compile on any given compiler. -- All instantiations that compile must pass the test in order to -- achieve compliance. The instantiations are for FLOAT_TYPE being: -- FLOAT and LONG_FLOAT. -- The corresponding procedures that must be linked and executed are: -- TEST_CEF_1 -- TEST_LCEF_1 -- The compliance test must be compiled from this file, unmodified with -- the following exclusions: If a compiler has not yet implemented -- AI 387, then a global edit may be made to change CONSTRAINT_ERROR -- to CONSTRAINT_ERROR | NUMERIC_ERROR . -- Please report problems or suggested additions to Jon Squire -- Net mail squire@tron.bwi.wec.com , phone (301)765-3748 generic type FLOAT_TYPE is digits <>; procedure TEST_GCEF_1; with TEXT_IO; use TEXT_IO; with GENERIC_COMPLEX_ELEMENTARY_FUNCTIONS; with TEST_GCEF_UTILITIES; with TEST_GENERIC_PRESCRIBED_SQRT; with TEST_GENERIC_PRESCRIBED_LOG; with TEST_GENERIC_PRESCRIBED_EXP; with TEST_GENERIC_PRESCRIBED_PWR; with TEST_GENERIC_PRESCRIBED_SIN; with TEST_GENERIC_PRESCRIBED_COS; with TEST_GENERIC_PRESCRIBED_TAN; with TEST_GENERIC_PRESCRIBED_COT; with TEST_GENERIC_PRESCRIBED_ARCSIN; with TEST_GENERIC_PRESCRIBED_ARCCOS; with TEST_GENERIC_PRESCRIBED_ARCTAN; with TEST_GENERIC_PRESCRIBED_ARCCOT; with TEST_GENERIC_PRESCRIBED_SINH; with TEST_GENERIC_PRESCRIBED_COSH; with TEST_GENERIC_PRESCRIBED_TANH; with TEST_GENERIC_PRESCRIBED_COTH; with TEST_GENERIC_PRESCRIBED_ARCSINH; with TEST_GENERIC_PRESCRIBED_ARCCOSH; with TEST_GENERIC_PRESCRIBED_ARCTANH; with TEST_GENERIC_PRESCRIBED_ARCCOTH; procedure TEST_GCEF_1 is subtype REAL is FLOAT_TYPE; -- run for each hardware type package GCEF is new GENERIC_COMPLEX_ELEMENTARY_FUNCTIONS(REAL, COMPLEX); use GCEF; -- package being tested package TEST_UTILITIES is new TEST_GCEF_UTILITIES(REAL, COMPLEX); use TEST_UTILITIES; procedure TEST_PRESCRIBED_SQRT is new TEST_GENERIC_PRESCRIBED_SQRT(REAL); procedure TEST_PRESCRIBED_LOG is new TEST_GENERIC_PRESCRIBED_LOG(REAL); procedure TEST_PRESCRIBED_EXP is new TEST_GENERIC_PRESCRIBED_EXP(REAL); procedure TEST_PRESCRIBED_PWR is new TEST_GENERIC_PRESCRIBED_PWR(REAL); procedure TEST_PRESCRIBED_SIN is new TEST_GENERIC_PRESCRIBED_SIN(REAL); procedure TEST_PRESCRIBED_COS is new TEST_GENERIC_PRESCRIBED_COS(REAL); procedure TEST_PRESCRIBED_TAN is new TEST_GENERIC_PRESCRIBED_TAN(REAL); procedure TEST_PRESCRIBED_COT is new TEST_GENERIC_PRESCRIBED_COT(REAL); procedure TEST_PRESCRIBED_ARCSIN is new TEST_GENERIC_PRESCRIBED_ARCSIN(REAL); procedure TEST_PRESCRIBED_ARCCOS is new TEST_GENERIC_PRESCRIBED_ARCCOS(REAL); procedure TEST_PRESCRIBED_ARCTAN is new TEST_GENERIC_PRESCRIBED_ARCTAN(REAL); procedure TEST_PRESCRIBED_ARCCOT is new TEST_GENERIC_PRESCRIBED_ARCCOT(REAL); procedure TEST_PRESCRIBED_SINH is new TEST_GENERIC_PRESCRIBED_SINH(REAL); procedure TEST_PRESCRIBED_COSH is new TEST_GENERIC_PRESCRIBED_COSH(REAL); procedure TEST_PRESCRIBED_TANH is new TEST_GENERIC_PRESCRIBED_TANH(REAL); procedure TEST_PRESCRIBED_COTH is new TEST_GENERIC_PRESCRIBED_COTH(REAL); procedure TEST_PRESCRIBED_ARCSINH is new TEST_GENERIC_PRESCRIBED_ARCSINH(REAL); procedure TEST_PRESCRIBED_ARCCOSH is new TEST_GENERIC_PRESCRIBED_ARCCOSH(REAL); procedure TEST_PRESCRIBED_ARCTANH is new TEST_GENERIC_PRESCRIBED_ARCTANH(REAL); procedure TEST_PRESCRIBED_ARCCOTH is new TEST_GENERIC_PRESCRIBED_ARCCOTH(REAL); begin PUT_LINE("Part 1, test of Generic Complex Elementary Functions"); PUT_LINE("Test for proper exception raising and prescribed values"); INITIAL; TEST_PRESCRIBED_SQRT; TEST_PRESCRIBED_LOG; TEST_PRESCRIBED_EXP; TEST_PRESCRIBED_PWR; TEST_PRESCRIBED_SIN; TEST_PRESCRIBED_COS; TEST_PRESCRIBED_TAN; TEST_PRESCRIBED_COT; TEST_PRESCRIBED_ARCSIN; TEST_PRESCRIBED_ARCCOS; TEST_PRESCRIBED_ARCTAN; TEST_PRESCRIBED_ARCCOT; TEST_PRESCRIBED_SINH; TEST_PRESCRIBED_COSH; TEST_PRESCRIBED_TANH; TEST_PRESCRIBED_COTH; TEST_PRESCRIBED_ARCSINH; TEST_PRESCRIBED_ARCCOSH; TEST_PRESCRIBED_ARCTANH; TEST_PRESCRIBED_ARCCOTH; FINAL(TEST_NUMBER => 1); end TEST_GCEF_1; -- Even if some of these compilation units fail, others will compile. -- The compliance test must be run on all that compile. with TEST_GCEF_1; procedure TEST_CEF_1 is new TEST_GCEF_1 ( FLOAT ) ; with TEST_GCEF_1; procedure TEST_LCEF_1 is new TEST_GCEF_1 ( LONG_FLOAT ) ;