1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-10-17 15:46:43 +00:00
Commit graph

3 commits

Author SHA1 Message Date
elsid
7bf1ea32b0
Disable not working tests for MSVC
std::streambuf in MSVC does not support buffers larger than 2**31 - 1:
https://developercommunity.visualstudio.com/t/stdbasic-stringbuf-is-broken/290124

Simple test to check if it works:

TEST(IMemStreamTest, shouldRead)
{
    std::string src(std::numeric_limits<uint32_t>::max() / 2 + 1, '\0');
    Files::IMemStream stream(src.data(), src.size());
    std::string dst(src.size(), '\0');
    stream.read(dst.data(), src.size());
    EXPECT_FALSE(stream.fail()) << std::generic_category().message(errno);
}
2025-10-12 11:11:24 +02:00
elsid
ab4637f6c7
Do not rely on std::string::reserve
Passing an object with capacity through std::ostringstream may change
its capacity. Use malloc instead to make sure the memory is allocated.
2025-10-12 11:11:22 +02:00
elsid
c87cc643d1
Add tests for BSAFile 2025-10-06 00:02:32 +02:00