diff options
-rw-r--r-- | build2/parser.cxx | 7 | ||||
-rw-r--r-- | tests/directive/assert.testscript | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/build2/parser.cxx b/build2/parser.cxx index c26f0a5..731ef46 100644 --- a/build2/parser.cxx +++ b/build2/parser.cxx @@ -1979,10 +1979,11 @@ namespace build2 : names ()); diag_record dr (fail (al)); - dr << "assertion failed"; - if (!ns.empty ()) - dr << ": " << ns; + if (ns.empty ()) + dr << "assertion failed"; + else + dr << ns; } void parser:: diff --git a/tests/directive/assert.testscript b/tests/directive/assert.testscript index ffe6aa0..2a3f99e 100644 --- a/tests/directive/assert.testscript +++ b/tests/directive/assert.testscript @@ -18,7 +18,7 @@ EOE : false-desc : $* <'assert false bad thing happened: (a == b)' 2>>EOE != 0 -<stdin>:1:1: error: assertion failed: bad thing happened: false +<stdin>:1:1: error: bad thing happened: false EOE : invalid |