]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
New test.
authorbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 13 Oct 2009 21:31:42 +0000 (21:31 +0000)
committerbangerth <bangerth@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 13 Oct 2009 21:31:42 +0000 (21:31 +0000)
git-svn-id: https://svn.dealii.org/trunk@19852 0785d39b-7218-0410-832d-ea1e28bc413d

tests/base/index_set_09.cc [new file with mode: 0644]
tests/base/index_set_09/cmp/generic [new file with mode: 0644]

diff --git a/tests/base/index_set_09.cc b/tests/base/index_set_09.cc
new file mode 100644 (file)
index 0000000..9c217ff
--- /dev/null
@@ -0,0 +1,52 @@
+//-----------------------------------------------------------------------------
+//    $Id$
+//    Version: $Name$
+//
+//    Copyright (C) 2009 by the deal.II authors
+//
+//    This file is subject to QPL and may not be  distributed
+//    without copyright and license information. Please refer
+//    to the file deal.II/doc/license.html for the  text  and
+//    further information on this license.
+//
+//-----------------------------------------------------------------------------
+
+// test IndexSet::n_elements()
+
+#include "../tests.h"
+#include <iomanip>
+#include <iomanip>
+#include <fstream>
+#include <cmath>
+
+#include <base/index_set.h>
+
+
+void test ()
+{
+  IndexSet index_set (20);
+  index_set.add_index (2);
+  index_set.add_index (3);
+  index_set.add_index (4);
+
+  index_set.add_index (6);
+  index_set.add_index (7);
+
+  index_set.add_index (9);
+
+  deallog << index_set.n_elements()
+         << std::endl;
+}
+
+
+
+
+int main()
+{
+  std::ofstream logfile("index_set_09/output");
+  deallog.attach(logfile);
+  deallog.depth_console(0);
+  deallog.threshold_double(1.e-10);
+
+  test ();
+}
diff --git a/tests/base/index_set_09/cmp/generic b/tests/base/index_set_09/cmp/generic
new file mode 100644 (file)
index 0000000..95e5f2b
--- /dev/null
@@ -0,0 +1,2 @@
+
+DEAL::6

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.