mirror of
https://github.com/ETLCPP/etl.git
synced 2026-11-09 14:49:53 +08:00
Add max_item_size() to etl::ipool (#1001)
This commit is contained in:
parent
99d7537506
commit
f0ebf26b6d
@ -271,6 +271,14 @@ namespace etl
|
||||
return Max_Size;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Returns the maximum size of an item in the pool.
|
||||
//*************************************************************************
|
||||
size_t max_item_size() const
|
||||
{
|
||||
return Item_Size;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
/// Returns the maximum number of items in the pool.
|
||||
//*************************************************************************
|
||||
|
||||
@ -288,6 +288,14 @@ namespace
|
||||
CHECK(pool.max_size() == 4U);
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_max_item_size)
|
||||
{
|
||||
etl::pool<Test_Data, 4> pool;
|
||||
|
||||
CHECK(pool.max_item_size() == sizeof(Test_Data));
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
TEST(test_size)
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user