mirror of
https://github.com/ETLCPP/etl.git
synced 2026-04-30 19:09:10 +08:00
Added test_pop_excess
This commit is contained in:
parent
3a8cfda2c2
commit
8d59c170ef
@ -179,6 +179,24 @@ namespace
|
||||
CHECK_EQUAL(1U, stack.size());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_pop_excess)
|
||||
{
|
||||
etl::stack<int, 4> stack;
|
||||
|
||||
for (size_t i = 0; i < stack.max_size(); ++i)
|
||||
{
|
||||
stack.push(1);
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < stack.max_size(); ++i)
|
||||
{
|
||||
stack.pop();
|
||||
}
|
||||
|
||||
CHECK_THROW(stack.pop(), etl::stack_empty);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_top)
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user