Add a test that checks for correct order in async IO

This commit is contained in:
heinrich5991 2017-10-12 00:58:47 +02:00
parent 13f0655cba
commit d5008d87a3

View file

@ -87,3 +87,19 @@ TEST_F(Async, Pieces)
}
Expect(aText);
}
TEST_F(Async, Mixed)
{
char aText[64 * 1024 + 1];
for(unsigned i = 0; i < sizeof(aText) - 1; i++)
{
aText[i] = 'a' + i % 26;
}
aText[sizeof(aText) - 1] = 0;
for(unsigned i = 0; i < sizeof(aText) - 1; i++)
{
char w = 'a' + i % 26;
async_write(m_pAio, &w, 1);
}
Expect(aText);
}