Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions test/component/be.file/threading/entry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Purpose: Implementation file for the test.component.be.file.threading project.
*
* Created: 3rd July 2009
* Updated: 10th October 2026
* Updated: 12th October 2026
*
* ////////////////////////////////////////////////////////////////////// */

Expand Down Expand Up @@ -77,10 +77,10 @@

#ifdef PANTHEIOS_USE_WIDE_STRINGS

# define XTESTS_TEST_STRING_EQUAL XTESTS_TEST_WIDE_STRING_EQUAL
# define TEST_STRING_EQ TEST_WS_EQ
#else /* ? PANTHEIOS_USE_WIDE_STRINGS */

# define XTESTS_TEST_STRING_EQUAL XTESTS_TEST_MULTIBYTE_STRING_EQUAL
# define TEST_STRING_EQ TEST_MS_EQ
#endif /* PANTHEIOS_USE_WIDE_STRINGS */


Expand Down
60 changes: 30 additions & 30 deletions test/component/bec.fprintf/entry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Purpose: Implementation file for the test.component.bec.fprintf project.
*
* Created: 25th June 2020
* Updated: 10th October 2026
* Updated: 12th October 2026
*
* ////////////////////////////////////////////////////////////////////// */

Expand All @@ -21,7 +21,7 @@
#include <pantheios/backend.h>

/* xTests header files */
#include <xtests/xtests.h>
#include <xtests/terse-api.h>
#include <xtests/util/temp_file.hpp>

/* STLSoft header files */
Expand Down Expand Up @@ -54,10 +54,10 @@

#ifdef PANTHEIOS_USE_WIDE_STRINGS

# define XTESTS_TEST_STRING_EQUAL XTESTS_TEST_WIDE_STRING_EQUAL
# define TEST_STRING_EQ TEST_WS_EQ
#else /* ? PANTHEIOS_USE_WIDE_STRINGS */

# define XTESTS_TEST_STRING_EQUAL XTESTS_TEST_MULTIBYTE_STRING_EQUAL
# define TEST_STRING_EQ TEST_MS_EQ
#endif /* PANTHEIOS_USE_WIDE_STRINGS */

#define PAN_STR PANTHEIOS_LITERAL_STRING
Expand Down Expand Up @@ -201,7 +201,7 @@ namespace {

if (0 != r)
{
XTESTS_TEST_FAIL_WITH_QUALIFIER("could not initialise bec.fprintf", stlsoft::t2a(pantheios::getStockSeverityString(r)));
TEST_FAIL_WITH_QUALIFIER("could not initialise bec.fprintf", stlsoft::t2a(pantheios::getStockSeverityString(r)));

return std::make_pair(false, file_lines_t());
}
Expand All @@ -225,7 +225,7 @@ namespace {
{
char buffer[21];

XTESTS_TEST_FAIL_WITH_QUALIFIER("could not write to bec.fprintf", stlsoft::integer_to_decimal_string(&buffer[0], STLSOFT_NUM_ELEMENTS(buffer), r2));
TEST_FAIL_WITH_QUALIFIER("could not write to bec.fprintf", stlsoft::integer_to_decimal_string(&buffer[0], STLSOFT_NUM_ELEMENTS(buffer), r2));

return std::make_pair(false, file_lines_t());
}
Expand Down Expand Up @@ -257,8 +257,8 @@ static void test_NO_THREAD_ID_and_NO_DATETIME()
{
file_lines_t const& lines = r.second;

XTESTS_TEST_INTEGER_EQUAL(1u, lines.size());
XTESTS_TEST_MULTIBYTE_STRING_EQUAL(("[test.component.bec.fprintf; Notice]: some message"), lines[0]);
TEST_INT_EQ(1u, lines.size());
TEST_MS_EQ(("[test.component.bec.fprintf; Notice]: some message"), lines[0]);
}
}

Expand All @@ -276,8 +276,8 @@ static void test_NO_THREAD_ID_and_NO_DATETIME_and_NO_PROCESS_ID()
{
file_lines_t const& lines = r.second;

XTESTS_TEST_INTEGER_EQUAL(1u, lines.size());
XTESTS_TEST_MULTIBYTE_STRING_EQUAL(("[Notice]: some message"), lines[0]);
TEST_INT_EQ(1u, lines.size());
TEST_MS_EQ(("[Notice]: some message"), lines[0]);
}
}

Expand All @@ -295,8 +295,8 @@ static void test_NO_THREAD_ID_and_NO_DATETIME_and_NO_SEVERITY()
{
file_lines_t const& lines = r.second;

XTESTS_TEST_INTEGER_EQUAL(1u, lines.size());
XTESTS_TEST_MULTIBYTE_STRING_EQUAL(("[test.component.bec.fprintf]: some message"), lines[0]);
TEST_INT_EQ(1u, lines.size());
TEST_MS_EQ(("[test.component.bec.fprintf]: some message"), lines[0]);
}
}

Expand All @@ -314,8 +314,8 @@ static void test_NO_THREAD_ID_and_NO_DATETIME_and_NUMERIC_SEVERITY()
{
file_lines_t const& lines = r.second;

XTESTS_TEST_INTEGER_EQUAL(1u, lines.size());
XTESTS_TEST_MULTIBYTE_STRING_EQUAL(("[test.component.bec.fprintf; 5]: some message"), lines[0]);
TEST_INT_EQ(1u, lines.size());
TEST_MS_EQ(("[test.component.bec.fprintf; 5]: some message"), lines[0]);
}
}
#ifdef PANTHEIOS_HAS_SHWILD
Expand All @@ -333,14 +333,14 @@ static void test_USE_UNIX_FORMAT_and_NO_THREAD_ID()
{
file_lines_t const& lines = r.second;

XTESTS_TEST_INTEGER_EQUAL(1u, lines.size());
XTESTS_TEST_MULTIBYTE_STRING_MATCHES("\\[*\\]: *", lines[0]);
XTESTS_TEST_MULTIBYTE_STRING_MATCHES("*test.component.bec.fprintf,*", lines[0]);
XTESTS_TEST_MULTIBYTE_STRING_MATCHES("*" PATTERN_DATE_TIMEms "*", lines[0]);
XTESTS_TEST_MULTIBYTE_STRING_MATCHES("*Notice*", lines[0]);
XTESTS_TEST_MULTIBYTE_STRING_MATCHES("*test.component.bec.fprintf, " PATTERN_DATE_TIMEms "; Notice*", lines[0]);
XTESTS_TEST_MULTIBYTE_STRING_MATCHES("\\[test.component.bec.fprintf, " PATTERN_DATE_TIMEms "; Notice\\]: *", lines[0]);
XTESTS_TEST_MULTIBYTE_STRING_MATCHES("\\[test.component.bec.fprintf, " PATTERN_DATE_TIMEms "; Notice\\]: some message", lines[0]);
TEST_INT_EQ(1u, lines.size());
TEST_MS_MATCHES("\\[*\\]: *", lines[0]);
TEST_MS_MATCHES("*test.component.bec.fprintf,*", lines[0]);
TEST_MS_MATCHES("*" PATTERN_DATE_TIMEms "*", lines[0]);
TEST_MS_MATCHES("*Notice*", lines[0]);
TEST_MS_MATCHES("*test.component.bec.fprintf, " PATTERN_DATE_TIMEms "; Notice*", lines[0]);
TEST_MS_MATCHES("\\[test.component.bec.fprintf, " PATTERN_DATE_TIMEms "; Notice\\]: *", lines[0]);
TEST_MS_MATCHES("\\[test.component.bec.fprintf, " PATTERN_DATE_TIMEms "; Notice\\]: some message", lines[0]);
}
}

Expand All @@ -358,14 +358,14 @@ static void test_USE_UNIX_FORMAT_and_NO_THREAD_ID_and_HIGH_RESOLUTION()
{
file_lines_t const& lines = r.second;

XTESTS_TEST_INTEGER_EQUAL(1u, lines.size());
XTESTS_TEST_MULTIBYTE_STRING_MATCHES("\\[*\\]: *", lines[0]);
XTESTS_TEST_MULTIBYTE_STRING_MATCHES("*test.component.bec.fprintf,*", lines[0]);
XTESTS_TEST_MULTIBYTE_STRING_MATCHES("*" PATTERN_DATE_TIMEus "*", lines[0]);
XTESTS_TEST_MULTIBYTE_STRING_MATCHES("*Notice*", lines[0]);
XTESTS_TEST_MULTIBYTE_STRING_MATCHES("*test.component.bec.fprintf, " PATTERN_DATE_TIMEus "; Notice*", lines[0]);
XTESTS_TEST_MULTIBYTE_STRING_MATCHES("\\[test.component.bec.fprintf, " PATTERN_DATE_TIMEus "; Notice\\]: *", lines[0]);
XTESTS_TEST_MULTIBYTE_STRING_MATCHES("\\[test.component.bec.fprintf, " PATTERN_DATE_TIMEus "; Notice\\]: some message", lines[0]);
TEST_INT_EQ(1u, lines.size());
TEST_MS_MATCHES("\\[*\\]: *", lines[0]);
TEST_MS_MATCHES("*test.component.bec.fprintf,*", lines[0]);
TEST_MS_MATCHES("*" PATTERN_DATE_TIMEus "*", lines[0]);
TEST_MS_MATCHES("*Notice*", lines[0]);
TEST_MS_MATCHES("*test.component.bec.fprintf, " PATTERN_DATE_TIMEus "; Notice*", lines[0]);
TEST_MS_MATCHES("\\[test.component.bec.fprintf, " PATTERN_DATE_TIMEus "; Notice\\]: *", lines[0]);
TEST_MS_MATCHES("\\[test.component.bec.fprintf, " PATTERN_DATE_TIMEus "; Notice\\]: some message", lines[0]);
}
}
#endif /* PANTHEIOS_HAS_SHWILD */
Expand Down
48 changes: 24 additions & 24 deletions test/component/core/getProcessIdentity/entry.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Purpose: Implementation file for the test.component.core.getProcessIdentity project.
*
* Created: 6th August 2012
* Updated: 10th October 2026
* Updated: 12th October 2026
*
* ////////////////////////////////////////////////////////////////////// */

Expand All @@ -21,7 +21,7 @@
*/

/* xTests header files */
#include <xtests/xtests.h>
#include <xtests/terse-api.h>

/* STLSoft header files */
#include <stlsoft/stlsoft.h>
Expand Down Expand Up @@ -72,10 +72,10 @@ int main(int argc, char **argv)
#define PSTR PANTHEIOS_LITERAL_STRING
#ifdef PANTHEIOS_USE_WIDE_STRINGS

# define XTESTS_TEST_STRING_EQUAL XTESTS_TEST_WIDE_STRING_EQUAL
# define TEST_STRING_EQ TEST_WS_EQ
#else /* ? PANTHEIOS_USE_WIDE_STRINGS */

# define XTESTS_TEST_STRING_EQUAL XTESTS_TEST_MULTIBYTE_STRING_EQUAL
# define TEST_STRING_EQ TEST_MS_EQ
#endif /* PANTHEIOS_USE_WIDE_STRINGS */


Expand Down Expand Up @@ -182,26 +182,26 @@ static void test_1_0(void)

r = pantheios_init();

XTESTS_TEST_INTEGER_EQUAL(1, s_numGPI);
TEST_INT_EQ(1, s_numGPI);

if (r < 0)
{
XTESTS_FAIL("could not initialise libraries");
TEST_FAIL("could not initialise libraries");
}
else
{
XTESTS_TEST_INTEGER_EQUAL(1, s_numInits);
XTESTS_TEST_INTEGER_EQUAL(0, s_numUninits);
XTESTS_TEST_INTEGER_EQUAL(1, s_numGPI);
TEST_INT_EQ(1, s_numInits);
TEST_INT_EQ(0, s_numUninits);
TEST_INT_EQ(1, s_numGPI);

XTESTS_TEST_STRING_EQUAL(PANTHEIOS_LITERAL_STRING("test_1_0"), pantheios_getProcessIdentity());
XTESTS_TEST_POINTER_NOT_EQUAL(pi, pantheios_getProcessIdentity());
TEST_STRING_EQ(PANTHEIOS_LITERAL_STRING("test_1_0"), pantheios_getProcessIdentity());
TEST_PTR_NE(pi, pantheios_getProcessIdentity());

pantheios_uninit();

XTESTS_TEST_INTEGER_EQUAL(1, s_numInits);
XTESTS_TEST_INTEGER_EQUAL(1, s_numUninits);
XTESTS_TEST_INTEGER_EQUAL(1, s_numGPI);
TEST_INT_EQ(1, s_numInits);
TEST_INT_EQ(1, s_numUninits);
TEST_INT_EQ(1, s_numGPI);
}
}

Expand All @@ -215,26 +215,26 @@ static void test_1_1(void)

r = pantheios_init();

XTESTS_TEST_INTEGER_EQUAL(2, s_numGPI);
TEST_INT_EQ(2, s_numGPI);

if (r < 0)
{
XTESTS_FAIL("could not initialise libraries");
TEST_FAIL("could not initialise libraries");
}
else
{
XTESTS_TEST_INTEGER_EQUAL(1, s_numInits);
XTESTS_TEST_INTEGER_EQUAL(0, s_numUninits);
XTESTS_TEST_INTEGER_EQUAL(2, s_numGPI);
TEST_INT_EQ(1, s_numInits);
TEST_INT_EQ(0, s_numUninits);
TEST_INT_EQ(2, s_numGPI);

XTESTS_TEST_STRING_EQUAL(PANTHEIOS_LITERAL_STRING("test_1_1"), pantheios_getProcessIdentity());
XTESTS_TEST_POINTER_EQUAL(pi, pantheios_getProcessIdentity());
TEST_STRING_EQ(PANTHEIOS_LITERAL_STRING("test_1_1"), pantheios_getProcessIdentity());
TEST_PTR_EQ(pi, pantheios_getProcessIdentity());

pantheios_uninit();

XTESTS_TEST_INTEGER_EQUAL(1, s_numInits);
XTESTS_TEST_INTEGER_EQUAL(1, s_numUninits);
XTESTS_TEST_INTEGER_EQUAL(4, s_numGPI);
TEST_INT_EQ(1, s_numInits);
TEST_INT_EQ(1, s_numUninits);
TEST_INT_EQ(4, s_numGPI);
}
}

Expand Down
Loading
Loading