From: Wolfgang Bangerth Date: Mon, 4 Apr 2016 02:43:37 +0000 (-0500) Subject: Add a test, inspired by @drwells. X-Git-Tag: v8.5.0-rc1~1136^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b4cab0ac213a574c5dd392842768a80823e92ca;p=dealii.git Add a test, inspired by @drwells. --- 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