home *** CD-ROM | disk | FTP | other *** search
-
- /******************************************************
- *
- * Testing existence of global variable DFerror.
- *
- * Note: "textfile" should not exist; otherwise no error is reported.
- * The error code reported should be -1.
- *
- *******************************************************/
- extern int DFerror;
- main()
- {
- int ret, rank, sizes[3];
-
- ret = DFSDgetdims("textfile", &rank, sizes,3);
- printf("\n\treturn value = %d\n\tDFerror = %d\n\n", ret, DFerror);
-
- if (ret < 0 && DFerror == -1)
- printf("Test of error reporting successful !\n");
- else {
- printf("Test of error reporting unsuccessful !\n");
- printf("Return value should be < 0; DFerror should be -1\n");
- }
- }
-