diff options
Diffstat (limited to 'tests/testing.h')
| -rw-r--r-- | tests/testing.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/testing.h b/tests/testing.h index cd0045a..0be65e3 100644 --- a/tests/testing.h +++ b/tests/testing.h @@ -19,10 +19,21 @@ #include "util/types.h" #include "util/base.h" #include "framework/MutableBuffer.h" +#include "framework/RecordInterface.h" typedef de::WeightedRecord<uint64_t, uint32_t, uint64_t> WRec; typedef de::Record<uint64_t, uint32_t> Rec; +template <de::RecordInterface R> +std::vector<R> strip_wrapping(std::vector<de::Wrapped<R>> vec) { + std::vector<R> out(vec.size()); + for (size_t i=0; i<vec.size(); i++) { + out[i] = vec[i].rec; + } + + return out; +} + static bool initialize_test_file(std::string fname, size_t page_cnt) { auto flags = O_RDWR | O_CREAT | O_TRUNC; |