コード例 #1
0
ファイル: lib_syscon.c プロジェクト: Jakobularius/PHCpack
void test_standard_container ( void )
{
   int n,fail,*d;
   double *c;

   fail = syscon_read_system();
   fail = syscon_write_system();
   fail = syscon_number_of_polynomials(&n);

   test_symbol_table();

   printf("\nThe dimension of the system : %d\n",n);
   {
      LIST *p[n];
      int i;

      test_retrievals(n,p);

      fail = syscon_clear_system();

      for(i=0; i<n; i++)
      {
         printf("The terms in polynomial %d : \n", i+1);
         write_monomial_list(p[i],n);
      }

      test_additions(n,p);
   }
}
コード例 #2
0
ファイル: ts_use_solcon.c プロジェクト: Iamthewood/PHCpack
void test_standard_solution_container ( void )
{
   int k,len,n,fail;
   double *c;
   LIST *l;

   fail = _ada_use_solcon(0,&k,&k,c);          /* read solution list */
   printf("The solution list :\n");
   fail = _ada_use_solcon(1,&k,&k,c);          /* print list to screen */
   fail = _ada_use_solcon(2,&k,&len,c);        /* get length of list */
   printf("Number of solutions : %d\n",len);
   /* get the dimension of the solutions in the container */
   fail = _ada_use_solcon(3,&k,&n,c);          /* get the dimension */
   printf("Dimension of vectors : %d\n",n);
   test_standard_solution_strings(len,n);
   /* test retrievals of solutions */
   test_solution_retrieval(n);
   test_replace_solution(n);
   l = test_retrievals(len,n);
   printf("The solution list is reverse order : \n");
   write_solutions(l,n);
   fail = _ada_use_solcon(7,&k,&k,c);          /* clear the container */
   test_additions(n,l);                        /* reconstruct */
   printf("The reconstructed list in reverse order :\n");
   fail = _ada_use_solcon(1,&k,&k,c); 
}
コード例 #3
0
void unit_tests()
{
    test_buffer();
    test_additions();
    test_copy_constructor();
    test_iteration();
    test_rw_aggr_buf();
    test_non_contiguous();
}
コード例 #4
0
int main(void) {
  init_dep_table(&table, 0);

  printf("--- Initial table: size 0 ---\n");
  print_dep_table(&table);

  test_additions(&table, 50);
  printf("\n--- After 50 additions ---\n");
  print_dep_table(&table);

  reset_dep_table(&table);
  printf("\n--- After reset ---\n");
  print_dep_table(&table);

  test_additions(&table, 3000);
  printf("\n--- After 3000 additions ---\n");
  print_dep_table(&table);

  delete_dep_table(&table);

  return 0;
}