Fix test cases

This commit is contained in:
Sebastian Messmer 2015-06-17 00:38:02 +02:00
parent 418e792d0b
commit 3069874066
2 changed files with 4 additions and 2 deletions

View File

@ -34,11 +34,11 @@ public:
constexpr unsigned int FixedSizeDataTest::SIZE;
TEST_F(FixedSizeDataTest, CanGenerateRandomDataWithoutCrashing) {
FixedSizeData<SIZE> result = FixedSizeData<SIZE>::CreateRandom();
FixedSizeData<SIZE> result = FixedSizeData<SIZE>::CreatePseudoRandom();
}
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());
}

View File

@ -13,6 +13,8 @@ public:
class Child: public Parent {};
class Child2: public Parent {};
//TODO Add test cases that the correct (virtual) destructor is called
TEST(DynamicPointerMoveTest, NullPtrParentToChildCast) {
unique_ptr<Parent> source(nullptr);
unique_ptr<Child> casted = dynamic_pointer_move<Child>(source);