My code of testsuite:
===============================================
  /* Test 'FE_DIVBYZERO' */
  puts( "\nDivide by zero and confirm fetestexcept()." );
  a = 0.0;
  b = 1.0;
  c = b/a;
  printf("\n%d",FE_DIVBYZERO);
  fegetexceptflag(&excepts,FE_ALL_EXCEPT);
  printf("\n%d",excepts);
  r = feraiseexcept(FE_DIVBYZERO);
  printf("\n%d\n",r);
  rtems_test_assert( fetestexcept( FE_DIVBYZERO ) );
==============================================
OUTPUT
==============================================
Divide by zero and confirm fetestexcept().

8
0
1
/home/varodek/development/rtems/kernel/rtems/c/src/../../testsuites/psxtests/psxfenv01/init.c:
84 fetestexcept( FE_DIVBYZERO )
==============================================
EXPECTED OUTPUT
==============================================
Divide by zero and confirm fetestexcept().

8
8
0
==============================================
- fetestexcept( FE_DIVBYZERO ), should return a non-zero value as
division-by-zero was performed.
.
- feraiseexcept(FE_DIVBYZERO); is also not working. It should return zero
when successful
.
==============================================

Thank You
Vaibhav Gupta
_______________________________________________
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Reply via email to