Commits

Jeff Squyres committed 702a0f3

- Add numbered output.
- Fix the check against [2], not [3]. Now it works better.

  • Participants
  • Parent commits 9ceed9f

Comments (0)

Files changed (1)

ompi/mpi/fortran/tests/src/check_argv.c

 
    fstr = argv;
    ompi_fortran_string_f2c(fstr, len, &cstr);
-   printf("check_argv: len=%ld %s\n", strlen(cstr), cstr);
+   printf("check_argv 1: len=%ld %s\n", strlen(cstr), cstr);
 
    fstr += len;
    ompi_fortran_string_f2c(fstr, len, &cstr);
-   printf("check_argv: len=%ld %s\n", strlen(cstr), cstr);
+   printf("check_argv 2: len=%ld %s\n", strlen(cstr), cstr);
    fstr += len;
    ompi_fortran_string_f2c(fstr, len, &cstr);
-   printf("check_argv: len=%ld %s\n", strlen(cstr), cstr);
+   printf("check_argv 3: len=%ld %s\n", strlen(cstr), cstr);
 
    ompi_fortran_argv_f2c(argv, len, len, &c_argv);
 
-
 #ifdef DEBUG_PRINT
-   printf("check_argv: %s\n", c_argv[0]);
-   printf("check_argv: %s\n", c_argv[1]);
+   printf("check_argv 4: %s\n", c_argv[0]);
+   printf("check_argv 5: %s\n", c_argv[1]);
    if (c_argv[2] == NULL) printf("check_argv: is NULL terminated\n");
    else                   printf("check_argv: should be NULL: %s\n", c_argv[2]);
 #endif
    ompi_fortran_multiple_argvs_f2c(count, argvs, len, &c_argvs);
 
 #ifdef DEBUG_PRINT
-   printf("check_argvs: %s\n", c_argvs[0][0]);
-   printf("check_argvs: %s\n", c_argvs[0][1]);
-   printf("check_argvs: %s\n", c_argvs[1][0]);
-   printf("check_argvs: %s\n", c_argvs[1][1]);
-   if (c_argvs[0][3] == NULL) printf("check_argv: is NULL terminated\n");
-   else                       printf("check_argv: should be NULL: %s\n", c_argvs[0][3]);
-   if (c_argvs[0][3] == NULL) printf("check_argv: is NULL terminated\n");
-   else                       printf("check_argv: should be NULL: %s\n", c_argvs[0][3]);
+   printf("check_argvs 1: %s\n", c_argvs[0][0]);
+   printf("check_argvs 2: %s\n", c_argvs[0][1]);
+   printf("check_argvs 3: %s\n", c_argvs[1][0]);
+   printf("check_argvs 4: %s\n", c_argvs[1][1]);
+   if (c_argvs[0][2] == NULL) printf("check_argv 5: is NULL terminated\n");
+   else                       printf("check_argv 6: should be NULL: %s\n", c_argvs[0][2]);
+   if (c_argvs[1][2] == NULL) printf("check_argv 7: is NULL terminated\n");
+   else                       printf("check_argv 8: should be NULL: %s\n", c_argvs[1][2]);
 #endif
 
    if (strcmp(c_argvs[0][0], "cmd1_arg1") != 0) { printf("fail1\n"); return 1; }
    if (strcmp(c_argvs[1][0], "cmd2_arg1") != 0) { printf("fail3\n"); return 1; }
    if (strcmp(c_argvs[1][1], "cmd2_arg2") != 0) { printf("fail4\n"); return 1; }
 
-   if (c_argvs[0][3] != NULL)                   { printf("fail5\n"); return 1; }
-   if (c_argvs[1][3] != NULL)                   { printf("fail6\n"); return 1; }
+   if (c_argvs[0][2] != NULL)                   { printf("fail5\n"); return 1; }
+   if (c_argvs[1][2] != NULL)                   { printf("fail6\n"); return 1; }
 
    return 0;
 }