Fix test cases
This commit is contained in:
parent
418e792d0b
commit
3069874066
@ -34,11 +34,11 @@ public:
|
|||||||
constexpr unsigned int FixedSizeDataTest::SIZE;
|
constexpr unsigned int FixedSizeDataTest::SIZE;
|
||||||
|
|
||||||
TEST_F(FixedSizeDataTest, CanGenerateRandomDataWithoutCrashing) {
|
TEST_F(FixedSizeDataTest, CanGenerateRandomDataWithoutCrashing) {
|
||||||
FixedSizeData<SIZE> result = FixedSizeData<SIZE>::CreateRandom();
|
FixedSizeData<SIZE> result = FixedSizeData<SIZE>::CreatePseudoRandom();
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(FixedSizeDataTest, CreatedRandomDatasHaveCorrectLength) {
|
TEST_F(FixedSizeDataTest, CreatedRandomDatasHaveCorrectLength) {
|
||||||
FixedSizeData<SIZE> data = FixedSizeData<SIZE>::CreateRandom();
|
FixedSizeData<SIZE> data = FixedSizeData<SIZE>::CreatePseudoRandom();
|
||||||
EXPECT_EQ(FixedSizeData<SIZE>::STRING_LENGTH, data.ToString().size());
|
EXPECT_EQ(FixedSizeData<SIZE>::STRING_LENGTH, data.ToString().size());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,6 +13,8 @@ public:
|
|||||||
class Child: public Parent {};
|
class Child: public Parent {};
|
||||||
class Child2: public Parent {};
|
class Child2: public Parent {};
|
||||||
|
|
||||||
|
//TODO Add test cases that the correct (virtual) destructor is called
|
||||||
|
|
||||||
TEST(DynamicPointerMoveTest, NullPtrParentToChildCast) {
|
TEST(DynamicPointerMoveTest, NullPtrParentToChildCast) {
|
||||||
unique_ptr<Parent> source(nullptr);
|
unique_ptr<Parent> source(nullptr);
|
||||||
unique_ptr<Child> casted = dynamic_pointer_move<Child>(source);
|
unique_ptr<Child> casted = dynamic_pointer_move<Child>(source);
|
||||||
|
Loading…
Reference in New Issue
Block a user