Exemplo n.º 1
0
int
main (void)
{
  size_t s1, s2;

  gsl_ieee_env_setup ();

  for (s1 = 1; s1 < 4 ; s1++) 
    {
      s2 = (s1 < 3) ? 1 : (s1 - 1) ;

      test_func (s1,s2);
      test_float_func (s1,s2);
      test_long_double_func (s1,s2);
      
      test_ulong_func (s1,s2);
      test_long_func (s1,s2);
      test_uint_func (s1,s2);
      test_int_func (s1,s2);
      test_ushort_func (s1,s2);
      test_short_func (s1,s2);
      test_uchar_func (s1,s2);
      test_char_func (s1,s2);
    }

  test_nist();

  exit (gsl_test_summary ());
}
Exemplo n.º 2
0
int
main (void)
{
  gsl_ieee_env_setup ();

  test_func ();
  test_float_func ();
  test_long_double_func ();
  test_ulong_func ();
  test_long_func ();
  test_uint_func ();
  test_int_func ();
  test_ushort_func ();
  test_short_func ();
  test_uchar_func ();
  test_char_func ();
  test_complex_func ();
  test_complex_float_func ();
  test_complex_long_double_func ();

  test_text ();
  test_float_text ();
#if HAVE_PRINTF_LONGDOUBLE
  test_long_double_text ();
#endif
  test_ulong_text ();
  test_long_text ();
  test_uint_text ();
  test_int_text ();
  test_ushort_text ();
  test_short_text ();
  test_uchar_text ();
  test_char_text ();
  test_complex_text ();
  test_complex_float_text ();
#if HAVE_PRINTF_LONGDOUBLE
  test_complex_long_double_text ();
#endif

  test_binary ();
  test_float_binary ();
  test_long_double_binary ();
  test_ulong_binary ();
  test_long_binary ();
  test_uint_binary ();
  test_int_binary ();
  test_ushort_binary ();
  test_short_binary ();
  test_uchar_binary ();
  test_char_binary ();
  test_complex_binary ();
  test_complex_float_binary ();
  test_complex_long_double_binary ();

  gsl_set_error_handler (&my_error_handler);

  test_trap ();
  test_float_trap ();
  test_long_double_trap ();
  test_ulong_trap ();
  test_long_trap ();
  test_uint_trap ();
  test_int_trap ();
  test_ushort_trap ();
  test_short_trap ();
  test_uchar_trap ();
  test_char_trap ();
  test_complex_trap ();
  test_complex_float_trap ();
  test_complex_long_double_trap ();

  exit (gsl_test_summary ());
}
Exemplo n.º 3
0
Arquivo: test.c Projeto: CNMAT/gsl
int
main (void)
{
  size_t M = 53;
  size_t N = 107;

  gsl_ieee_env_setup ();

  test_func (M, N);
  test_float_func (M, N);
  test_long_double_func (M, N);
  test_ulong_func (M, N);
  test_long_func (M, N);
  test_uint_func (M, N);
  test_int_func (M, N);
  test_ushort_func (M, N);
  test_short_func (M, N);
  test_uchar_func (M, N);
  test_char_func (M, N);
  test_complex_func (M, N);
  test_complex_float_func (M, N);
  test_complex_long_double_func (M, N);

  test_ops (M, N);
  test_float_ops (M, N);
  test_long_double_ops (M, N);
  test_ulong_ops (M, N);
  test_long_ops (M, N);
  test_uint_ops (M, N);
  test_int_ops (M, N);
  test_ushort_ops (M, N);
  test_short_ops (M, N);
  test_uchar_ops (M, N);
  test_char_ops (M, N);

  /* Must use smaller dimensions to prevent approximation of floats in
     float_mul_elements test*/
  
  {
    const size_t P = 8;
    const size_t Q = 12;

    test_complex_ops (P, Q);
    test_complex_float_ops (P, Q);
    test_complex_long_double_ops (P, Q);
  }

  test_text (M, N);
  test_float_text (M, N);
#if HAVE_PRINTF_LONGDOUBLE
  test_long_double_text (M, N);
#endif
  test_ulong_text (M, N);
  test_long_text (M, N);
  test_uint_text (M, N);
  test_int_text (M, N);
  test_ushort_text (M, N);
  test_short_text (M, N);
  test_uchar_text (M, N);
  test_char_text (M, N);
  test_complex_text (M, N);
  test_complex_float_text (M, N);
#if HAVE_PRINTF_LONGDOUBLE
  test_complex_long_double_text (M, N);
#endif

  test_binary (M, N);
  test_float_binary (M, N);
  test_long_double_binary (M, N);
  test_ulong_binary (M, N);
  test_long_binary (M, N);
  test_uint_binary (M, N);
  test_int_binary (M, N);
  test_ushort_binary (M, N);
  test_short_binary (M, N);
  test_uchar_binary (M, N);
  test_char_binary (M, N);
  test_complex_binary (M, N);
  test_complex_float_binary (M, N);
  test_complex_long_double_binary (M, N);

#if GSL_RANGE_CHECK
  gsl_set_error_handler (&my_error_handler);

  test_trap (M, N);
  test_float_trap (M, N);
  test_long_double_trap (M, N);
  test_ulong_trap (M, N);
  test_long_trap (M, N);
  test_uint_trap (M, N);
  test_int_trap (M, N);
  test_ushort_trap (M, N);
  test_short_trap (M, N);
  test_uchar_trap (M, N);
  test_char_trap (M, N);
  test_complex_trap (M, N);
  test_complex_float_trap (M, N);
  test_complex_long_double_trap (M, N);
#endif

  exit (gsl_test_summary ());
}
Exemplo n.º 4
0
Arquivo: test.c Projeto: ampl/gsl
int
main (void)
{
  size_t stride, ostride, N;

  gsl_ieee_env_setup ();

  for (N = 10; N < 1024; N = 2*N + 1) 
    {
      for (stride = 1; stride < 5 ; stride++)
        {
          test_func (stride, N);
          test_float_func (stride, N);
          test_long_double_func (stride, N);
          test_ulong_func (stride, N);
          test_long_func (stride, N);
          test_uint_func (stride, N);
          test_int_func (stride, N);
          test_ushort_func (stride, N);
          test_short_func (stride, N);
          test_uchar_func (stride, N);
          test_char_func (stride, N);

          test_complex_func (stride, N);
          test_complex_float_func (stride, N);
          test_complex_long_double_func (stride, N);

          for (ostride = 1; ostride < 5 ; ostride++)
            {
              test_ops (stride, ostride, N);
              test_float_ops (stride, ostride, N);
              test_long_double_ops (stride, ostride, N);
              test_ulong_ops (stride, ostride, N);
              test_long_ops (stride, ostride, N);
              test_uint_ops (stride, ostride, N);
              test_int_ops (stride, ostride, N);
              test_ushort_ops (stride, ostride, N);
              test_short_ops (stride, ostride, N);
              test_uchar_ops (stride, ostride, N);
              test_char_ops (stride, ostride, N);
              test_complex_ops (stride, ostride, N);
              test_complex_float_ops (stride, ostride, N);
              test_complex_long_double_ops (stride, ostride, N);
            }              

          test_text (stride, N);
          test_float_text (stride, N);
#if HAVE_PRINTF_LONGDOUBLE
          test_long_double_text (stride, N);
#endif
          test_ulong_text (stride, N);
          test_long_text (stride, N);
          test_uint_text (stride, N);
          test_int_text (stride, N);
          test_ushort_text (stride, N);
          test_short_text (stride, N);
          test_uchar_text (stride, N);
          test_char_text (stride, N);

          test_complex_text (stride, N);
          test_complex_float_text (stride, N);
#if HAVE_PRINTF_LONGDOUBLE
          test_complex_long_double_text (stride, N);
#endif

          test_file (stride, N);
          test_float_file (stride, N);
          test_long_double_file (stride, N);
          test_ulong_file (stride, N);
          test_long_file (stride, N);
          test_uint_file (stride, N);
          test_int_file (stride, N);
          test_ushort_file (stride, N);
          test_short_file (stride, N);
          test_uchar_file (stride, N);
          test_char_file (stride, N);
          test_complex_file (stride, N);
          test_complex_float_file (stride, N);
          test_complex_long_double_file (stride, N);
        }
    }

    test_alloc_zero_length ();
    test_float_alloc_zero_length ();
    test_long_double_alloc_zero_length ();
    test_ulong_alloc_zero_length ();
    test_long_alloc_zero_length ();
    test_uint_alloc_zero_length ();
    test_int_alloc_zero_length ();
    test_ushort_alloc_zero_length ();
    test_short_alloc_zero_length ();
    test_uchar_alloc_zero_length ();
    test_char_alloc_zero_length ();

    test_complex_alloc_zero_length ();
    test_complex_float_alloc_zero_length ();
    test_complex_long_double_alloc_zero_length ();

    test_calloc_zero_length ();
    test_float_calloc_zero_length ();
    test_long_double_calloc_zero_length ();
    test_ulong_calloc_zero_length ();
    test_long_calloc_zero_length ();
    test_uint_calloc_zero_length ();
    test_int_calloc_zero_length ();
    test_ushort_calloc_zero_length ();
    test_short_calloc_zero_length ();
    test_uchar_calloc_zero_length ();
    test_char_calloc_zero_length ();

    test_complex_calloc_zero_length ();
    test_complex_float_calloc_zero_length ();
    test_complex_long_double_calloc_zero_length ();

#if GSL_RANGE_CHECK
  gsl_set_error_handler (&my_error_handler);

  for (N = 1; N < 1024; N *=2) 
    {
      for (stride = 1; stride < 5 ; stride++)
        {
          test_trap (stride, N);
          test_float_trap (stride, N);
          test_long_double_trap (stride, N);
          test_ulong_trap (stride, N);
          test_long_trap (stride, N);
          test_uint_trap (stride, N);
          test_int_trap (stride, N);
          test_ushort_trap (stride, N);
          test_short_trap (stride, N);
          test_uchar_trap (stride, N);
          test_char_trap (stride, N);
          test_complex_trap (stride, N);
          test_complex_float_trap (stride, N);
          test_complex_long_double_trap (stride, N);
        }
    }
#endif

  exit (gsl_test_summary ());
}