From f93445a02299ca7908c1d86f0612be2ce1a12fbb Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Wed, 8 Apr 2020 03:45:49 +0300 Subject: [PATCH] tests: cleanup look for assertions. Fix jump to failure in emacs/vim again --- cmd/tools/preludes/tests_assertions.v | 3 +-- cmd/tools/preludes/tests_with_stats.v | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/cmd/tools/preludes/tests_assertions.v b/cmd/tools/preludes/tests_assertions.v index 632bac72f4..ec901e96a7 100644 --- a/cmd/tools/preludes/tests_assertions.v +++ b/cmd/tools/preludes/tests_assertions.v @@ -21,8 +21,7 @@ fn cb_assertion_failed(filename string, line int, sourceline string, funcname st } final_filename := if use_relative_paths { filename } else { os.real_path(filename) } final_funcname := funcname.replace('main__', '').replace('__', '.') - eprintln('File : $final_filename:$line') - eprintln('Function: $final_funcname') + eprintln('$final_filename:$line: failed assert in ${final_funcname}') eprintln('Source : $sourceline') } diff --git a/cmd/tools/preludes/tests_with_stats.v b/cmd/tools/preludes/tests_with_stats.v index 3e0d2c17dc..40e629fc01 100644 --- a/cmd/tools/preludes/tests_with_stats.v +++ b/cmd/tools/preludes/tests_with_stats.v @@ -52,7 +52,7 @@ fn (b mut BenchedTests) testing_step_end() { // //////////////////////////////////////////////////////////////// if ok_diff == 0 && fail_diff == 0 { b.bench.neither_fail_nor_ok() - println(INNER_INDENT + b.bench.step_message_ok('NO asserts | ') + b.fn_name()) + println(INNER_INDENT + b.bench.step_message_ok(' NO asserts | ') + b.fn_name()) return } // ////////////////////////////////////////////////////////////////