]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add a test, inspired by @drwells. 2449/head
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 4 Apr 2016 02:43:37 +0000 (21:43 -0500)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Mon, 4 Apr 2016 15:08:35 +0000 (10:08 -0500)
tests/base/memory_consumption_03.cc [new file with mode: 0644]
tests/base/memory_consumption_03.output [new file with mode: 0644]

diff --git a/tests/base/memory_consumption_03.cc b/tests/base/memory_consumption_03.cc
new file mode 100644 (file)
index 0000000..1965b74
--- /dev/null
@@ -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 <deal.II/base/memory_consumption.h>
+
+#include <fstream>
+
+
+int main()
+{
+  std::ofstream logfile("output");
+  deallog.attach(logfile);
+
+  typedef std_cxx11::array<std_cxx11::array<int, 3>, 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 (file)
index 0000000..703ca29
--- /dev/null
@@ -0,0 +1,3 @@
+
+DEAL::36
+DEAL::36

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.