a new testcase with the corresponding bug fix.

This commit is contained in:
Mathieu Lacage
2007-04-19 22:29:09 +02:00
parent 7f228cc6f4
commit 75c78de2b3

View File

@@ -140,7 +140,7 @@ Buffer::AddAtStart (uint32_t start)
/* enough space but need to move data around to fit new data */
memmove (m_data->m_data + start, GetStart (), m_size);
NS_ASSERT (start > m_start);
m_data->m_initialStart += start;
m_data->m_initialStart += start - m_start;
m_start = 0;
m_size += start;
}
@@ -647,9 +647,13 @@ BufferTest::RunTests (void)
{
ok = false;
}
buffer = Buffer (6);
buffer.AddAtStart (9);
buffer.AddAtEnd (3);
i = buffer.End ();
i.Prev (1);
i.WriteU8 (1, 1);
return ok;
}