From 1b02732d081a6f2519a46fa8c1ea7bace6e91a9f Mon Sep 17 00:00:00 2001 From: David Wells Date: Fri, 15 Dec 2017 17:27:59 -0500 Subject: [PATCH] Add a test for VectorMemory>. --- tests/lac/vector_memory_std_vector.cc | 30 +++++++++++++++++++++++ tests/lac/vector_memory_std_vector.output | 2 ++ 2 files changed, 32 insertions(+) create mode 100644 tests/lac/vector_memory_std_vector.cc create mode 100644 tests/lac/vector_memory_std_vector.output diff --git a/tests/lac/vector_memory_std_vector.cc b/tests/lac/vector_memory_std_vector.cc new file mode 100644 index 0000000000..cf6e956fab --- /dev/null +++ b/tests/lac/vector_memory_std_vector.cc @@ -0,0 +1,30 @@ +#include +#include + +#include + +#include "../tests.h" + +// Check that we can create VectorMemory objects with vector-like classes in +// the standard library. + +template +void test_std_vector_pointer() +{ + GrowingVectorMemory mem; + + std::vector::Pointer> va; + va.push_back(typename VectorMemory::Pointer(mem)); + va.emplace_back(mem); +} + + + +int main() +{ + initlog(); + PrimitiveVectorMemory> primitive_memory; + test_std_vector_pointer>(); + + deallog << "OK" << std::endl; +} diff --git a/tests/lac/vector_memory_std_vector.output b/tests/lac/vector_memory_std_vector.output new file mode 100644 index 0000000000..0fd8fc12f0 --- /dev/null +++ b/tests/lac/vector_memory_std_vector.output @@ -0,0 +1,2 @@ + +DEAL::OK -- 2.39.5