Exemple #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);
  }
}
Exemple #2
0
int main( int argc , char ** argv) {
  const char * file = argv[1];
  
  test_existing_read( file );
  test_not_existing_read( );
  test_open_close_read( file );
  test_wrapper( file );
  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);
}