@@ -1,4 +1,4 @@
|
||||
/*
|
||||
/*
|
||||
SPDX-License-Identifier: MIT
|
||||
Copyright © 2023-2025 Amebis
|
||||
*/
|
||||
@@ -60,13 +60,15 @@ namespace UnitTests
|
||||
|
||||
{
|
||||
wchar_t buf[8];
|
||||
Assert::IsTrue(stdex::snprintf(buf, _countof(buf), L"This is %ls.", locale, L"a test") == 8);
|
||||
Assert::IsTrue(stdex::strncmp(L"This is a test.", buf, _countof(buf)) == 0);
|
||||
size_t n = stdex::snprintf(buf, _countof(buf), L"This is %ls.", locale, L"a test");
|
||||
Assert::IsTrue(n <= _countof(buf));
|
||||
Assert::IsTrue(stdex::strncmp(L"This is a test.", buf, n) == 0);
|
||||
}
|
||||
{
|
||||
char buf[8];
|
||||
Assert::IsTrue(stdex::snprintf(buf, _countof(buf), "This is %s.", locale, "a test") == 8);
|
||||
Assert::IsTrue(stdex::strncmp("This is a test.", buf, _countof(buf)) == 0);
|
||||
size_t n = stdex::snprintf(buf, _countof(buf), "This is %s.", locale, "a test");
|
||||
Assert::IsTrue(n <= _countof(buf));
|
||||
Assert::IsTrue(stdex::strncmp("This is a test.", buf, n) == 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user