1 /* -*- Mode: C; c-basic-offset:4 ; indent-tabs-mode:nil ; -*- */
3 * (C) 2001 by Argonne National Laboratory.
4 * See COPYRIGHT in top-level directory.
7 /* Test code provided by Hajime Fujita. See Trac ticket #2225. */
14 int main(int argc, char *argv[])
17 const char *key = "key", *val = "val";
18 char buff[3 + 1]; /* strlen("val") + 1 */
21 MTest_Init(&argc, &argv);
23 MPI_Info_create(&info);
24 MPI_Info_set(info, (char*)key, (char*)val);
25 MPI_Info_get(info, (char*)key, sizeof(buff) - 1, buff, &flag);
27 if (strncmp(buff, val, sizeof(buff) - 1) != 0) {
29 printf("returned value is %s, should be %s\n", buff, val);
34 printf("key not found\n");