diff packages/language/c/libc/current/tests/stdlib/srand.c @ 2:443894e2e912 ecos-v1_2_1-release

Block commit of eCos version 1.2.1
author jlarmour
date Tue, 11 May 1999 12:24:34 +0000
parents 3111d98ba7b3
children c38311975d4f
line wrap: on
line diff
--- a/packages/language/c/libc/current/tests/stdlib/srand.c
+++ b/packages/language/c/libc/current/tests/stdlib/srand.c
@@ -22,16 +22,16 @@
 // September 30, 1998.
 // 
 // The Initial Developer of the Original Code is Cygnus.  Portions created
-// by Cygnus are Copyright (C) 1998 Cygnus Solutions.  All Rights Reserved.
+// by Cygnus are Copyright (C) 1998,1999 Cygnus Solutions.  All Rights Reserved.
 // -------------------------------------------
 //
 //####COPYRIGHTEND####
 //=================================================================
 //#####DESCRIPTIONBEGIN####
 //
-// Author(s):     ctarpy@cygnus.co.uk, jlarmour@cygnus.co.uk
-// Contributors:    jlarmour@cygnus.co.uk
-// Date:          1998/6/3
+// Author(s):     ctarpy, jlarmour
+// Contributors:  jlarmour
+// Date:          1999-01-20
 // Description:   Contains testcode for C library srand() function
 //
 //
@@ -54,7 +54,7 @@
 
 // HOW TO START TESTS
 
-#if defined(CYGPKG_LIBC) && defined(CYGPKG_LIBC_RAND)
+#if defined(CYGPKG_LIBC)
 
 # define START_TEST( test ) test(0)
 
@@ -62,7 +62,7 @@
 
 # define START_TEST( test ) CYG_EMPTY_STATEMENT
 
-#endif // if defined(CYGPKG_LIBC) && defined(CYGPKG_LIBC_RAND)
+#endif // if defined(CYGPKG_LIBC)
 
 
 // CONSTANTS
@@ -88,7 +88,7 @@ cyg_package_start( void )
 } // cyg_package_start()
 
 
-#if defined(CYGPKG_LIBC) && defined(CYGPKG_LIBC_RAND)
+#if defined(CYGPKG_LIBC)
 
 static void
 test( CYG_ADDRWORD data )
@@ -115,8 +115,7 @@ test( CYG_ADDRWORD data )
 
     // Make sure arrays 1 and 3 are the same
     fail = 0;
-    for (ctr=0; ctr<TEST_SIZE; ++ctr)
-    {
+    for (ctr=0; ctr<TEST_SIZE; ++ctr) {
         if (array_1[ctr] != array_3[ctr])
             ++fail;
     } // for
@@ -125,8 +124,7 @@ test( CYG_ADDRWORD data )
 
     // Check sequences of different seeds are different
     hits = 0;
-    for (ctr=0; ctr<TEST_SIZE; ++ctr)
-    {
+    for (ctr=0; ctr<TEST_SIZE; ++ctr) {
         if (array_1[ctr] == array_2[ctr])
             ++hits;
     } // for
@@ -134,11 +132,11 @@ test( CYG_ADDRWORD data )
     CYG_TEST_PASS_FAIL(hits < X_CORREL,
                        "random sequence for different seeds is different");
 
-    CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for C library "
-                    "srand() function");
+    CYG_TEST_FINISH("Finished tests from testcase " __FILE__ " for "
+                    "C library srand() function");
 } // test()
 
-#endif // if defined(CYGPKG_LIBC) && defined(CYGPKG_LIBC_RAND)
+#endif // if defined(CYGPKG_LIBC)
 
 
 int
@@ -151,7 +149,7 @@ main(int argc, char *argv[])
 
     START_TEST( test );
 
-    CYG_TEST_PASS_FINISH("Testing is not applicable to this configuration");
+    CYG_TEST_NA("Testing is not applicable to this configuration");
 } // main()