Beispiel #1
0
int main( int argc , char ** argv) {
  util_install_signals();
  {
    const char * file = argv[1];

    test_fortio_is_instance( file );
    test_fortio_safe_cast( file );
    test_assert_util_abort("fortio_safe_cast", test_fortio_unsafe_cast, NULL);
    test_existing_read( file );
    test_not_existing_read( );
    test_open_close_read( file );
    test_wrapper( file );
    test_fread_truncated_head();
    test_fread_truncated_data();
    test_fread_truncated_tail();
    test_fread_invalid_tail();
    test_fseek();
    test_at_eof();

    test_write( "/tmp/path/does/not/exist" , false );
    {
      test_work_area_type * work_area = test_work_area_alloc("ecl_fortio.write" );
      util_make_path("path");
      test_write( "path/file.x" , true );
      test_work_area_free( work_area );
    }

    exit(0);
  }
}
int main(int argc , char ** argv) {
  util_install_signals();
  {
    ecl_grid_type * grid = ecl_grid_alloc( argv[1] );
    vector_type * expected = load_expected( grid, argv[2] );

    for (int c=0; c < vector_get_size( expected ); c++) {
      const point_type * p = vector_iget_const( expected , c );
      int g = ecl_grid_get_global_index_from_xyz(grid , p->x, p->y , p->z , 0 );
      if (g != ecl_grid_get_global_index3(grid, p->i,p->j, p->k)) {
        int i,j,k;
        ecl_grid_get_ijk1(grid, g, &i, &j, &k);
        fprintf(stderr,"point:%d   (%g,%g,%g), Simulated: %d:(%d,%d,%d)   Expected: %d:(%d,%d,%d)  contains:%d\n",
                c , p->x, p->y, p->z, g, i,j,k, p->g, p->i, p->j, p->k, ecl_grid_cell_contains_xyz1( grid, p->g , p->x , p->y, p->z));
      }
      if (!p->skip)
        test_assert_int_equal( g , ecl_grid_get_global_index3(grid, p->i,p->j, p->k));
      else {
        if ( g != ecl_grid_get_global_index3(grid, p->i,p->j, p->k))
          fprintf(stderr," ** Skipping failed test for point:%d \n",c);
      }
    }
    ecl_grid_free( grid );
    vector_free( expected );
  }
  exit(0);
}
Beispiel #3
0
int main( int argc , char ** argv) {
    const char * config_file = argv[1];
    util_install_signals();
    ert_test_context_type * test_context = ert_test_context_alloc("GENDATA" , config_file , NULL );
    enkf_main_type * enkf_main = ert_test_context_get_main( test_context );

    test_gendata( enkf_main , "GEN_TIMESHIFT" , 60);

    ert_test_context_free( test_context );
    exit(0);
}
Beispiel #4
0
int main(int argc , char ** argv) {
  util_install_signals();
  {
    const char * config_file = argv[1];
    config_parser_type * config = config_create_schema();
    
    test_define( config , config_file );
    
    config_free( config );
    exit(0);
  }
}
Beispiel #5
0
int main(int argc , char ** argv) {
  util_install_signals();
  {
    const char * config_file = argv[1];
    ert_test_context_type * test_context = ert_test_context_alloc( "ENKF_OBS_FS" , config_file );
    {
      testS( test_context );
      test_iget( test_context );
      test_container( test_context );
    }
    ert_test_context_free( test_context );
    exit(0);
  }
}
Beispiel #6
0
int main(int argc , char ** argv) {
  util_install_signals( );
  test_create_empty( );
  test_create_simple( );
}
Beispiel #7
0
int main( int argc , char ** argv) {
  util_install_signals();
  test_create();
  test_queue_index();
  test_path_does_not_exist();
}
Beispiel #8
0
int main( int argc , char ** argv) {
  util_install_signals();
  test_create();
  test_add_job();
}