From 7b4cab0ac213a574c5dd392842768a80823e92ca Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Sun, 3 Apr 2016 21:43:37 -0500 Subject: [PATCH] Add a test, inspired by @drwells. --- tests/base/memory_consumption_03.cc | 35 +++++++++++++++++++++++++ tests/base/memory_consumption_03.output | 3 +++ 2 files changed, 38 insertions(+) create mode 100644 tests/base/memory_consumption_03.cc create mode 100644 tests/base/memory_consumption_03.output diff --git a/tests/base/memory_consumption_03.cc b/tests/base/memory_consumption_03.cc new file mode 100644 index 0000000000..1965b74818 --- /dev/null +++ b/tests/base/memory_consumption_03.cc @@ -0,0 +1,35 @@ +// --------------------------------------------------------------------- +// +// Copyright (C) 2016 by the deal.II authors +// +// This file is part of the deal.II library. +// +// The deal.II library is free software; you can use it, redistribute +// it, and/or modify it under the terms of the GNU Lesser General +// Public License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// The full text of the license can be found in the file LICENSE at +// the top level of the deal.II distribution. +// +// --------------------------------------------------------------------- + + + +// test memory_consumption() on std_cxx11::array + +#include "../tests.h" + +#include + +#include + + +int main() +{ + std::ofstream logfile("output"); + deallog.attach(logfile); + + typedef std_cxx11::array, 3> IntArray; + deallog << dealii::MemoryConsumption::memory_consumption(IntArray()) << std::endl; + deallog << sizeof(IntArray) << std::endl; +} diff --git a/tests/base/memory_consumption_03.output b/tests/base/memory_consumption_03.output new file mode 100644 index 0000000000..703ca29d82 --- /dev/null +++ b/tests/base/memory_consumption_03.output @@ -0,0 +1,3 @@ + +DEAL::36 +DEAL::36 -- 2.39.5