Exemplo n.º 1
0
int
main(int argc, char **argv)
{
	test_prepare();
	test_allow();

	test_0();
	getchar();
#if 1
	test_allowed_read();
	getchar();
	test_allowed_write();
	getchar();
	test_destroy();

	test_prepare();
	test_allow();
	test_0();
	getchar();
#endif
	test_not_allowed_read();
	getchar();
	test_not_allowed_write();
	getchar();

	test_destroy();

	return (0);
}
Exemplo n.º 2
0
int 
main()
 {
  flint_randinit(st);
  fmpz_init_set_ui( two__64, UWORD(1)<<32 ); 
  fmpz_mul( two__64, two__64, two__64 );
  int i;
  test_0( WORD(0) );
  for(i=100;i--;)
   test_0( R() );
  fmpz_clear(two__64);
  flint_printf("Test passed\n");
  return 0;
 }
int main ()
{
    test_0 ();
    test_1 ();

    return 0;
}
Exemplo n.º 4
0
int main(int argc,
         char **argv)
{
    auto r_0 = gsl_setup_rng(atoi(argv[2]));
    const vector<double> u_0 = gsl_runif(atoi(argv[1]), r_0);
    for (int i = 0; i < 4; i++) {
        test_0(u_0, i);
    }
    return 0;
}
Exemplo n.º 5
0
int main(int argc, char** argv)
{
    if (argc == 2)
    {
        test_0(argv[1]);
        return 0;
    }

    test_1();
    test_2();
    test_3();
    test_4();
    test_5();

    return 0;
}
Exemplo n.º 6
0
static int
run_test (int, char*[])
{
#ifndef NDEBUG

    // silence stderr output from invocations of the RW_ASSERT() macro
    // that are expected to fail by design (i.e., that's what this test
    // exercises)
    fclose (stderr);

    test_0 ();
    test_1 ();
    test_2 ();
    test_3 ();

#else   // if defined (NDEBUG)

    rw_assert (0, 0, __LINE__, "macro NDEBUG #defined, cannot test");

#endif   // NDEBUG

    return exit_status;

}
Exemplo n.º 7
0
Arquivo: testcfg.c Projeto: 8l/rose
/* The main testfunction. Returns 0 if any error is found in the cfg */
int kfg_testit (KFG kfg, int quiet_mode)
{
  cfg           = kfg;
  quiet         = (quiet_mode == 1);
  error_found   = 0;

  diagnostic ("Consistency test of cfg and PAG-interface ");

  /* do the tests */
  if (0 != kfg_num_nodes (cfg))
    {
      if (error_found < 100) test_1 ();
      if (error_found < 100) test_2 ();
      if (error_found < 100) test_3 ();
      if (error_found < 100) test_4 ();
      if (error_found < 100) test_5 ();
      if (error_found < 100) test_6 ();
      if (error_found < 100) test_7 ();
      if (error_found < 100) test_8 ();
      if (error_found < 100) test_9 ();
      if (error_found < 100) test_10 ();
      if (error_found < 100) test_11 ();
      if (error_found < 100) test_12 ();
      if (error_found < 100) test_13 ();
    }

  /* tests for empty cfg's */
  else test_0 ();

  if (error_found == 0)
    diagnostic (" excellent!\n");
  else
    diagnostic (" ** errors found **\n");

  return (error_found == 0);
}
Exemplo n.º 8
0
int main(int argc, char *argv[])
{
    test_0();
    return 0;
}
Exemplo n.º 9
0
int main(int argc, char *argv[])
{
    test_0(atoi(argv[1])); 
    return 0;
}