diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2011-03-11 20:36:45 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2011-03-11 20:36:45 +0000 |
commit | f91b18604234a4cb179346f7529e84b348b8dfac (patch) | |
tree | 1f8268e5ea3c412077b7f6cd72dcf21e64e3631a /testsuites/sptests | |
parent | 2011-03-11 Joel Sherrill <joel.sherrilL@OARcorp.com> (diff) | |
download | rtems-f91b18604234a4cb179346f7529e84b348b8dfac.tar.bz2 |
2011-03-11 Joel Sherrill <joel.sherrilL@OARcorp.com>
* sp58/init.c, sp58/sp58.scn: Account for case where left hand side
seconds field is less than.
Diffstat (limited to 'testsuites/sptests')
-rw-r--r-- | testsuites/sptests/ChangeLog | 5 | ||||
-rw-r--r-- | testsuites/sptests/sp58/init.c | 17 | ||||
-rw-r--r-- | testsuites/sptests/sp58/sp58.scn | 1 |
3 files changed, 23 insertions, 0 deletions
diff --git a/testsuites/sptests/ChangeLog b/testsuites/sptests/ChangeLog index 55a4b2b25a..97f3e59e9a 100644 --- a/testsuites/sptests/ChangeLog +++ b/testsuites/sptests/ChangeLog @@ -1,5 +1,10 @@ 2011-03-11 Joel Sherrill <joel.sherrilL@OARcorp.com> + * sp58/init.c, sp58/sp58.scn: Account for case where left hand side + seconds field is less than. + +2011-03-11 Joel Sherrill <joel.sherrilL@OARcorp.com> + * sp08/sp08.scn: Convert to UNIX CR/LF. 2011-03-11 Joel Sherrill <joel.sherrilL@OARcorp.com> diff --git a/testsuites/sptests/sp58/init.c b/testsuites/sptests/sp58/init.c index 973870b1d6..d27c8de913 100644 --- a/testsuites/sptests/sp58/init.c +++ b/testsuites/sptests/sp58/init.c @@ -39,7 +39,23 @@ void timespec_divide_by_zero(void) _Timespec_Divide( &t1, &zero, &ival_percentage, &fval_percentage ); rtems_test_assert( ival_percentage == 0 ); rtems_test_assert( fval_percentage == 0 ); +} + +void timespec_greater_than_lhs_sec_less(void) +{ + struct timespec lhs; + struct timespec rhs; + bool rc; + + lhs.tv_sec = 100; + lhs.tv_nsec = 0; + + rhs.tv_sec = 101; + rhs.tv_nsec = 0; + puts( "Init - _Timespec_Greater_than - lhs seconds less" ); + rc = _Timespec_Greater_than( &lhs, &rhs ); + rtems_test_assert( rc == false ); } rtems_task Init( @@ -49,6 +65,7 @@ rtems_task Init( puts( "\n\n*** TEST 58 ***" ); timespec_divide_by_zero(); + timespec_greater_than_lhs_sec_less(); puts( "*** END OF TEST 58 ***" ); rtems_test_exit(0); diff --git a/testsuites/sptests/sp58/sp58.scn b/testsuites/sptests/sp58/sp58.scn index fcb028bcc0..c8a6173ade 100644 --- a/testsuites/sptests/sp58/sp58.scn +++ b/testsuites/sptests/sp58/sp58.scn @@ -1,3 +1,4 @@ *** TEST 58 *** Init - _Timespec_Divide - by zero +Init - _Timespec_Greater_than - lhs seconds less *** END OF TEST 58 *** |