MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / generateFile

Function generateFile

src/Core/tests/FileStreamTests.cpp:37–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

35}
36
37static void generateFile(const std::filesystem::path& filePath, const DataBuffer& inputBytes)
38{
39 FileStream streamOut(filePath, StreamMode::write);
40 ASSERT_EQ(streamOut.getLength(), 0);
41 ASSERT_EQ(streamOut.getPosition(), 0);
42
43 streamOut.write(inputBytes.data(), inputBytes.size());
44
45 ASSERT_EQ(streamOut.getLength(), inputBytes.size());
46 ASSERT_EQ(streamOut.getPosition(), inputBytes.size());
47}
48
49TEST(FileStreamTest, testWriteRead)
50{

Callers 1

TESTFunction · 0.85

Calls 5

getLengthMethod · 0.45
getPositionMethod · 0.45
writeMethod · 0.45
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected