From 60b7f853d9766d5ad9ac12db7f1c58a503a2cf1b Mon Sep 17 00:00:00 2001 From: Sebastian Messmer Date: Sat, 24 Oct 2015 01:53:11 +0200 Subject: [PATCH] DataFixture::generateFixedSize() --- data/DataFixture.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/data/DataFixture.h b/data/DataFixture.h index 1da57344..464e5ad4 100644 --- a/data/DataFixture.h +++ b/data/DataFixture.h @@ -3,14 +3,25 @@ #define MESSMER_CPPUTILS_DATA_DATAFIXTURE_H_ #include "Data.h" +#include "FixedSizeData.h" namespace cpputils { class DataFixture { public: static Data generate(size_t size, long long int seed = 1); + + //TODO Test + template static FixedSizeData generateFixedSize(long long int seed = 1); }; +template FixedSizeData DataFixture::generateFixedSize(long long int seed) { + Data data = generate(SIZE, seed); + auto result = FixedSizeData::Null(); + std::memcpy(result.data(), data.data(), SIZE); + return result; +} + } #endif