Commit 77401b95 authored by James Dinan's avatar James Dinan Committed by Wesley Bland
Browse files

Add dynamic err code, predefined err class test



Test for correct error class when a dynamic error code is created from a
predefined error class.
Signed-off-by: default avatarWesley Bland <wbland@anl.gov>
parent 422b06d2
......@@ -19,7 +19,8 @@ noinst_PROGRAMS = \
commcall \
errfatal \
predef_eh \
errstring2
errstring2 \
dynamic_errcode_predefined_errclass
EXTRA_PROGRAMS = errcode errring errstring
......
/*
* (C) 2006 by Argonne National Laboratory.
* See COPYRIGHT in top-level directory.
*
* Portions of this code were written by Intel Corporation.
* Copyright (C) 2011-2012 Intel Corporation. Intel provides this material
* to Argonne National Laboratory subject to Software Grant and Corporate
* Contributor License Agreement dated February 8, 2012.
*/
#include <stdio.h>
#include <mpi.h>
int main(int argc, char **argv) {
int errcode, errclass;
MPI_Init(&argc, &argv);
MPI_Add_error_code(MPI_ERR_ARG, &errcode);
MPI_Error_class(errcode, &errclass);
if (errclass != MPI_ERR_ARG) {
printf("ERROR: Got 0x%x, expected 0x%x\n", errclass, MPI_ERR_ARG);
} else {
printf( " No Errors\n" );
}
MPI_Finalize();
return 0;
}
......@@ -4,3 +4,4 @@ errfatal 1 resultTest=TestErrFatal
predef_eh 1
predef_eh 2
errstring2 1
dynamic_errcode_predefined_errclass 1
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment