}
/*--------------------------------------------------------------------*//*!
- * \brief Write a message to output log
- * \param log qpTestLog instance
- * \param format Format string of message
- * \param ... Parameters for message
- * \return true if ok, false otherwise
- *//*--------------------------------------------------------------------*/
-deBool qpTestLog_writeMessage (qpTestLog* log, const char* format, ...)
-{
- char buffer[1024];
- va_list args;
-
- /* \todo [petri] Handle buffer overflows! */
-
- va_start(args, format);
- buffer[DE_LENGTH_OF_ARRAY(buffer) - 1] = 0;
- vsnprintf(buffer, sizeof(buffer), format, args);
- va_end(args);
-
- printf("%s\n", buffer);
-
- /* <Text>text</Text> */
- return qpTestLog_writeKeyValuePair(log, "Text", DE_NULL, DE_NULL, DE_NULL, QP_KEY_TAG_LAST, buffer);
-}
-
-/*--------------------------------------------------------------------*//*!
* \brief Write key-value-pair into log
* \param log qpTestLog instance
* \param name Unique identifier for entry
char tmpString[64];
int64ToString(value, tmpString);
- printf("%s = %lld %s\n", description, (signed long long)value, unit ? unit : "");
-
/* <Number Name="name" Description="description" Tag="Performance">15</Number> */
return qpTestLog_writeKeyValuePair(log, "Number", name, description, unit, tag, tmpString);
}
char tmpString[64];
floatToString(value, tmpString, sizeof(tmpString));
- printf("%s = %f %s\n", description, value, unit ? unit : "");
-
/* <Number Name="name" Description="description" Tag="Performance">15</Number> */
return qpTestLog_writeKeyValuePair(log, "Number", name, description, unit, tag, tmpString);
}
deBool qpTestLog_endCase (qpTestLog* log, qpTestResult result, const char* description);
deBool qpTestLog_terminateCase (qpTestLog* log, qpTestResult result);
-deBool qpTestLog_writeMessage (qpTestLog* log, const char* format, ...) DE_PRINTF_FUNC_ATTR(2,3);
deBool qpTestLog_startSection (qpTestLog* log, const char* name, const char* description);
deBool qpTestLog_endSection (qpTestLog* log);
deBool qpTestLog_writeText (qpTestLog* log, const char* name, const char* description, qpKeyValueTag tag, const char* value);