summaryrefslogtreecommitdiff
path: root/test/munit.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/munit.c')
-rw-r--r--test/munit.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/munit.c b/test/munit.c
index 2500018..43e8e13 100644
--- a/test/munit.c
+++ b/test/munit.c
@@ -171,6 +171,9 @@ munit_logf_exv(MunitLogLevel level, FILE* fp, const char* filename, int line, co
if (level < munit_log_level_visible)
return;
+ if (filename != NULL)
+ fprintf(fp, "%s:%d: ", filename, line);
+
switch (level) {
case MUNIT_LOG_DEBUG:
fputs("Debug", fp);
@@ -190,8 +193,6 @@ munit_logf_exv(MunitLogLevel level, FILE* fp, const char* filename, int line, co
}
fputs(": ", fp);
- if (filename != NULL)
- fprintf(fp, "%s:%d: ", filename, line);
vfprintf(fp, format, ap);
fputc('\n', fp);
}