summaryrefslogtreecommitdiffstats
path: root/testsuites/psxtests/psxmmap01/test_helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'testsuites/psxtests/psxmmap01/test_helper.c')
-rw-r--r--testsuites/psxtests/psxmmap01/test_helper.c32
1 files changed, 32 insertions, 0 deletions
diff --git a/testsuites/psxtests/psxmmap01/test_helper.c b/testsuites/psxtests/psxmmap01/test_helper.c
new file mode 100644
index 0000000000..cab8e9138b
--- /dev/null
+++ b/testsuites/psxtests/psxmmap01/test_helper.c
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2017 Kevin Kirspel.
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "test_helper.h"
+
+#include <stdio.h>
+#include <stdarg.h>
+
+void fail_check(
+ const char *file,
+ const size_t line,
+ const char *fmt,
+ ...
+)
+{
+ va_list ap;
+
+ printf( "%s: %d: ", file, line );
+
+ va_start(ap, fmt);
+ vprintf(fmt, ap);
+ va_end(ap);
+}