23 lines
562 B
C++
23 lines
562 B
C++
#include "precompiled_unittests_core.h"
|
|
|
|
#include "core/container/staticarray.h"
|
|
|
|
|
|
namespace ITF
|
|
{
|
|
|
|
TEST(static_array, test_ConstructorWithInitialValue)
|
|
{
|
|
const size_t arraySize = 10;
|
|
const int initialValue = 123456;
|
|
ITF_ARRAY<int, arraySize> anArray (initialValue);
|
|
|
|
EXPECT_EQ(anArray.capacity(), arraySize);
|
|
EXPECT_EQ(anArray.size(), arraySize);
|
|
for (size_t elementInd = 0; elementInd < anArray.size(); elementInd++)
|
|
{
|
|
EXPECT_EQ(anArray[elementInd], initialValue);
|
|
}
|
|
}
|
|
|
|
}
|