[segyio] 260/376: Accept empty assert message in unittest.h

Jørgen Kvalsvik jokva-guest at moszumanska.debian.org
Wed Sep 20 08:04:41 UTC 2017


This is an automated email from the git hooks/post-receive script.

jokva-guest pushed a commit to branch debian
in repository segyio.

commit 93ad769a67790d500bd20f77f24d32aaf3689479
Author: Jørgen Kvalsvik <jokva at statoil.com>
Date:   Wed Mar 29 13:43:36 2017 +0200

    Accept empty assert message in unittest.h
    
    Passing empty messages is supported, but won't any longer generate a
    default message - this behaviour is reserved for NULL arguments.
---
 lib/test/unittest.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/test/unittest.h b/lib/test/unittest.h
index 1ee1745..4a45fd0 100644
--- a/lib/test/unittest.h
+++ b/lib/test/unittest.h
@@ -20,7 +20,7 @@ static void testAssertionFailed(const char *message, const char *file, int line)
 
 static void testAssertTrue(bool value, const char *message, const char *file, int line) {
     if (!value) {
-        if (message && strlen(message) == 0) {
+        if (!message) {
             message = "The expression did not evaluate to true!";
         }
         testAssertionFailed(message, file, line);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/segyio.git



More information about the debian-science-commits mailing list