summaryrefslogtreecommitdiffstats
path: root/c/src/tests
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>1996-08-12 19:20:18 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>1996-08-12 19:20:18 +0000
commitd60d9505ca0489773f21a74e11ca42d85bea16f3 (patch)
treec1c3474bae182ec31ccab106697b4bf581403b1c /c/src/tests
parenttime: It is not an error if the TOD is not set. (diff)
downloadrtems-d60d9505ca0489773f21a74e11ca42d85bea16f3.tar.bz2
added test case for non-NULL parameter to time()
Diffstat (limited to 'c/src/tests')
-rw-r--r--c/src/tests/psxtests/psx01/init.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/c/src/tests/psxtests/psx01/init.c b/c/src/tests/psxtests/psx01/init.c
index 497ba1f422..466446e6db 100644
--- a/c/src/tests/psxtests/psx01/init.c
+++ b/c/src/tests/psxtests/psx01/init.c
@@ -22,6 +22,7 @@ void *POSIX_Init(
int priority;
pthread_t thread_id;
time_t seconds;
+ time_t seconds1;
time_t remaining;
struct tm tm;
struct timespec tv;
@@ -59,6 +60,11 @@ void *POSIX_Init(
seconds = time( NULL );
printf( ctime( &seconds ) );
+ /* just to have the value copied out through the parameter */
+
+ seconds = time( &seconds1 );
+ assert( seconds == seconds1 );
+
/* check the time remaining */
printf( "Init: seconds remaining (%d)\n", (int)remaining );