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
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* CMake — minimum version **3.20**; **BUILD_TESTING** option; project homepage URL; patch/revision version regex;
* Project boilerplate — **.gitattributes**, **.vimrc**, **.vscode/settings.json**;
* **test.unit.versions** — aligned with **1.11.1-rc5** (**_STLSOFT_VER_1_11_1_RC5**);
* All unit/component test assertions use xTests Terse API;


## 1.11.1-rc4 - 29th July 2026
Expand Down
3 changes: 2 additions & 1 deletion TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@

### 1.11.1

* [x] ~~~CI: exercise **MFCSTL** on a Windows cell (drop / gate `CMAKE_DISABLE_FIND_PACKAGE_MFC`; confirm MSVC+MFC on the runner)~~~ - ✅;
* [x] ~~~ACESTL: implement `invoke_ACE_OS_snprintf` in terms of `stlsoft_C_snprintf()`~~~ - ✅;
* [x] ~~~CI: exercise **ATLSTL** on a Windows cell~~~ - ✅;
* [x] ~~~CI: exercise **MFCSTL** on a Windows cell (drop / gate `CMAKE_DISABLE_FIND_PACKAGE_MFC`; confirm MSVC+MFC on the runner)~~~ - ✅;
* [x] ~~~Unit/component tests — adopt **xTests** terse API throughout~~~;
* [ ] Remove **WTL**;
* [ ] Resolve finally the structure and semantics of the top-level execution scripts (**run_all_unit_tests.sh**, **run_all_scratch_tests.sh**, **run_all_examples.sh**, **execute_performance_tests.sh**, and Windows `.cmd` counterparts) on all platforms — discovery globs, execute-bit / artifact restore, zero-match failure, verbosity, and CI wiring;
* [ ] bring in some essential unit-tests from interal repo;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Purpose: Unit-tests for `inetstl::environment_variable`.
*
* Created: 21st February 2025
* Updated: 23rd August 2025
* Updated: 9th August 2026
*
* ////////////////////////////////////////////////////////////////////// */

Expand All @@ -22,6 +22,7 @@
*/

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

/* STLSoft header files */
Expand Down Expand Up @@ -104,7 +105,7 @@ static void TEST_INSUFFICIENT_SPACE()
TEST_INT_EQ(-1, r);
TEST_INT_EQ(EINVAL, errno);
TEST_INT_EQ(0, cb_actual);
XTESTS_TEST_CHARACTER_EQUAL('~', buff[0]);
TEST_CHAR_EQ('~', buff[0]);
}

{
Expand All @@ -123,7 +124,7 @@ static void TEST_INSUFFICIENT_SPACE()
TEST_INT_EQ(-1, r);
TEST_INT_EQ(EINVAL, errno);
TEST_INT_EQ(0, cb_actual);
XTESTS_TEST_CHARACTER_EQUAL('~', buff[0]);
TEST_CHAR_EQ('~', buff[0]);
}
}

Expand All @@ -145,9 +146,9 @@ static void TEST_EMPTY_path()
TEST_INT_EQ(0, r);
TEST_INT_EQ(0, errno);
TEST_INT_EQ(3, cb_actual);
XTESTS_TEST_CHARACTER_NOT_EQUAL('1', buff[0]);
XTESTS_TEST_CHARACTER_NOT_EQUAL('2', buff[1]);
XTESTS_TEST_CHARACTER_NOT_EQUAL('3', buff[2]);
TEST_CHAR_NE('1', buff[0]);
TEST_CHAR_NE('2', buff[1]);
TEST_CHAR_NE('3', buff[2]);
}

{
Expand All @@ -166,9 +167,9 @@ static void TEST_EMPTY_path()
TEST_INT_EQ(0, r);
TEST_INT_EQ(0, errno);
TEST_INT_EQ(3, cb_actual);
XTESTS_TEST_CHARACTER_NOT_EQUAL('1', buff[0]);
XTESTS_TEST_CHARACTER_NOT_EQUAL('2', buff[1]);
XTESTS_TEST_CHARACTER_NOT_EQUAL('3', buff[2]);
TEST_CHAR_NE('1', buff[0]);
TEST_CHAR_NE('2', buff[1]);
TEST_CHAR_NE('3', buff[2]);
}

{
Expand All @@ -187,10 +188,10 @@ static void TEST_EMPTY_path()
TEST_INT_EQ(0, r);
TEST_INT_EQ(0, errno);
TEST_INT_EQ(3, cb_actual);
XTESTS_TEST_CHARACTER_NOT_EQUAL('1', buff[0]);
XTESTS_TEST_CHARACTER_NOT_EQUAL('2', buff[1]);
XTESTS_TEST_CHARACTER_NOT_EQUAL('3', buff[2]);
XTESTS_TEST_CHARACTER_EQUAL('4', buff[3]);
TEST_CHAR_NE('1', buff[0]);
TEST_CHAR_NE('2', buff[1]);
TEST_CHAR_NE('3', buff[2]);
TEST_CHAR_EQ('4', buff[3]);
}

{
Expand All @@ -209,10 +210,10 @@ static void TEST_EMPTY_path()
TEST_INT_EQ(0, r);
TEST_INT_EQ(0, errno);
TEST_INT_EQ(3, cb_actual);
XTESTS_TEST_CHARACTER_NOT_EQUAL('1', buff[0]);
XTESTS_TEST_CHARACTER_NOT_EQUAL('2', buff[1]);
XTESTS_TEST_CHARACTER_NOT_EQUAL('3', buff[2]);
XTESTS_TEST_CHARACTER_EQUAL('4', buff[3]);
TEST_CHAR_NE('1', buff[0]);
TEST_CHAR_NE('2', buff[1]);
TEST_CHAR_NE('3', buff[2]);
TEST_CHAR_EQ('4', buff[3]);
}
}

Expand Down Expand Up @@ -381,7 +382,7 @@ static void TEST_VALID_paths()

if (104 == cb_sun_path)
{
XTESTS_TEST_MULTIBYTE_STRING_EQUAL_N("/tmp/sock/0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123", sa_un.sun_path, 104);
TEST_MS_EQ_N("/tmp/sock/0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123", sa_un.sun_path, 104);
}
else
{
Expand Down Expand Up @@ -415,7 +416,7 @@ static void TEST_VALID_paths()

if (104 == cb_sun_path)
{
XTESTS_TEST_MULTIBYTE_STRING_EQUAL_N("/tmp/sock/01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567", sa_un.sun_path, 108);
TEST_MS_EQ_N("/tmp/sock/01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567", sa_un.sun_path, 108);
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Purpose: Unit-tests for `platformstl::stopwatch`.
*
* Created: 19th November 2024
* Updated: 20th March 2025
* Updated: 9th August 2026
*
* ////////////////////////////////////////////////////////////////////// */

Expand All @@ -25,6 +25,7 @@

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

/* STLSoft header files */
#include <stlsoft/conversion/sas_to_string.hpp>
Expand Down Expand Up @@ -111,23 +112,23 @@ static void test_start_then_stop_immediately()
// small number of microseconds, but because of rollover we _might_ get
// a second

XTESTS_TEST_INTEGER_LESS_OR_EQUAL(1, num_s);
XTESTS_TEST_INTEGER_LESS_OR_EQUAL(1000, num_ms);
XTESTS_TEST_INTEGER_LESS_OR_EQUAL(1000000, num_us);
TEST_INT_LE(1, num_s);
TEST_INT_LE(1000, num_ms);
TEST_INT_LE(1000000, num_us);

#if 0
#elif defined(PLATFORMSTL_OS_IS_UNIX)

// we _know_ that the implementation of `unixstl::stopwatch` has a
// granularity of us, so ns will be an exact multiple

XTESTS_TEST_INTEGER_EQUAL(num_us * 1000, num_ns);
TEST_INT_EQ(num_us * 1000, num_ns);
#elif defined(PLATFORMSTL_OS_IS_WINDOWS)

// we _know_ that the implementation of `winstl::stopwatch` has a
// granularity of 100ns

XTESTS_TEST_INTEGER_EQUAL(num_us, num_ns / 1000);
TEST_INT_EQ(num_us, num_ns / 1000);
#endif
}

Expand All @@ -145,23 +146,23 @@ static void test_get_epoch_twice()
// small number of microseconds, but because of rollover we _might_ get
// a second

XTESTS_TEST_INTEGER_LESS_OR_EQUAL(1, num_s);
XTESTS_TEST_INTEGER_LESS_OR_EQUAL(1000, num_ms);
XTESTS_TEST_INTEGER_LESS_OR_EQUAL(1000000, num_us);
TEST_INT_LE(1, num_s);
TEST_INT_LE(1000, num_ms);
TEST_INT_LE(1000000, num_us);

#if 0
#elif defined(PLATFORMSTL_OS_IS_UNIX)

// we _know_ that the implementation of `unixstl::stopwatch` has a
// granularity of us, so ns will be an exact multiple

XTESTS_TEST_INTEGER_EQUAL(num_us * 1000, num_ns);
TEST_INT_EQ(num_us * 1000, num_ns);
#elif defined(PLATFORMSTL_OS_IS_WINDOWS)

// we _know_ that the implementation of `winstl::stopwatch` has a
// granularity of 100ns

XTESTS_TEST_INTEGER_EQUAL(num_us, num_ns / 1000);
TEST_INT_EQ(num_us, num_ns / 1000);
#endif
}
} // anonymous namespace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Purpose: Unit-tests for `platformstl::environment_variable_scope`.
*
* Created: 26th April 2025
* Updated: 31st April 2025
* Updated: 9th August 2026
*
* ////////////////////////////////////////////////////////////////////// */

Expand All @@ -24,6 +24,7 @@
*/

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

/* STLSoft header files */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Purpose: Unit-tests for `platformstl::environment_variable_traits`.
*
* Created: 30th December 2024
* Updated: 20th March 2025
* Updated: 9th August 2026
*
* ////////////////////////////////////////////////////////////////////// */

Expand All @@ -25,6 +25,7 @@

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

/* STLSoft header files */
#include <stlsoft/stlsoft.h>
Expand Down Expand Up @@ -98,21 +99,21 @@ static void TEST_set_variable()
{
int const r = environment_variable_traits::set_variable("EV_2C4D392B_22CD_4452_9525_382043AD2611", "some-value");

XTESTS_TEST_INTEGER_EQUAL(0, r);
TEST_INT_EQ(0, r);
}

{
char const* ev_value = environment_variable_traits::get_variable("EV_2C4D392B_22CD_4452_9525_382043AD2611");

XTESTS_REQUIRE(XTESTS_TEST_POINTER_NOT_EQUAL(NULL, ev_value));
XTESTS_REQUIRE(TEST_PTR_NE(NULL, ev_value));

XTESTS_TEST_MULTIBYTE_STRING_EQUAL("some-value", ev_value);
TEST_MS_EQ("some-value", ev_value);
}

{
int const r = environment_variable_traits::erase_variable("EV_2C4D392B_22CD_4452_9525_382043AD2611");

XTESTS_TEST_INTEGER_EQUAL(0, r);
TEST_INT_EQ(0, r);
}
}
#endif /* PLATFORMSTL_ENVVAR_SET_SUPPORTED */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Purpose: Unit-tests for `platformstl::system_traits`.
*
* Created: 29th January 2013
* Updated: 15th August 2025
* Updated: 9th August 2026
*
* ////////////////////////////////////////////////////////////////////// */

Expand All @@ -25,6 +25,7 @@

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

/* STLSoft header files */
#include <platformstl/system/environment_variable.hpp>
Expand Down Expand Up @@ -96,7 +97,7 @@ static void TEST_INSUFFICIENT_SPACE()

size_t const cch = platformstl::system_traits<char>::get_home_directory(&buff[0], buff.size());

XTESTS_TEST_INTEGER_EQUAL(i - 1, cch);
TEST_INT_EQ(i - 1, cch);
}}
}
#elif defined(PLATFORMSTL_OS_IS_WINDOWS)
Expand All @@ -109,15 +110,15 @@ static void TEST_INSUFFICIENT_SPACE()

size_t const cch = platformstl::system_traits<char>::get_home_directory(&buff[0], buff.size());

XTESTS_TEST_INTEGER_EQUAL(required, cch);
TEST_INT_EQ(required, cch);
}}
}
#endif

stlsoft::auto_buffer<char> buff(required);
size_t const actual = platformstl::system_traits<char>::get_home_directory(&buff[0], buff.size());

XTESTS_TEST_INTEGER_EQUAL(required - 1, actual);
TEST_INT_EQ(required - 1, actual);
}

static void TEST_get_home_directory()
Expand All @@ -130,8 +131,8 @@ static void TEST_get_home_directory()
stlsoft::auto_buffer<char> buff(1 + HOME.size());
size_t const cch = platformstl::system_traits<char>::get_home_directory(&buff[0], buff.size());

XTESTS_TEST_INTEGER_EQUAL(HOME.size(), cch);
XTESTS_TEST_MULTIBYTE_STRING_EQUAL(std::string(HOME), buff.data());
TEST_INT_EQ(HOME.size(), cch);
TEST_MS_EQ(std::string(HOME), buff.data());

#elif defined(PLATFORMSTL_OS_IS_WINDOWS)

Expand All @@ -141,8 +142,8 @@ static void TEST_get_home_directory()
stlsoft::auto_buffer<char> buff(1 + HOMEDRIVE.size() + HOMEPATH.size());
size_t const cch = platformstl::system_traits<char>::get_home_directory(&buff[0], buff.size());

XTESTS_TEST_INTEGER_EQUAL(HOMEDRIVE.size() + HOMEPATH.size(), cch);
XTESTS_TEST_MULTIBYTE_STRING_EQUAL(std::string(HOMEDRIVE) + std::string(HOMEPATH), buff.data());
TEST_INT_EQ(HOMEDRIVE.size() + HOMEPATH.size(), cch);
TEST_MS_EQ(std::string(HOMEDRIVE) + std::string(HOMEPATH), buff.data());
#endif
}
} // anonymous namespace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Purpose: Unit-tests for `stlsoft::environment_block`.
*
* Created: 11th August 2010
* Updated: 20th March 2025
* Updated: 9th August 2026
*
* ////////////////////////////////////////////////////////////////////// */

Expand All @@ -24,6 +24,7 @@

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

/* STLSoft header files */
#include <stlsoft/stlsoft.h>
Expand Down Expand Up @@ -82,7 +83,7 @@ static void test_empty()
{
stlsoft::environment_block_a block;

XTESTS_TEST_INTEGER_EQUAL(0u, block.size());
TEST_INT_EQ(0u, block.size());
}

static void test_1_element()
Expand All @@ -91,8 +92,8 @@ static void test_1_element()

block.push_back("key-1", "value-1");

XTESTS_TEST_INTEGER_EQUAL(1u, block.size());
XTESTS_TEST_MULTIBYTE_STRING_EQUAL("key-1=value-1", block.base()[0]);
TEST_INT_EQ(1u, block.size());
TEST_MS_EQ("key-1=value-1", block.base()[0]);
}

static void test_2_elements()
Expand All @@ -102,9 +103,9 @@ static void test_2_elements()
block.push_back("key-1", "value-1");
block.push_back("key-0", "value-0");

XTESTS_TEST_INTEGER_EQUAL(2u, block.size());
XTESTS_TEST_MULTIBYTE_STRING_EQUAL("key-1=value-1", block.base()[0]);
XTESTS_TEST_MULTIBYTE_STRING_EQUAL("key-0=value-0", block.base()[1]);
TEST_INT_EQ(2u, block.size());
TEST_MS_EQ("key-1=value-1", block.base()[0]);
TEST_MS_EQ("key-0=value-0", block.base()[1]);
}

static void test_clear()
Expand All @@ -115,11 +116,11 @@ static void test_clear()
block.push_back("key-1", "value-1");
block.push_back("key-3", "value-3");

XTESTS_TEST_INTEGER_EQUAL(3u, block.size());
TEST_INT_EQ(3u, block.size());

block.clear();

XTESTS_TEST_INTEGER_EQUAL(0u, block.size());
TEST_INT_EQ(0u, block.size());
}
} // anonymous namespace

Expand Down
Loading
Loading