Tweak to test suite function string construction.

Details:
- Fixed a minor bug in the way that the test suite would construct function
  name strings when the user anchored all parameters in input.operations.
  In this case, the test driver would mistake this situation for one where
  the operation simply had no parameters to begin with, and thus would not
  include the parameter string in the function string that is output for
  every result.
This commit is contained in:
Field G. Van Zee
2013-04-15 10:21:26 -05:00
parent ca9e435c57
commit d9948c541c

View File

@@ -1135,7 +1135,13 @@ void libblis_test_build_function_string( char* prefix_str,
{
sprintf( funcname_str, "%s_%c%s", prefix_str, dt_char, op_str );
if ( n_param_combos > 1 )
// We check the string length of pc_str in case the user is running an
// operation that has parameters (and thus generally more than one
// parameter combination), but has fixed all parameters in the input
// file, which would result in n_param_combos to equal one. This way,
// the function string contains the parameter string associated with
// the parameters that were fixed.
if ( n_param_combos > 1 || strlen(pc_str) > 0 )
sprintf( &funcname_str[strlen(funcname_str)], "_%s_%s", pc_str, sc_str );
else
sprintf( &funcname_str[strlen(funcname_str)], "_%s", sc_str );