mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-25 00:59:13 +08:00
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.
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
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.
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
*** TEST 58 ***
|
||||
Init - _Timespec_Divide - by zero
|
||||
Init - _Timespec_Greater_than - lhs seconds less
|
||||
*** END OF TEST 58 ***
|
||||
|
||||
Reference in New Issue
Block a user