Example #1
0
File: tests.c Project: Kirija/XPIR
void
tests_start_mpfr (void)
{
  test_version ();

  /* don't buffer, so output is not lost if a test causes a segv etc */
  setbuf (stdout, NULL);

#if defined HAVE_LOCALE_H && defined HAVE_SETLOCALE
  /* Added on 2005-07-09. This allows to test MPFR under various
     locales. New bugs will probably be found, in particular with
     LC_ALL="tr_TR.ISO8859-9" because of the i/I character... */
  setlocale (LC_ALL, "");
#endif

#ifdef MPFR_FPU_PREC
  set_fpu_prec ();
#endif

#ifdef MPFR_TEST_DIVBYZERO
  /* Define to test the use of MPFR_ERRDIVZERO */
  feclearexcept (FE_ALL_EXCEPT);
#endif

  tests_memory_start ();
  tests_rand_start ();
  tests_limit_start ();

  default_emin = mpfr_get_emin ();
  default_emax = mpfr_get_emax ();
}
Example #2
0
/* The various tests setups and final checks, collected up together. */
void
tests_start (void)
{
  /* don't buffer, so output is not lost if a test causes a segv etc */
  setbuf (stdout, NULL);
  setbuf (stderr, NULL);

  tests_memory_start ();
  tests_rand_start ();
}
Example #3
0
File: misc.c Project: Cl3Kener/gmp
/* The various tests setups and final checks, collected up together. */
void
tests_start (void)
{
  char version[10];
  snprintf (version, 10, "%u.%u.%u",
	    __GNU_MP_VERSION,
	    __GNU_MP_VERSION_MINOR,
	    __GNU_MP_VERSION_PATCHLEVEL);

  if (strcmp (gmp_version, version) != 0)
    {
      fprintf (stderr, "tests are not linked to the newly compiled library\n");
      fprintf (stderr, "  local version is: %s\n", version);
      fprintf (stderr, "  linked version is: %s\n", gmp_version);
      abort ();
    }

  /* don't buffer, so output is not lost if a test causes a segv etc */
  setbuf (stdout, NULL);
  setbuf (stderr, NULL);

  tests_memory_start ();
  tests_rand_start ();
}
Example #4
0
/* The various tests setups and final checks, collected up together. */
void
tests_start (void)
{
  tests_memory_start ();
  tests_rand_start ();
}