mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 22:48:18 +00:00
Add a test that checks for correct order in async IO
This commit is contained in:
parent
13f0655cba
commit
d5008d87a3
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue