added zero-size check

This commit is contained in:
Aleksandar Fabijanic
2009-03-16 15:17:13 +00:00
parent c41d7fcf91
commit 582d3853db
2 changed files with 15 additions and 1 deletions

View File

@@ -216,6 +216,9 @@ void CoreTest::testBuffer()
for (int j = 0; i < s; ++i, ++j)
assert (b1[i] == j);
b1.resize(0);
assert (b1.isEmpty());
#if ENABLE_BUGCHECK_TEST
try { int i = b[s]; fail ("must fail"); }
catch (Exception&) { }