summaryrefslogtreecommitdiffstats
path: root/tests/tuktest.h
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-15 09:41:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-15 09:41:34 +0000
commitcf178685aca107aa37c748de11da01562e78c46c (patch)
tree84d60b39c1744edcbdd4dbfc5026583914432dba /tests/tuktest.h
parentAdding upstream version 5.6.1+really5.4.5. (diff)
downloadxz-utils-upstream.tar.xz
xz-utils-upstream.zip
Adding upstream version 5.6.2.upstream/5.6.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--tests/tuktest.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/tuktest.h b/tests/tuktest.h
index 508eace..12abd53 100644
--- a/tests/tuktest.h
+++ b/tests/tuktest.h
@@ -1,10 +1,13 @@
+// SPDX-License-Identifier: 0BSD
+
///////////////////////////////////////////////////////////////////////////////
//
/// \file tuktest.h
/// \brief Helper macros for writing simple test programs
-/// \version 2023-01-08
+/// \version 2024-02-14
///
-/// Some inspiration was taken from STest by Keith Nicholas.
+/// Some inspiration was taken from Seatest by Keith Nicholas and
+/// from STest which is a fork of Seatest by Jia Tan.
///
/// This is standard C99/C11 only and thus should be fairly portable
/// outside POSIX systems too.
@@ -110,8 +113,8 @@
/// Meson: https://mesonbuild.com/Unit-tests.html
///
/// CMake handles passing and failing tests by default but treats hard
-/// errors as regular fails. To CMake support skipped tests correctly,
-/// one has to set the SKIP_RETURN_CODE property for each test:
+/// errors as regular fails. To make CMake support skipped tests
+/// correctly, one has to set the SKIP_RETURN_CODE property for each test:
///
/// set_tests_properties(foo_test_name PROPERTIES SKIP_RETURN_CODE 77)
///
@@ -121,9 +124,6 @@
//
// Author: Lasse Collin
//
-// This file has been put into the public domain.
-// You can do whatever you want with this file.
-//
///////////////////////////////////////////////////////////////////////////////
#ifndef TUKTEST_H
@@ -155,14 +155,14 @@
// This is silencing warnings about unused functions. Not all test programs
// need all functions from this header.
-#if TUKTEST_GNUC_REQ(3, 0)
+#if TUKTEST_GNUC_REQ(3, 0) || defined(__clang__)
# define tuktest_maybe_unused __attribute__((__unused__))
#else
# define tuktest_maybe_unused
#endif
// We need printf("") so silence the warning about empty format string.
-#if TUKTEST_GNUC_REQ(4, 2)
+#if TUKTEST_GNUC_REQ(4, 2) || defined(__clang__)
# pragma GCC diagnostic ignored "-Wformat-zero-length"
#endif