aboutsummaryrefslogtreecommitdiff
path: root/dejagnu.h
diff options
context:
space:
mode:
Diffstat (limited to 'dejagnu.h')
-rw-r--r--dejagnu.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/dejagnu.h b/dejagnu.h
index 282b072..140e3e9 100644
--- a/dejagnu.h
+++ b/dejagnu.h
@@ -177,6 +177,34 @@ note (const char* fmt, ...)
}
static inline void
+DG_error (const char* fmt, ...)
+{
+ va_list ap;
+
+ DG__init ();
+
+ flockfile (stdout);
+ fputs ("\tERROR: ", stdout);
+ va_start (ap, fmt); vfprintf (stdout, fmt, ap); va_end (ap);
+ fputc ('\n', stdout);
+ funlockfile (stdout);
+}
+
+static inline void
+DG_warning (const char* fmt, ...)
+{
+ va_list ap;
+
+ DG__init ();
+
+ flockfile (stdout);
+ fputs ("\tWARNING: ", stdout);
+ va_start (ap, fmt); vfprintf (stdout, fmt, ap); va_end (ap);
+ fputc ('\n', stdout);
+ funlockfile (stdout);
+}
+
+static inline void
totals (void)
{
printf ("\nTotals:\n");
@@ -316,6 +344,16 @@ class TestState {
std::cout << "\t" << "NOTE: " << s << std::endl;
}
+ void error (std::string s)
+ {
+ std::cout << "\t" << "ERROR: " << s << std::endl;
+ }
+
+ void warning (std::string s)
+ {
+ std::cout << "\t" << "WARNING: " << s << std::endl;
+ }
+
void totals (void)
{
std::cout << std::endl << "Totals:" << std::endl;