summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorthevenyp <thevenyp@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2013-12-03 16:26:52 +0000
committerthevenyp <thevenyp@211d60ee-9f03-0410-a15a-8952a2c7a4e4>2013-12-03 16:26:52 +0000
commit2268f2db53962b4fe3e6b0bbad32ad6be554858f (patch)
treea58aa3f0d1f36aa53178348e39a3a8951160cb6b
parent1c6e329253bda0c571f47096025e77a8c03ff7b8 (diff)
downloadmpc-2268f2db53962b4fe3e6b0bbad32ad6be554858f.tar.gz
[tests/] Display an error message when support for a given type is missing.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpc/branches/benchs_tests@1373 211d60ee-9f03-0410-a15a-8952a2c7a4e4
-rw-r--r--tests/copy_parameter.c6
-rw-r--r--tests/read_line.c14
-rw-r--r--tests/tgeneric.tpl11
3 files changed, 30 insertions, 1 deletions
diff --git a/tests/copy_parameter.c b/tests/copy_parameter.c
index 096b209..ed03f4e 100644
--- a/tests/copy_parameter.c
+++ b/tests/copy_parameter.c
@@ -51,12 +51,16 @@ copy_parameter (mpc_fun_param_t *params, int index_dest, int index_src)
case NATIVE_LD:
/* TODO */
+ fprintf (stderr, "copy_parameter: type not implemented.\n");
+ exit (1);
break;
case NATIVE_DC:
case NATIVE_LDC:
#ifdef _Complex_I
/* TODO */
+ fprintf (stderr, "copy_parameter: type not implemented.\n");
+ exit (1);
#endif
break;
@@ -64,6 +68,8 @@ copy_parameter (mpc_fun_param_t *params, int index_dest, int index_src)
case NATIVE_UIM:
#ifdef _MPC_H_HAVE_INTMAX_T
/* TODO */
+ fprintf (stderr, "copy_parameter: type not implemented.\n");
+ exit (1);
#endif
break;
diff --git a/tests/read_line.c b/tests/read_line.c
index 4f58f4a..224b61d 100644
--- a/tests/read_line.c
+++ b/tests/read_line.c
@@ -39,12 +39,16 @@ read_param (mpc_datafile_context_t* datafile_context,
case NATIVE_D:
case NATIVE_LD:
/* TODO */
+ fprintf (stderr, "read_param: type not implemented.\n");
+ exit (1);
break;
case NATIVE_DC:
case NATIVE_LDC:
#ifdef _Complex_I
/* TODO */
+ fprintf (stderr, "read_param: type not implemented.\n");
+ exit (1);
#endif
break;
@@ -52,11 +56,15 @@ read_param (mpc_datafile_context_t* datafile_context,
case NATIVE_UIM:
#ifdef _MPC_H_HAVE_INTMAX_T
/* TODO */
+ fprintf (stderr, "read_param: type not implemented.\n");
+ exit (1);
#endif
break;
case NATIVE_STRING:
/* TODO */
+ fprintf (stderr, "read_param: type not implemented.\n");
+ exit (1);
break;
case GMP_Z:
@@ -66,6 +74,8 @@ read_param (mpc_datafile_context_t* datafile_context,
case GMP_Q:
case GMP_F:
/* TODO */
+ fprintf (stderr, "read_param: type not implemented.\n");
+ exit (1);
break;
case MPFR_INEX:
@@ -221,7 +231,9 @@ tpl_read_ternary (mpc_datafile_context_t* datafile_context, int* ternary)
break;
default:
printf ("Error: Unexpected ternary value '%c' in file '%s' line %lu\n",
- datafile_context->nextchar, datafile_context->pathname, datafile_context->line_number);
+ datafile_context->nextchar,
+ datafile_context->pathname,
+ datafile_context->line_number);
exit (1);
}
diff --git a/tests/tgeneric.tpl b/tests/tgeneric.tpl
index 1525abb..b470a53 100644
--- a/tests/tgeneric.tpl
+++ b/tests/tgeneric.tpl
@@ -261,20 +261,30 @@ random_params (mpc_fun_param_t *params,
case NATIVE_D: case NATIVE_LD:
case NATIVE_DC: case NATIVE_LDC:
/* TODO: draw random value */
+ fprintf (stderr, "random_params: type not implemented.\n");
+ exit (1);
break;
case NATIVE_IM: case NATIVE_UIM:
/* TODO: draw random value */
+ fprintf (stderr, "random_params: type not implemented.\n");
+ exit (1);
break;
case GMP_Z:
/* TODO: draw random value */
+ fprintf (stderr, "random_params: type not implemented.\n");
+ exit (1);
break;
case GMP_Q:
/* TODO: draw random value */
+ fprintf (stderr, "random_params: type not implemented.\n");
+ exit (1);
break;
case GMP_F:
/* TODO: draw random value */
+ fprintf (stderr, "random_params: type not implemented.\n");
+ exit (1);
break;
case MPFR:
@@ -300,6 +310,7 @@ random_params (mpc_fun_param_t *params,
case MPFR_INEX: case MPFR_RND:
case MPC_INEX: case MPC_RND:
/* unsupported types */
+ fprintf (stderr, "random_params: unsupported type.\n");
exit (1);
break;
}