This commit is contained in:
4
deps/ox/src/ox/std/strops.cpp
vendored
4
deps/ox/src/ox/std/strops.cpp
vendored
@@ -20,13 +20,17 @@ static_assert(ox::strcmp("", "") == 0, "\"\" == \"\"");
|
|||||||
|
|
||||||
static_assert([] {
|
static_assert([] {
|
||||||
auto constexpr testStr = ox::Span{"asdf"};
|
auto constexpr testStr = ox::Span{"asdf"};
|
||||||
|
OX_ALLOW_UNSAFE_BUFFERS_BEGIN
|
||||||
return ox::strchr(testStr.data(), 0, 4) == &testStr[4];
|
return ox::strchr(testStr.data(), 0, 4) == &testStr[4];
|
||||||
|
OX_ALLOW_UNSAFE_BUFFERS_END
|
||||||
}(), "ox::strchr 0");
|
}(), "ox::strchr 0");
|
||||||
|
|
||||||
static_assert([] {
|
static_assert([] {
|
||||||
auto constexpr testStr = "aaaa";
|
auto constexpr testStr = "aaaa";
|
||||||
// test the const and non-const versions of ox::lastIndexOf
|
// test the const and non-const versions of ox::lastIndexOf
|
||||||
|
OX_ALLOW_UNSAFE_BUFFERS_BEGIN
|
||||||
return ox::lastIndexOf(testStr, 'a', ox::strlen(testStr)) == 3;
|
return ox::lastIndexOf(testStr, 'a', ox::strlen(testStr)) == 3;
|
||||||
|
OX_ALLOW_UNSAFE_BUFFERS_END
|
||||||
}(), "ox::lastIndexOf aaaa a");
|
}(), "ox::lastIndexOf aaaa a");
|
||||||
|
|
||||||
#ifndef OX_USE_STDLIB
|
#ifndef OX_USE_STDLIB
|
||||||
|
|||||||
Reference in New Issue
Block a user