Esempio n. 1
0
int
main(int argc, char **argv) {
    int i;
    char testfile[NC_MAX_NAME + 1];

    sprintf(testfile, "%s/%s", TEMP_LARGE, FILE_NAME);

    printf("\n*** Testing fix for 3.6.2 large file bug in %s.\n",
	   testfile);
   /* Go thru formats and run all tests for each of two (for netCDF-3
    * only builds), or 4 (for netCDF-4 builds) different formats. */
    for (i = NC_FORMAT_CLASSIC; i <= NUM_FORMATS; i++)
    {
       nc_set_default_format(i, NULL);

       printf("*** testing format %d with a variable with 2**32 values...", i);
       test_big_var(testfile);
       (void) remove(testfile);
       SUMMARIZE_ERR;

       printf("*** testing format %d with a byte variable with > 2**32 values...", i);
       test_large_byte_var(testfile);
       (void) remove(testfile);
       SUMMARIZE_ERR;

       printf("*** testing format %d with a short variable with > 2**32 values...", i);
       test_large_short_var(testfile);
       (void) remove(testfile);
       SUMMARIZE_ERR;
    }

    /* Test CDF5 */
    {
      i = NC_64BIT_DATA;
      nc_set_default_format(i, NULL);

       printf("*** testing format %d with a variable with 2**32 values...", i);
       test_big_var(testfile);
       (void) remove(testfile);
       SUMMARIZE_ERR;

       printf("*** testing format %d with a byte variable with > 2**32 values...", i);
       test_large_byte_var(testfile);
       (void) remove(testfile);
       SUMMARIZE_ERR;

       printf("*** testing format %d with a short variable with > 2**32 values...", i);
       test_large_short_var(testfile);
       (void) remove(testfile);
       SUMMARIZE_ERR;

    }

    FINAL_RESULTS;
}
Esempio n. 2
0
int
main(int argc, char **argv) {
    int i;
    char testfile[NC_MAX_NAME + 1];

    printf("\n*** Testing multidimensional variable with more than 2**32 values\n");
    sprintf(testfile, "%s/%s", TEMP_LARGE, FILE_NAME);
    for (i = NC_FORMAT_CLASSIC; i <= NUM_FORMATS; i++)
    {
       printf("*** testing format %d file with short variable with > 2**32 values...", i);
       nc_set_default_format(i, NULL);
       if (test_big_var(testfile)) ERR_RET;
       (void) remove(testfile);
       SUMMARIZE_ERR;
   }

    FINAL_RESULTS;
}
Esempio n. 3
0
int
main(int argc, char **argv) {
    int i;
    char testfile[NC_MAX_NAME + 1];

    printf("\n*** Testing files with one very big variable.\n");
    sprintf(testfile, "%s/%s", TEMP_LARGE, FILE_NAME);
    for (i = NC_FORMAT_CLASSIC; i <= NUM_FORMATS; i++)
    {
       printf("*** testing format %d file with byte variable with > 2**32 values...", i);
       nc_set_default_format(i, NULL);
       test_big_var(testfile);
       (void) remove(testfile);
       SUMMARIZE_ERR;
   }
    
    FINAL_RESULTS;
}